From e250b94bb16b40d6333182bd18f2e52c4058d34d Mon Sep 17 00:00:00 2001
From: balexey88
Date: Tue, 24 Oct 2023 17:18:53 +0300
Subject: [PATCH 01/53] Merge latest changes from 3.2.5 to v4.0. Update
changelog
---
changelog.txt | 16 +
changes.md | 17 +
lib/classes/class-compatibility.php | 421 ++++++++++--------
lib/classes/class-module.php | 138 ++++++
lib/classes/compatibility/ICompatibility.php | 269 -----------
lib/classes/compatibility/acf-image-crop.php | 107 -----
lib/classes/compatibility/buddyboss.php | 48 --
lib/classes/compatibility/buddypress.php | 185 --------
lib/classes/compatibility/divi.php | 65 ---
.../compatibility/dynamic-image-support.php | 34 +-
.../compatibility/easy-digital-downloads.php | 144 ------
lib/classes/compatibility/elementor.php | 158 -------
lib/classes/compatibility/ewww.php | 68 ---
.../compatibility/google-app-engine.php | 14 +-
.../compatibility/gravity-forms-signature.php | 109 -----
lib/classes/compatibility/gravity-forms.php | 276 ------------
lib/classes/compatibility/imagify.php | 184 ++++----
lib/classes/compatibility/learn-dash.php | 69 ---
.../compatibility/lite-speed-cache.php | 380 ----------------
lib/classes/compatibility/polylang-pro.php | 57 ---
lib/classes/compatibility/shortpixel.php | 351 +++++++--------
.../compatibility/simple-local-avatars.php | 78 ----
lib/classes/compatibility/siteorigin-css.php | 36 +-
.../siteorigin-widget-bundle.php | 47 +-
.../compatibility/the-events-calendar.php | 48 --
lib/classes/compatibility/vidorev.php | 20 +-
.../woo-extra-product-options.php | 31 +-
lib/classes/compatibility/wp-retina-2x.php | 88 ++--
lib/classes/compatibility/wp-smush.php | 137 +++---
.../compatibility/wpbakery-page-builder.php | 44 +-
lib/classes/compatibility/wpforms.php | 17 +-
readme.txt | 2 +-
wp-stateless-media.php | 4 +-
33 files changed, 894 insertions(+), 2768 deletions(-)
create mode 100644 lib/classes/class-module.php
delete mode 100644 lib/classes/compatibility/ICompatibility.php
delete mode 100644 lib/classes/compatibility/acf-image-crop.php
delete mode 100644 lib/classes/compatibility/buddyboss.php
delete mode 100644 lib/classes/compatibility/buddypress.php
delete mode 100644 lib/classes/compatibility/divi.php
delete mode 100644 lib/classes/compatibility/easy-digital-downloads.php
delete mode 100644 lib/classes/compatibility/elementor.php
delete mode 100644 lib/classes/compatibility/ewww.php
delete mode 100644 lib/classes/compatibility/gravity-forms-signature.php
delete mode 100644 lib/classes/compatibility/gravity-forms.php
delete mode 100644 lib/classes/compatibility/learn-dash.php
delete mode 100644 lib/classes/compatibility/lite-speed-cache.php
delete mode 100644 lib/classes/compatibility/polylang-pro.php
delete mode 100644 lib/classes/compatibility/simple-local-avatars.php
delete mode 100644 lib/classes/compatibility/the-events-calendar.php
diff --git a/changelog.txt b/changelog.txt
index b27651c59..143612745 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,4 +1,20 @@
== Changelog ==
+= 4.0.0 =
+* COMPATIBILITY - Removed compatibility with "Advanced Custom Fields: Image Crop Add-on", because plugin is deprecated.
+* COMPATIBILITY - BuddyBoss Platform compatibility moved to a separate plugin [WP-Stateless - BuddyBoss Platform Addon](https://github.com/udx/wp-stateless-buddyboss-addon).
+* COMPATIBILITY - BuddyPress compatibility moved to a separate plugin [WP-Stateless - BuddyPress Addon](https://github.com/udx/wp-stateless-buddypress-addon).
+* COMPATIBILITY - Easy Digital Downloads compatibility moved to a separate plugin [WP-Stateless - Easy Digital Downloads Addon](https://github.com/udx/wp-stateless-easy-digital-downloads-addon).
+* COMPATIBILITY - Divi theme compatibility moved to a separate plugin [WP-Stateless - Divi theme Addon](https://github.com/udx/wp-stateless-divi-addon).
+* COMPATIBILITY - Elementor Website Builder compatibility moved to a separate plugin [WP-Stateless - Elementor Website Builder Addon](https://github.com/udx/wp-stateless-elementor-addon).
+* COMPATIBILITY - Gravity Forms compatibility moved to a separate plugin [WP-Stateless - Gravity Forms Addon](https://github.com/udx/wp-stateless-gravity-forms-addon).
+* COMPATIBILITY - Gravity Forms Signature compatibility moved to a separate plugin [WP-Stateless - Gravity Forms Signature Addon](https://github.com/udx/wp-stateless-gravity-forms-signature-addon).
+* COMPATIBILITY - LearnDash® LMS compatibility moved to a separate plugin [WP-Stateless - LearnDash LMS Plugin Addon](https://github.com/udx/wp-stateless-learndash-addon).
+* COMPATIBILITY - LiteSpeed Cache compatibility moved to a separate plugin [WP-Stateless - LiteSpeed Cache Addon](https://github.com/udx/wp-stateless-litespeed-cache-addon).
+* COMPATIBILITY - Polylang Pro compatibility moved to a separate plugin [WP-Stateless - Polylang Pro Addon](https://github.com/udx/wp-stateless-polylang-pro-addon).
+* COMPATIBILITY - Simple Local Avatar compatibility moved to a separate plugin [WP-Stateless - Simple Local Avatars Addon](https://github.com/udx/wp-stateless-simple-local-avatars-addon).
+* COMPATIBILITY - SiteOrigin CSS compatibility moved to a separate plugin [WP-Stateless - SiteOrigin CSS Addon](https://github.com/udx/wp-stateless-siteorigin-css-addon).
+* COMPATIBILITY - SiteOrigin Widgets Bundle compatibility moved to a separate plugin [WP-Stateless - SiteOrigin Widgets Bundle Addon](https://github.com/udx/wp-stateless-siteorigin-widgets-bundle-addon).
+
= 3.2.5 =
* FIX - Folder setting does not allow custom structure [#608](https://github.com/udx/wp-stateless/issues/608).
* FIX - Stateless mode Incompatible with Inline Uploader [#675](https://github.com/udx/wp-stateless/issues/675).
diff --git a/changes.md b/changes.md
index 8f1163fd6..24ea68dd9 100644
--- a/changes.md
+++ b/changes.md
@@ -1,3 +1,20 @@
+#### 4.0.0
+
+* COMPATIBILITY - Removed compatibility with "Advanced Custom Fields: Image Crop Add-on", because plugin is deprecated.
+* COMPATIBILITY - BuddyBoss Platform compatibility moved to a separate plugin [WP-Stateless - BuddyBoss Platform Addon](https://github.com/udx/wp-stateless-buddyboss-addon).
+* COMPATIBILITY - BuddyPress compatibility moved to a separate plugin [WP-Stateless - BuddyPress Addon](https://github.com/udx/wp-stateless-buddypress-addon).
+* COMPATIBILITY - Easy Digital Downloads compatibility moved to a separate plugin [WP-Stateless - Easy Digital Downloads Addon](https://github.com/udx/wp-stateless-easy-digital-downloads-addon).
+* COMPATIBILITY - Divi theme compatibility moved to a separate plugin [WP-Stateless - Divi theme Addon](https://github.com/udx/wp-stateless-divi-addon).
+* COMPATIBILITY - Elementor Website Builder compatibility moved to a separate plugin [WP-Stateless - Elementor Website Builder Addon](https://github.com/udx/wp-stateless-elementor-addon).
+* COMPATIBILITY - Gravity Forms compatibility moved to a separate plugin [WP-Stateless - Gravity Forms Addon](https://github.com/udx/wp-stateless-gravity-forms-addon).
+* COMPATIBILITY - Gravity Forms Signature compatibility moved to a separate plugin [WP-Stateless - Gravity Forms Signature Addon](https://github.com/udx/wp-stateless-gravity-forms-signature-addon).
+* COMPATIBILITY - LearnDash® LMS compatibility moved to a separate plugin [WP-Stateless - LearnDash LMS Plugin Addon](https://github.com/udx/wp-stateless-learndash-addon).
+* COMPATIBILITY - LiteSpeed Cache compatibility moved to a separate plugin [WP-Stateless - LiteSpeed Cache Addon](https://github.com/udx/wp-stateless-litespeed-cache-addon).
+* COMPATIBILITY - Polylang Pro compatibility moved to a separate plugin [WP-Stateless - Polylang Pro Addon](https://github.com/udx/wp-stateless-polylang-pro-addon).
+* COMPATIBILITY - Simple Local Avatar compatibility moved to a separate plugin [WP-Stateless - Simple Local Avatars Addon](https://github.com/udx/wp-stateless-simple-local-avatars-addon).
+* COMPATIBILITY - SiteOrigin CSS compatibility moved to a separate plugin [WP-Stateless - SiteOrigin CSS Addon](https://github.com/udx/wp-stateless-siteorigin-css-addon).
+* COMPATIBILITY - SiteOrigin Widgets Bundle compatibility moved to a separate plugin [WP-Stateless - SiteOrigin Widgets Bundle Addon](https://github.com/udx/wp-stateless-siteorigin-widgets-bundle-addon).
+
#### 3.2.5
* FIX - Folder setting does not allow custom structure [#608](https://github.com/udx/wp-stateless/issues/608).
* FIX - Stateless mode Incompatible with Inline Uploader [#675](https://github.com/udx/wp-stateless/issues/675).
diff --git a/lib/classes/class-compatibility.php b/lib/classes/class-compatibility.php
index d54d977ca..3880795d5 100644
--- a/lib/classes/class-compatibility.php
+++ b/lib/classes/class-compatibility.php
@@ -1,215 +1,264 @@
New Constant, ...]
+ * ['WP_STATELESS_MEDIA_ON_FLY' => 'WP_STATELESS_DYNAMIC_IMAGE_SUPPORT']
+ */
+ protected $constant = '';
+ protected $enabled = false;
+ protected $description = '';
+ protected $plugin_file = null;
+ protected $theme_name = null;
+ protected $first_party = false;
+ protected $non_library_sync = false;
+ protected $server_constant = false;
+ protected $sm_mode_required = '';
+ protected $sm_mode_not_supported = [];
+
+ public function __construct() {
+ $this->init();
+ }
-namespace wpCloud\StatelessMedia {
+ /**
+ * Checking whether the plugin is active or not.
+ * If the plugin_file is specified then check whether plugin is active or not.
+ * We can't use is_plugin_active function because it's defined later in init.
+ * By default return true.
+ *
+ * @todo caching.
+ */
+ public function is_plugin_active() {
+ if (!empty($this->theme_name)) {
+ $theme = wp_get_theme();
+ if ($theme->Name == $this->theme_name) {
+ return true;
+ }
- class Module {
+ $parent_theme = $theme->parent();
+ if (is_a($parent_theme, 'WP_Theme') && $parent_theme->Name == $this->theme_name) {
+ return true;
+ }
- private static $modules = array();
+ return false;
+ }
- /**
- * Object initiated on Bootstrap::__construct
- * Save module data on admin_init hook.
- * Initiate all the compatibility modules.
- */
- public function __construct() {
- add_action( 'admin_init', array( $this, 'save_modules' ), 1 );
-
- /**
- * ACF image crop addons compatibility.
- */
- new CompatibilityAcfImageCrop();
-
- /**
- * Support for BuddyBoss
- */
- new BuddyBoss();
-
- /**
- * Support for The Events Calendar
- */
- new TheEventsCalendar();
-
- /**
- * Support for BuddyPress
- */
- new BuddyPress();
-
- /**
- * Support for Divi
- */
- new Divi();
-
- /**
- * Dynamic Image Support
- */
- new DynamicImageSupport();
-
- /**
- * Support for Easy Digital Downloads download method
- */
- new EDDDownloadMethod();
-
- /**
- * Support for Elementor
- */
- new Elementor();
-
- /**
- * EWWW Image Optimizer
- */
- new EWWW();
-
- /**
- * Google App Engine
- */
- new GoogleAppEngine();
-
- /**
- * Support for Gravity Form file upload field
- */
- new GravityForm();
-
- /**
- * Support for Gravity Forms Signature Add-On
- */
- new GravityFormSignature();
-
- /**
- * Support for Imagify
- */
- new Imagify();
-
- /**
- * Support for LearnDash
- */
- new LearnDash();
-
- /**
- * LiteSpeed Cache
- */
- new LSCacheWP();
-
- /**
- * Polylang Pro
- */
- new Polylang();
-
- /**
- * Support for ShortPixel Image Optimizer
- */
- new ShortPixel();
-
- /**
- * Simple Local Avatars
- */
- new SimpleLocalAvatars();
-
- /**
- * Support for SiteOrigin CSS files
- */
- new SOCSS();
-
- /**
- * Support for SiteOrigin widget CSS files
- */
- new SOWidgetCSS();
-
- /**
- * VidoRev
- */
- new VidoRev();
-
- /**
- * WP Retina 2x
- */
- new WPRetina2x();
-
- /**
- * Support for WPForms
- */
- new WPSmush();
-
- /**
- * Support for WPForms
- */
- new CompatibilityWooExtraProductOptions();
-
- /**
- * Support for WPBakery Page Builder
- */
- new WPBakeryPageBuilder();
-
- /**
- * Support for WPForms
- */
- new WPForms();
-
- /**
- * Support for WooCommerce
- */
- new WooCommerce();
+ if (!empty($this->plugin_file)) {
+ // Converting string to array for foreach
+ if (is_string($this->plugin_file)) {
+ $this->plugin_file = array($this->plugin_file);
+ }
+
+ // If multisite then check if plugin is network active
+ if (is_multisite()) {
+ $active_plugins = (array)get_site_option('active_sitewide_plugins');
+ foreach ($this->plugin_file as $plugin_file) {
+ if (isset($active_plugins[$plugin_file])) {
+ return true;
+ }
+ }
+
+ // If we are in network admin then return, unless it will get data from main site.
+ if (is_network_admin()) {
+ return false;
+ }
+ }
+ $active_plugins = (array)get_option('active_plugins', array());
+ foreach ($this->plugin_file as $plugin_file) {
+ if (in_array($plugin_file, $active_plugins)) {
+ return true;
+ }
+ }
+
+ return false;
}
/**
- * Register compatibility modules so that we can ues them in settings page.
- * Called from ICompatibility::init() method.
+ * If server constant is set - check if exist it on global $_SERVER
*/
- public static function register_module( $args ) {
- if( empty( $args[ 'id' ] ) ) {
- return;
+ if (!empty($this->server_constant)) {
+ if (isset($_SERVER[$this->server_constant])) {
+ return true;
+ }
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Checking whether current mode is supported.
+ * By default return true.
+ *
+ * @todo caching.
+ */
+ public function is_mode_supported() {
+ $sm_mode = isset($_POST['sm']['mode']) ? $_POST['sm']['mode'] : ud_get_stateless_media()->get('sm.mode');
+ if (in_array($sm_mode, $this->sm_mode_not_supported)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Initialize the module
+ * Check whether plugin is active or not.
+ * Register module.
+ *
+ * Add action for sm::module::init hook for module_init, which is fired(do_action) on Bootstrap::init()
+ */
+ public function init() {
+ $is_constant = false;
+ $is_network_override = false;
+ $sm_mode = isset($_POST['sm']['mode']) ? $_POST['sm']['mode'] : ud_get_stateless_media()->get('sm.mode');
+ if (is_network_admin()) {
+ $this->enabled = null;
+ }
+
+ if (is_array($this->constant)) {
+ foreach ($this->constant as $old_const => $new_const) {
+ if (defined($new_const)) {
+ $is_constant = true;
+ $this->enabled = constant($new_const);
+ break;
+ }
+ if (is_string($old_const) && defined($old_const)) {
+ $is_constant = true;
+ $this->enabled = constant($old_const);
+ ud_get_stateless_media()->errors->add(array(
+ 'key' => $this->id,
+ 'title' => sprintf(__("%s: Deprecated Notice (%s)", ud_get_stateless_media()->domain), ud_get_stateless_media()->name, $this->title),
+ 'message' => sprintf(__("%s constant is deprecated, please use %s instead.", ud_get_stateless_media()->domain), $old_const, $new_const),
+ ), 'notice');
+ break;
+ }
}
- if( is_bool( $args[ 'enabled' ] ) ) {
- $args[ 'enabled' ] = $args[ 'enabled' ] ? 'true' : 'false';
+ } elseif (defined($this->constant)) {
+ $this->enabled = constant($this->constant);
+ $is_constant = true;
+ }
+
+ if (!$is_constant) {
+ $modules = get_option('stateless-modules', array());
+ if (empty($this->enabled)) {
+ $this->enabled = !empty($modules[$this->id]) && $modules[$this->id] == 'true' ? true : false;
+ }
+ if (is_multisite()) {
+ $modules = get_site_option('stateless-modules', array());
+ if (is_network_admin()) {
+ $this->enabled = !empty($modules[$this->id]) ? ($modules[$this->id] == 'true' ? true : false) : '';
+ } elseif (!empty($modules[$this->id])) {
+ $this->enabled = !empty($modules[$this->id]) ? ($modules[$this->id] == 'true' ? true : false) : '';
+ $is_network_override = true;
+ }
}
- self::$modules[ $args[ 'id' ] ] = wp_parse_args( $args, array( 'id' => '', 'self' => '', 'title' => '', 'enabled' => false, 'description' => '', 'is_constant' => false, 'is_network' => false, 'is_plugin_active' => false, ) );
+ }
+
+ if (!is_network_admin() && (!$this->is_plugin_active() || !$this->is_mode_supported())) {
+ $this->enabled = 'inactive';
}
/**
- * Return all the registered modules.
- * Used in admin_init in bootstrap class as localize_script.
+ * Checking whether to show manual sync option.
*/
- public static function get_modules() {
- return self::$modules;
+ if ($this->is_plugin_active() && $this->non_library_sync == true) {
+ global $show_non_library_sync;
+ $show_non_library_sync = true;
+ }
+
+ Module::register_module(array(
+ 'id' => $this->id,
+ 'self' => $this,
+ 'title' => $this->title,
+ 'enabled' => $this->enabled,
+ 'description' => $this->description,
+ 'is_constant' => $is_constant,
+ 'is_network_override' => $is_network_override,
+ 'is_plugin_active' => $this->is_plugin_active(),
+ 'is_network_admin' => is_network_admin(),
+ 'is_plugin' => !empty($this->plugin_file),
+ 'is_theme' => !empty($this->theme_name),
+ 'is_mode_supported' => $this->is_mode_supported(),
+ 'mode' => ucfirst($sm_mode)
+ ));
+
+ if ($this->enabled && $this->is_plugin_active() && $this->is_mode_supported()) {
+ add_action('sm::module::init', array($this, 'module_init'));
+ }
+
+ if (!$this->enabled && !$this->first_party && $this->is_plugin_active()) {
+ ud_get_stateless_media()->errors->add(array(
+ 'key' => $this->id,
+ 'title' => sprintf(__("%s: Compatibility for %s isn't enabled.", ud_get_stateless_media()->domain), ud_get_stateless_media()->name, $this->title),
+ 'button' => __("Enable Compatibility", ud_get_stateless_media()->domain),
+ 'message' => __("Please enable the compatibility to ensure the functionality will work properly between {$this->title} and WP-Stateless.", ud_get_stateless_media()->domain),
+ ), 'notice');
}
/**
- * Return all the registered modules.
- * Used in admin_init in bootstrap class as localize_script.
+ * Check requires WP-Stateless mode
*/
- public static function get_module( $id ) {
- if( !empty( self::$modules[ $id ] ) ) {
- return self::$modules[ $id ];
+ if (!empty($this->sm_mode_required) && $this->enabled !== 'inactive') {
+ if ($sm_mode !== $this->sm_mode_required) {
+ ud_get_stateless_media()->errors->add(array(
+ 'key' => $this->id,
+ 'title' => sprintf(__("%s: Current Mode is not compatible with %s.", ud_get_stateless_media()->domain), ud_get_stateless_media()->name, $this->title),
+ 'message' => sprintf(__("%s compatibility requires %s in %s mode.", ud_get_stateless_media()->domain), $this->title, ud_get_stateless_media()->name, ucfirst($this->sm_mode_required)),
+ ), 'notice');
}
- return false;
}
+ }
- /**
- * Handles saving module data.
- * Enable or disable modules from Compatibility tab.
- */
- public function save_modules() {
- if( isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'stateless_modules' && wp_verify_nonce( $_POST[ '_smnonce' ], 'wp-stateless-modules' ) ) {
- $modules = !empty( $_POST[ 'stateless-modules' ] ) ? $_POST[ 'stateless-modules' ] : array();
- $modules = array_map( 'sanitize_text_field', $modules);
- $modules = apply_filters( 'stateless::modules::save', $modules );
-
- if( is_network_admin() ) {
- update_site_option( 'stateless-modules', $modules );
- } else {
- update_option( 'stateless-modules', $modules, true );
- }
- wp_redirect( $_POST[ '_wp_http_referer' ] );
+ /**
+ * @return bool
+ */
+ public function enable_compatibility() {
+
+ if (is_network_admin()) {
+ $modules = get_site_option('stateless-modules', array());
+ if (empty($modules[$this->id]) || $modules[$this->id] != 'true') {
+ $modules[$this->id] = 'true';
+ update_site_option('stateless-modules', $modules, true);
+ }
+ } else {
+ $modules = get_option('stateless-modules', array());
+ if (empty($modules[$this->id]) || $modules[$this->id] != 'true') {
+ $modules[$this->id] = 'true';
+ update_option('stateless-modules', $modules, true);
}
}
+
+ return true;
}
-}
\ No newline at end of file
+ /**
+ * add_webp_mime
+ * @param $t
+ * @param $user
+ * @return mixed
+ */
+ public function add_webp_mime($t, $user) {
+ $t['webp'] = 'image/webp';
+ return $t;
+ }
+}
diff --git a/lib/classes/class-module.php b/lib/classes/class-module.php
new file mode 100644
index 000000000..1fe19699f
--- /dev/null
+++ b/lib/classes/class-module.php
@@ -0,0 +1,138 @@
+ '', 'self' => '', 'title' => '', 'enabled' => false, 'description' => '', 'is_constant' => false, 'is_network' => false, 'is_plugin_active' => false,));
+ }
+
+ /**
+ * Return all the registered modules.
+ * Used in admin_init in bootstrap class as localize_script.
+ */
+ public static function get_modules() {
+ return self::$modules;
+ }
+
+ /**
+ * Return all the registered modules.
+ * Used in admin_init in bootstrap class as localize_script.
+ */
+ public static function get_module($id) {
+ if (!empty(self::$modules[$id])) {
+ return self::$modules[$id];
+ }
+ return false;
+ }
+
+ /**
+ * Handles saving module data.
+ * Enable or disable modules from Compatibility tab.
+ */
+ public function save_modules() {
+ if (isset($_POST['action']) && $_POST['action'] == 'stateless_modules' && wp_verify_nonce($_POST['_smnonce'], 'wp-stateless-modules')) {
+ $modules = !empty($_POST['stateless-modules']) ? $_POST['stateless-modules'] : array();
+ $modules = apply_filters('stateless::modules::save', $modules);
+
+ if (is_network_admin()) {
+ update_site_option('stateless-modules', $modules);
+ } else {
+ update_option('stateless-modules', $modules, true);
+ }
+ wp_redirect($_POST['_wp_http_referer']);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/lib/classes/compatibility/ICompatibility.php b/lib/classes/compatibility/ICompatibility.php
deleted file mode 100644
index 3d0998b4c..000000000
--- a/lib/classes/compatibility/ICompatibility.php
+++ /dev/null
@@ -1,269 +0,0 @@
- New Constant, ...]
- * ['WP_STATELESS_MEDIA_ON_FLY' => 'WP_STATELESS_DYNAMIC_IMAGE_SUPPORT']
- */
- protected $constant = '';
- protected $enabled = false;
- protected $description = '';
- protected $plugin_file = null;
- protected $theme_name = null;
- protected $first_party = false;
- protected $non_library_sync = false;
- protected $server_constant = false;
- protected $sm_mode_required = '';
- protected $sm_mode_not_supported = [];
-
- public function __construct() {
- $this->init();
- }
-
- /**
- * Checking whether the plugin is active or not.
- * If the plugin_file is specified then check whether plugin is active or not.
- * We can't use is_plugin_active function because it's defined later in init.
- * By default return true.
- *
- * @todo caching.
- */
- public function is_plugin_active() {
- if (!empty($this->theme_name)) {
- $theme = wp_get_theme();
- if ($theme->Name == $this->theme_name) {
- return true;
- }
-
- $parent_theme = $theme->parent();
- if (is_a($parent_theme, 'WP_Theme') && $parent_theme->Name == $this->theme_name) {
- return true;
- }
-
- return false;
- }
-
- if (!empty($this->plugin_file)) {
- // Converting string to array for foreach
- if (is_string($this->plugin_file)) {
- $this->plugin_file = array($this->plugin_file);
- }
-
- // If multisite then check if plugin is network active
- if (is_multisite()) {
- $active_plugins = (array)get_site_option('active_sitewide_plugins');
- foreach ($this->plugin_file as $plugin_file) {
- if (isset($active_plugins[$plugin_file])) {
- return true;
- }
- }
-
- // If we are in network admin then return, unless it will get data from main site.
- if (is_network_admin()) {
- return false;
- }
- }
-
- $active_plugins = (array)get_option('active_plugins', array());
- foreach ($this->plugin_file as $plugin_file) {
- if (in_array($plugin_file, $active_plugins)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * If server constant is set - check if exist it on global $_SERVER
- */
- if (!empty( $this->server_constant )) {
- if ( isset($_SERVER[ $this->server_constant ]) ) {
- return true;
- }
- return false;
- }
-
- return true;
- }
-
- /**
- * Checking whether current mode is supported.
- * By default return true.
- *
- * @todo caching.
- */
- public function is_mode_supported () {
- $sm_mode = isset($_POST['sm']['mode']) ? sanitize_text_field($_POST['sm']['mode']) : ud_get_stateless_media()->get( 'sm.mode' );
- if ( in_array( $sm_mode, $this->sm_mode_not_supported ) ) {
- return false;
- }
- return true;
- }
-
- /**
- * Initialize the module
- * Check whether plugin is active or not.
- * Register module.
- *
- * Add action for sm::module::init hook for module_init, which is fired(do_action) on Bootstrap::init()
- */
- public function init() {
- $is_constant = false;
- $is_network_override = false;
- $sm_mode = isset($_POST['sm']['mode']) ? $_POST['sm']['mode'] : ud_get_stateless_media()->get( 'sm.mode' );
- if (is_network_admin()) {
- $this->enabled = null;
- }
-
- if (is_array($this->constant)) {
- foreach ($this->constant as $old_const => $new_const) {
- if (defined($new_const)) {
- $is_constant = true;
- $this->enabled = constant($new_const);
- break;
- }
- if (is_string($old_const) && defined($old_const)) {
- $is_constant = true;
- $this->enabled = constant($old_const);
- ud_get_stateless_media()->errors->add(array(
- 'key' => $this->id,
- 'title' => sprintf(__("%s: Deprecated Notice (%s)", ud_get_stateless_media()->domain), ud_get_stateless_media()->name, $this->title),
- 'message' => sprintf(__("%s constant is deprecated, please use %s instead.", ud_get_stateless_media()->domain), $old_const, $new_const),
- ), 'notice');
- break;
- }
- }
- } elseif (defined($this->constant)) {
- $this->enabled = constant($this->constant);
- $is_constant = true;
- }
-
- if (!$is_constant) {
- $modules = get_option('stateless-modules', array());
- if (empty($this->enabled)) {
- $this->enabled = !empty($modules[$this->id]) && $modules[$this->id] == 'true' ? true : false;
- }
- if (is_multisite()) {
- $modules = get_site_option('stateless-modules', array());
- if (is_network_admin()) {
- $this->enabled = !empty($modules[$this->id]) ? ($modules[$this->id] == 'true' ? true : false) : '';
- } elseif (!empty($modules[$this->id])) {
- $this->enabled = !empty($modules[$this->id]) ? ($modules[$this->id] == 'true' ? true : false) : '';
- $is_network_override = true;
- }
- }
- }
-
- if (!is_network_admin() && ( !$this->is_plugin_active() || !$this->is_mode_supported() )) {
- $this->enabled = 'inactive';
- }
-
- /**
- * Checking whether to show manual sync option.
- */
- if ($this->is_plugin_active() && $this->non_library_sync == true) {
- global $show_non_library_sync;
- $show_non_library_sync = true;
- }
-
- Module::register_module(array(
- 'id' => $this->id,
- 'self' => $this,
- 'title' => $this->title,
- 'enabled' => $this->enabled,
- 'description' => $this->description,
- 'is_constant' => $is_constant,
- 'is_network_override' => $is_network_override,
- 'is_plugin_active' => $this->is_plugin_active(),
- 'is_network_admin' => is_network_admin(),
- 'is_plugin' => !empty($this->plugin_file),
- 'is_theme' => !empty($this->theme_name),
- 'is_mode_supported' => $this->is_mode_supported(),
- 'mode' => ucfirst( $sm_mode )
- ));
-
- if ($this->enabled && $this->is_plugin_active() && $this->is_mode_supported()) {
- add_action('sm::module::init', array($this, 'module_init'));
- }
-
- if (!$this->enabled && !$this->first_party && $this->is_plugin_active()) {
- ud_get_stateless_media()->errors->add(array(
- 'key' => $this->id,
- 'title' => sprintf(__("%s: Compatibility for %s isn't enabled.", ud_get_stateless_media()->domain), ud_get_stateless_media()->name, $this->title),
- 'button' => __("Enable Compatibility", ud_get_stateless_media()->domain),
- 'message' => __("Please enable the compatibility to ensure the functionality will work properly between {$this->title} and WP-Stateless.", ud_get_stateless_media()->domain),
- ), 'notice');
- }
-
- /**
- * Check requires WP-Stateless mode
- */
- if ( !empty( $this->sm_mode_required ) && $this->enabled !== 'inactive' ) {
- if ( $sm_mode !== $this->sm_mode_required ) {
- ud_get_stateless_media()->errors->add( array(
- 'key' => $this->id,
- 'title' => sprintf( __( "%s: Current Mode is not compatible with %s.", ud_get_stateless_media()->domain ), ud_get_stateless_media()->name, $this->title ),
- 'message' => sprintf( __( "%s compatibility requires %s in %s mode.", ud_get_stateless_media()->domain ), $this->title, ud_get_stateless_media()->name, ucfirst( $this->sm_mode_required ) ),
- ), 'notice' );
- }
- }
- }
-
- /**
- * @return bool
- */
- public function enable_compatibility() {
-
- if (is_network_admin()) {
- $modules = get_site_option('stateless-modules', array());
- if (empty($modules[$this->id]) || $modules[$this->id] != 'true') {
- $modules[$this->id] = 'true';
- update_site_option('stateless-modules', $modules, true);
- }
- } else {
- $modules = get_option('stateless-modules', array());
- if (empty($modules[$this->id]) || $modules[$this->id] != 'true') {
- $modules[$this->id] = 'true';
- update_option('stateless-modules', $modules, true);
- }
- }
-
- return true;
- }
-
- /**
- * add_webp_mime
- * @param $t
- * @param $user
- * @return mixed
- */
- public function add_webp_mime($t, $user) {
- $t['webp'] = 'image/webp';
- return $t;
- }
- }
-
-}
\ No newline at end of file
diff --git a/lib/classes/compatibility/acf-image-crop.php b/lib/classes/compatibility/acf-image-crop.php
deleted file mode 100644
index 535f64080..000000000
--- a/lib/classes/compatibility/acf-image-crop.php
+++ /dev/null
@@ -1,107 +0,0 @@
-get( 'sm.root_dir' );
- $root_dir = apply_filters("wp_stateless_handle_root_dir", $root_dir);
- $root_dir = trim( $root_dir, '/ ' ); // Remove any forward slash and empty space.
- $data[ 'basedir' ] = ud_get_stateless_media()->get_gs_host() . '/' . $root_dir;
- $data[ 'baseurl' ] = ud_get_stateless_media()->get_gs_host() . '/' . $root_dir;
- $data[ 'url' ] = $data[ 'baseurl' ] . $data[ 'subdir' ];
- return $data;
- }
- }
-
- }
-
-}
diff --git a/lib/classes/compatibility/buddyboss.php b/lib/classes/compatibility/buddyboss.php
deleted file mode 100644
index d880ee1f2..000000000
--- a/lib/classes/compatibility/buddyboss.php
+++ /dev/null
@@ -1,48 +0,0 @@
- $r['object'],
- 'item_id' => $r['item_id'],
- 'html' => false,
- 'type' => 'full',
- ) );
- $thumb_avatar = bp_core_fetch_avatar( array(
- 'object' => $r['object'],
- 'item_id' => $r['item_id'],
- 'html' => false,
- 'type' => 'thumb',
- ) );
-
- $wp_uploads_dir = wp_get_upload_dir();
-
- $full_avatar_path = $wp_uploads_dir[ 'basedir' ] . '/' . apply_filters( 'wp_stateless_file_name', $full_avatar, false );
- $full_avatar = apply_filters( 'wp_stateless_file_name', $full_avatar, 0 );
-
- $thumb_avatar_path = $wp_uploads_dir[ 'basedir' ] . '/' . apply_filters( 'wp_stateless_file_name', $thumb_avatar, false );
- $thumb_avatar = apply_filters( 'wp_stateless_file_name', $thumb_avatar, 0 );
-
- do_action( 'sm:sync::syncFile', $full_avatar, $full_avatar_path, true, array( 'ephemeral' => false ) );
- do_action( 'sm:sync::syncFile', $thumb_avatar, $thumb_avatar_path, true, array( 'ephemeral' => false ) );
- }
-
- /**
- * Convert image url in image html to GCS URL.
- *
- * @param [type] $image_html html code for image.
- * @return void
- */
- public function bp_core_fetch_avatar( $image_html ) {
- try {
- preg_match( "/src=(?:'|\")(http.*?)(?:'|\")/", $image_html, $image_url );
- if( !empty( $image_url[ 1 ] ) ) {
- $gs_image_url = $this->bp_core_fetch_avatar_url( $image_url[ 1 ] );
- $image_html = str_replace( $image_url[ 1 ], $gs_image_url, $image_html );
- }
- } catch( \Throwable $th ) {
- //throw $th;
- }
- return $image_html;
- }
-
- /**
- * Sync then return GCS url.
- *
- * @param [type] $url image url.
- * @return void
- */
- public function bp_core_fetch_avatar_url( $url ) {
- $wp_uploads_dir = wp_get_upload_dir();
- $name = apply_filters( 'wp_stateless_file_name', $url, 0 );
- $full_avatar_path = $wp_uploads_dir[ 'basedir' ] . '/' . $name;
-
-
- $root_dir = ud_get_stateless_media()->get( 'sm.root_dir' );
- $root_dir = apply_filters("wp_stateless_handle_root_dir", $root_dir);
- $root_dir = trim( $root_dir, '/ ' ); // Remove any forward slash and empty space.
- // Making sure that we only modify url for uploads dir.
- // @todo support photo in plugins directory.
-
- if( strpos( $name, plugins_url() ) === 0 ) {
- $name = str_replace( plugins_url() . '/', '', $name );
- $name = apply_filters( 'wp_stateless_file_name', $name, 0 );
- $full_avatar_path = WP_PLUGIN_DIR . '/' . $name;
- }
-
- if( strpos( $name, "$root_dir/http" ) !== 0 && strpos( $name, "http" ) !== 0 && $root_dir !== $name ) {
- do_action( 'sm:sync::syncFile', $name, $full_avatar_path, false, array( 'ephemeral' => false ) );
- $url = ud_get_stateless_media()->get_gs_host() . '/' . $name;
- }
- return $url;
- }
-
- /**
- * Deleting avatar from GCS.
- * @param $return
- * @param $args
- * @return bool
- */
- public function delete_existing_avatar( $return, $args ) {
- if( empty( $args[ 'object' ] ) && empty( $args[ 'item_id' ] ) ) {
- return $return;
- }
-
- $full_avatar = bp_core_fetch_avatar( array( 'object' => $args[ 'object' ], 'item_id' => $args[ 'item_id' ], 'html' => false, 'type' => 'full', ) );
- $thumb_avatar = bp_core_fetch_avatar( array( 'object' => $args[ 'object' ], 'item_id' => $args[ 'item_id' ], 'html' => false, 'type' => 'thumb', ) );
-
- do_action( 'sm:sync::deleteFile', apply_filters( 'wp_stateless_file_name', $full_avatar, 0 ) );
- do_action( 'sm:sync::deleteFile', apply_filters( 'wp_stateless_file_name', $thumb_avatar, 0 ) );
-
- if( ud_get_stateless_media()->get( 'sm.mode' ) === 'ephemeral' ) {
- $return = false;
- }
-
- return $return;
- }
-
- /**
- * Sync and return GCS url for group images.
- *
- * Used as CSS background-image.
- *
- * @param [type] $return
- * @param [type] $r
- * @return void
- */
- public function bp_attachments_pre_get_attachment( $return, $r ) {
- // Return if this is a recursive call.
- if( !empty( $r[ 'recursive' ] ) ) {
- return $return;
- }
-
- try {
- $debug_backtrace = \debug_backtrace( false );
-
- // Making sure we only return GCS link if the type is url.
- if( !empty( $debug_backtrace[ 3 ][ 'args' ][ 0 ] ) && $debug_backtrace[ 3 ][ 'args' ][ 0 ] == 'url' ) {
- $r[ 'recursive' ] = true;
-
- $url = bp_attachments_get_attachment( 'url', $r );
- $name = apply_filters( 'wp_stateless_file_name', $url, 0 );
-
- $root_dir = ud_get_stateless_media()->get( 'sm.root_dir' );
- $root_dir = apply_filters("wp_stateless_handle_root_dir", $root_dir);
- $root_dir = trim( $root_dir, '/ ' ); // Remove any forward slash and empty space.
-
- if( !empty( $name ) && $root_dir . "/" != $name ) {
- $full_path = bp_attachments_get_attachment( false, $r );
- do_action( 'sm:sync::syncFile', $name, $full_path, false, array( 'ephemeral' => false ) );
- $return = ud_get_stateless_media()->get_gs_host() . '/' . $name;
- }
-
- }
- } catch( \Throwable $th ) {
- //throw $th;
- }
- return $return;
- }
-
- }
-
- }
-
-}
diff --git a/lib/classes/compatibility/divi.php b/lib/classes/compatibility/divi.php
deleted file mode 100644
index 66a56d907..000000000
--- a/lib/classes/compatibility/divi.php
+++ /dev/null
@@ -1,65 +0,0 @@
- 7, 'function' => '__construct', 'class' => 'ET_Core_PageResource' ),
- array( 'stack_level' => 7, 'function' => 'get_cache_filename', 'class' => 'ET_Builder_Element' )
- );
-
- /**
- * Initialize compatibility module
- * @param $sm
- */
- public function module_init( $sm ) {
- // exclude randomize_filename from export
- if( !empty( $_GET[ 'et_core_portability' ] ) || wp_doing_ajax() && ( !empty( $_POST[ 'action' ] )
- && $_POST[ 'action' ] == 'et_core_portability_export' ) || ( !empty( $_POST[ 'et_core_portability_export' ] )
- && $_POST[ 'et_core_portability_export' ] == 'et_core_portability_export' ) ) {
- remove_filter( 'sanitize_file_name', array( "wpCloud\StatelessMedia\Utility", 'randomize_filename' ), 10 );
- }
-
- // maybe skip cache busting
- add_filter( 'stateless_skip_cache_busting', array( $this, 'maybe_skip_cache_busting' ), 10, 2 );
- }
-
- /**
- * Maybe skip cache busting
- * @param $null
- * @param $filename
- * @return bool | string
- */
- public function maybe_skip_cache_busting( $null, $filename ) {
- $callstack = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 8 );
- if( Utility::isCallStackMatches( $callstack, $this->cache_busting_disable_conditions ) ) return $filename;
- return $null;
- }
-
- }
-
- }
-
-}
diff --git a/lib/classes/compatibility/dynamic-image-support.php b/lib/classes/compatibility/dynamic-image-support.php
index c674d10df..ffe2b3ad2 100644
--- a/lib/classes/compatibility/dynamic-image-support.php
+++ b/lib/classes/compatibility/dynamic-image-support.php
@@ -1,4 +1,5 @@
'WP_STATELESS_DYNAMIC_IMAGE_SUPPORT' ];
+ protected $constant = ['WP_STATELESS_MEDIA_ON_FLY' => 'WP_STATELESS_DYNAMIC_IMAGE_SUPPORT'];
protected $description = 'Upload image thumbnails generated by your theme and plugins that do not register media objects with the media library. This could be significantly impact performance negatively.';
protected $first_party = true;
public function __construct() {
- $modules = get_option( 'stateless-modules', array() );
+ $modules = get_option('stateless-modules', array());
- if( empty( $modules[ $this->id ] ) ) {
+ if (empty($modules[$this->id])) {
// Legacy settings
- $this->enabled = get_option( 'sm_on_fly', false );
+ $this->enabled = get_option('sm_on_fly', false);
}
$this->init();
@@ -33,16 +34,16 @@ public function __construct() {
/**
* @param $sm
*/
- public function module_init( $sm ) {
+ public function module_init($sm) {
/**
* On Google App Engine not working
*/
- if ( isset($_SERVER["GAE_VERSION"]) ) return;
+ if (isset($_SERVER["GAE_VERSION"])) return;
/**
* Handle any other on fly generated media
* 7d23984e Anton Korotkov, 2 years ago (February 19th, 2016 9:02am) new options added
*/
- add_filter( 'image_make_intermediate_size', array( $this, 'handle_on_fly' ) );
+ add_filter('image_make_intermediate_size', array($this, 'handle_on_fly'));
}
/**
@@ -51,21 +52,21 @@ public function module_init( $sm ) {
* @param $file
* @return mixed
*/
- public function handle_on_fly( $file ) {
+ public function handle_on_fly($file) {
$client = ud_get_stateless_media()->get_client();
$upload_dir = wp_upload_dir();
- $file_path = str_replace( trailingslashit( $upload_dir[ 'path' ] ), '', $file );
- $file_info = @getimagesize( $file );
- $mimeType = wp_check_filetype( $file );
+ $file_path = str_replace(trailingslashit($upload_dir['path']), '', $file);
+ $file_info = @getimagesize($file);
+ $mimeType = wp_check_filetype($file);
if ($file_info) {
$_metadata = array(
'width' => $file_info[0],
'height' => $file_info[1],
'object-id' => 'unknown', // we really don't know it
- 'source-id' => md5( $file . ud_get_stateless_media()->get( 'sm.bucket' ) ),
- 'file-hash' => md5( $file )
+ 'source-id' => md5($file . ud_get_stateless_media()->get('sm.bucket')),
+ 'file-hash' => md5($file)
);
}
@@ -80,9 +81,6 @@ public function handle_on_fly( $file ) {
return $file;
}
-
}
-
}
-
}
diff --git a/lib/classes/compatibility/easy-digital-downloads.php b/lib/classes/compatibility/easy-digital-downloads.php
deleted file mode 100644
index 7c13699fb..000000000
--- a/lib/classes/compatibility/easy-digital-downloads.php
+++ /dev/null
@@ -1,144 +0,0 @@
-get_gs_host() ) ) {
- try {
- $file_extension = edd_get_file_extension( $requested_file );
- $ctype = edd_get_file_ctype( $file_extension );
-
- header( "Content-Type: $ctype" );
- header( "Content-Transfer-Encoding: Binary" );
- header( "Content-Description: File Transfer" );
- header( "Content-disposition: attachment; filename=\"" . apply_filters( 'edd_requested_file_name', basename( $requested_file ) ) . "\"" );
- readfile( $requested_file );
- exit;
- } catch( Exception $e ) {
- if( wp_redirect( $requested_file ) ) {
- exit;
- }
- }
- }
- }
-
- /**
- * EDD Front-end Submission Author Avatar
- *
- * @param $url
- * @param $ID
- * @return string
- */
- public function wp_get_attachment_url( $url, $ID ) {
- global $wp_current_filter;
-
- // Verifying that the wp_get_attachment_url is called from EDD Front-end Submission.
- // The flow of function call
- // save_form_frontend() > save_field_values() > save_field() >
- // save_field_frontend() > fes_update_avatar() > wp_get_image_editor()
- if( in_array( 'wp_ajax_fes_submit_profile_form', $wp_current_filter ) ) {
- $uploads = wp_get_upload_dir();
- $meta_data = wp_get_attachment_metadata( $ID );
-
- if( !empty( $meta_data[ 'file' ] ) && false === $uploads[ 'error' ] ) {
- $absolutePath = $uploads[ 'basedir' ] . "/" . $meta_data[ 'file' ];
-
- if( !file_exists( $absolutePath ) ) {
- $this->client = ud_get_stateless_media()->get_client();
- if( $this->client && !is_wp_error( $this->client ) ) {
- $this->client->get_media( $meta_data[ 'file' ], true, $absolutePath );
- }
- }
-
- if( file_exists( $absolutePath ) ) {
- $url = $uploads[ 'baseurl' ] . "/" . $meta_data[ 'file' ];
- }
- }
- }
- return $url;
- }
-
- /**
- * Change Upload BaseURL when called from fes_get_attachment_id_from_url function.
- * Unless fes_get_attachment_id_from_url function won't be able to return attachment id.
- * @param $data
- * @return mixed
- */
- public function upload_dir( $data ) {
- if( $this->hook_from_fes() ) {
- $root_dir = ud_get_stateless_media()->get( 'sm.root_dir' );
- $root_dir = apply_filters("wp_stateless_handle_root_dir", $root_dir);
- $data[ 'baseurl' ] = ud_get_stateless_media()->get_gs_host() . '/' . $root_dir;
- }
- return $data;
- }
-
- /**
- * Determine where we hook from
- * We need to do this only for fes_get_attachment_id_from_url() function
- *
- * @return bool
- */
- private function hook_from_fes() {
- $call_stack = debug_backtrace();
- if( !empty( $call_stack[ 5 ][ 'function' ] ) && $call_stack[ 5 ][ 'function' ] == 'fes_get_attachment_id_from_url' ) {
- return true;
- }
-
- // Extra layer of condition to be sure
- if( !empty( $call_stack ) && is_array( $call_stack ) ) {
- foreach( $call_stack as $step ) {
- if( $step[ 'function' ] == 'getURLsAndPATHs' && strpos( $step[ 'file' ], 'wp-short-pixel' ) ) {
- return true;
- }
- }
- }
-
- return false;
- }
- }
-
- }
-
-}
diff --git a/lib/classes/compatibility/elementor.php b/lib/classes/compatibility/elementor.php
deleted file mode 100644
index 7d3a32488..000000000
--- a/lib/classes/compatibility/elementor.php
+++ /dev/null
@@ -1,158 +0,0 @@
-get('sm.mode'), ['disabled', 'backup'])) {
- $url = ud_get_stateless_media()->get_gs_host() . '/' . $name;
- }
- }
- }
- } catch (\Exception $e) {
- // @todo maybe log the exception.
- }
- // We are in filter so need to return the passed value.
- return $url;
- }
-
- /**
- * To regenerate/delete files click Regenerate Files in
- * Elementor >> Tools >> General >> Regenerate CSS
- * All files will be deleted from GCS.
- * And will be copied to GCS again on next page view.
- */
- public function delete_elementor_files() {
- do_action('sm:sync::deleteFiles', 'elementor/');
- }
-
- /**
- * Delete GCS file on update/delete post.
- * @param $post_ID
- * @param null $post
- * @param null $update
- */
- public function delete_css_files($post_ID, $post = null, $update = null) {
- if ($update || current_action() === 'deleted_post') {
- $post_css = new \Elementor\Core\Files\CSS\Post($post_ID);
-
- // elementor/ css/ 'post-' . $post_id . '.css'
- $name = $post_css::UPLOADS_DIR . $post_css::DEFAULT_FILES_DIR . $post_css->get_file_name();
- $name = apply_filters('wp_stateless_file_name', $name, 0);
- do_action('sm:sync::deleteFile', $name);
- }
- }
-
- /**
- * Delete elementor global css file when global style is updated on Elementor Editor.
- * @param $success_response_data
- * @param $id
- * @param $data
- * @return mixed
- */
- public function delete_global_css($success_response_data, $id, $data) {
- try {
- $post_css = new \Elementor\Core\Files\CSS\Global_CSS('global.css');
- // elementor/ css/ 'global.css'
- $name = $post_css::UPLOADS_DIR . $post_css::DEFAULT_FILES_DIR . $post_css->get_file_name();
- $name = apply_filters('wp_stateless_file_name', $name, 0);
- do_action('sm:sync::deleteFile', $name);
- } catch (\Exception $e) {
- // @todo maybe log the exception.
- }
- // We are in filter so need to return the passed value.
- return $success_response_data;
- }
-
- /**
- * @param $name
- * @param $absolutePath
- */
- public function filter_css_file($name, $absolutePath) {
- if ($upload_data = wp_upload_dir() && file_exists($absolutePath)) {
- try {
- $content = file_get_contents($absolutePath);
-
- if (!empty($upload_data['baseurl']) && !empty($content)) {
- $baseurl = preg_replace('/https?:\/\//', '', $upload_data['baseurl']);
- $root_dir = trim(ud_get_stateless_media()->get('sm.root_dir'), '/ '); // Remove any forward slash and empty space.
- $root_dir = apply_filters("wp_stateless_handle_root_dir", $root_dir);
- $root_dir = !empty($root_dir) ? $root_dir . '/' : '';
- $image_host = ud_get_stateless_media()->get_gs_host() . $root_dir;
- $file_ext = ud_get_stateless_media()->replaceable_file_types();
-
- preg_match_all('/(https?:\/\/' . str_replace('/', '\/', $baseurl) . ')\/(.+?)(' . $file_ext . ')/i', $content, $matches);
- if (!empty($matches)) {
- foreach ($matches[0] as $key => $match) {
- $id = attachment_url_to_postid($match);
- if (!empty($id)) {
- Utility::add_media(null, $id, true);
- }
- }
- }
-
- $content = preg_replace('/(https?:\/\/' . str_replace('/', '\/', $baseurl) . ')\/(.+?)(' . $file_ext . ')/i', $image_host . '/$2$3', $content);
- file_put_contents($absolutePath, $content);
- preg_match('/post-(\d+).css/', $name, $match);
-
- if (!empty($match[1])) {
- $_elementor_css = get_post_meta($match[1], '_elementor_css', true);
- if (!empty($_elementor_css)) {
- $_elementor_css['time'] = time();
- }
- }
- }
- } catch (\Exception $e) {
- }
- }
- }
- }
- }
-}
diff --git a/lib/classes/compatibility/ewww.php b/lib/classes/compatibility/ewww.php
deleted file mode 100644
index adcf3cf18..000000000
--- a/lib/classes/compatibility/ewww.php
+++ /dev/null
@@ -1,68 +0,0 @@
- false, 'download' => true, 'use_root' => true ) );
- }
-
- /**
- * If image size not exist then upload it to GS.
- *
- * @param $file
- * @param $type
- * @param $fullsize
- */
- public function post_optimization( $file, $type, $fullsize ) {
- // wp_stateless_file_name filter will remove the basedir from the path and prepend with root dir.
- $name = apply_filters( 'wp_stateless_file_name', $file );
- do_action( 'sm:sync::syncFile', $name, $file, true, array( 'use_root' => true ) );
-
-
- // if($fullsize && file_exists($file . '.bak'))
- // do_action( 'sm:sync::syncFile', $name . '.bak', $file . '.bak', true);
-
- if( file_exists( $file . '.webp' ) ) {
- add_filter( 'upload_mimes', array( $this, 'add_webp_mime' ), 10, 2 );
- do_action( 'sm:sync::syncFile', $name . '.webp', $file . '.webp', true, array( 'use_root' => true ) );
- remove_filter( 'upload_mimes', array( $this, 'add_webp_mime' ), 10 );
- }
- }
-
- }
-
- }
-
-}
diff --git a/lib/classes/compatibility/google-app-engine.php b/lib/classes/compatibility/google-app-engine.php
index 05398efc6..7fefae956 100644
--- a/lib/classes/compatibility/google-app-engine.php
+++ b/lib/classes/compatibility/google-app-engine.php
@@ -1,4 +1,5 @@
'WP_STATELESS_COMPATIBILITY_GAE'];
@@ -19,7 +20,7 @@ class GoogleAppEngine extends ICompatibility {
protected $server_constant = 'GAE_VERSION';
protected $sm_mode_required = 'stateless';
- public function __construct(){
+ public function __construct() {
$modules = get_option('stateless-modules', array());
if (empty($modules[$this->id])) {
@@ -30,13 +31,8 @@ public function __construct(){
$this->init();
}
- public function module_init($sm){
-
+ public function module_init($sm) {
}
-
-
}
-
}
-
}
diff --git a/lib/classes/compatibility/gravity-forms-signature.php b/lib/classes/compatibility/gravity-forms-signature.php
deleted file mode 100644
index 81234cf75..000000000
--- a/lib/classes/compatibility/gravity-forms-signature.php
+++ /dev/null
@@ -1,109 +0,0 @@
- $value) {
- if($value['function'] == 'get_signature_url' && rgar($value, 'class') == 'GFSignature'){
- $folder = \GFSignature::get_signatures_folder();
- $name = $value['args'][0];
- $file_path = $folder . $name . '.png';
- $name = apply_filters( 'wp_stateless_file_name', $file_path);
- do_action( 'sm:sync::syncFile', $name, $file_path);
- $url = ud_get_stateless_media()->get_gs_host() . '/' . $name;
- break;
- }
- }
- } catch (\Throwable $th) {
- //throw $th;
- }
- return $url;
- }
-
- /**
- * Deleting signature file from GCS.
- */
- public function delete_signature($return, $form, $lead_id, $field_id){
- try {
- $lead = \RGFormsModel::get_lead( $lead_id );
- $folder = \GFSignature::get_signatures_folder();
-
- $name = rgar( $lead, $field_id );
- $file_path = $folder . $name;
-
- $name = apply_filters( 'wp_stateless_file_name', $file_path);
- do_action( 'sm:sync::deleteFile', $name);
- } catch (\Throwable $th) {
- //throw $th;
- }
- return $return;
- }
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/lib/classes/compatibility/gravity-forms.php b/lib/classes/compatibility/gravity-forms.php
deleted file mode 100644
index 3ffde21b6..000000000
--- a/lib/classes/compatibility/gravity-forms.php
+++ /dev/null
@@ -1,276 +0,0 @@
-plugin_version = \GFForms::$version;
- }
- add_filter( 'gform_save_field_value', array($this, 'gform_save_field_value'), 10, 5 );
- add_filter( 'stateless_skip_cache_busting', array($this, 'skip_cache_busting'), 10, 2 );
-
- do_action('sm:sync::register_dir', '/gravity_forms/');
- add_action( 'sm::synced::nonMediaFiles', array($this, 'modify_db'), 10, 3);
- add_action( 'gform_file_path_pre_delete_file', array($this, 'gform_file_path_pre_delete_file'), 10, 2);
- }
-
- /**
- * On gform save field value sync file to GCS and alter the file url to GCS link.
- * @param $value
- * @param $lead
- * @param $field
- * @param $form
- * @param $input_id
- * @return array|false|mixed|string
- */
- public function gform_save_field_value( $value, $lead, $field, $form, $input_id ) {
- if(empty($value)) return $value;
-
- if ( empty($this->plugin_version) && class_exists('GFForms') ) {
- $this->plugin_version = \GFForms::$version;
- }
-
- $type = \GFFormsModel::get_input_type($field);
- if($type == 'fileupload'){
- $dir = wp_upload_dir();
-
- if ( $field->multipleFiles ) {
- $value = json_decode( $value );
- }
- else{
- $value = array($value);
- }
-
- foreach($value as $k => $v){
- if(empty($v)) continue;
- $position = strpos($v, 'gravity_forms/');
-
- if( $position !== false ){
- $name = substr($v, $position);
- $absolutePath = $dir['basedir'] . '/' . $name;
- $name = apply_filters( 'wp_stateless_file_name', $name, 0);
- // doing sync
- do_action( 'sm:sync::syncFile', $name, $absolutePath);
- $value[$k] = ud_get_stateless_media()->get_gs_host() . '/' . $name;
- // Todo add filter.
- }
- }
-
- if ( $field->multipleFiles ) {
- $value = json_encode( $value );
- }
- else{
- $value = array_pop($value);
- }
- }
- else if($type == 'post_image'){
- add_action( 'gform_after_create_post', function($post_id, $lead, $form) use ($value, $field){
- global $wpdb;
- $dir = wp_upload_dir();
- $lead_detail_id = $lead['id'];
- $gf_upload_root = \GFFormsModel::get_upload_root();
- $gf_upload_url_root = \GFFormsModel::get_upload_url_root();
- $lead_detail_table = \GFFormsModel::get_lead_details_table_name();
-
- $position = strpos($value, 'gravity_forms/');
- $_name = substr($value, $position); // gravity_forms/
- $arr_name = explode('|:|', $_name);
- $name = rgar( $arr_name, 0 ); // Removed |:| from end of the url.
-
- // doing sync
- $absolutePath = $dir['basedir'] . '/' . $name;
- $name = apply_filters( 'wp_stateless_file_name', $name, 0);
- do_action( 'sm:sync::syncFile', $name, $absolutePath);
-
- $value = ud_get_stateless_media()->get_gs_host() . '/' . $name;
- // Todo add filter.
- if(version_compare($this->plugin_version, '2.3', '<')){ // older version
- $result = $wpdb->update( $lead_detail_table, array( 'value' => $value ), array( 'lead_id' => $lead_detail_id, 'form_id' => $form['id'], 'field_number' => $field['id'], ), array( '%s' ), array( '%d' ) );
- }
- else{ // New version
- $result = $wpdb->update( \GFFormsModel::get_entry_meta_table_name(), array( 'meta_value' => $value ), array( 'entry_id' => $lead_detail_id, 'form_id' => $form['id'], 'meta_key' => $field['id'], ), array( '%s' ), array( '%d' ) );
- }
- }, 10, 3);
- }
- return $value;
- }
-
- /**
- * Modify value in database after sync from Sync tab.
- * @param $file_path
- * @param $fullsizepath
- * @param $media
- * @throws \Exception
- */
- public function modify_db( $file_path, $fullsizepath, $media ){
- global $wpdb;
- $wpdb->hide_errors();
- $position = strpos($file_path, 'gravity_forms/');
- $is_index = strpos($file_path, 'index.html');
- $is_htaccess = strpos($file_path, '.htaccess');
- $root_dir = ud_get_stateless_media()->get( 'sm.root_dir' );
- $root_dir = apply_filters("wp_stateless_handle_root_dir", $root_dir);
-
- if ( empty($this->plugin_version) && class_exists('GFForms') ) {
- $this->plugin_version = \GFForms::$version;
- }
-
- $gf_val_column = 'meta_value';
- $gf_table = \GFFormsModel::get_entry_meta_table_name();
- if(version_compare($this->plugin_version, '2.3', '<')){
- $gf_val_column = 'value';
- }
-
- if( $position !== false && !$is_index ){
- $dir = wp_upload_dir();
- $file_path = trim($file_path, '/');
- //EDIT: Use base file name since the URL in the DB could be encoded with in an array
- $file_single = basename($file_path);
-
- // Todo add filter.
-
- // We need to get results from db because of post image field have extra data at the end of url.
- // Also url could be array and json encoded.
- // Unless we would loss those data.
- // xyz.jpg|:|tile|:|description|:|
- $query = sprintf(
- "
- SELECT id, {$gf_val_column} AS value FROM {$gf_table}
- WHERE {$gf_val_column} like '%s';
- "
- , '%' . $file_single . '%'
- );
- $results = $wpdb->get_results( $query );
- $this->throw_db_error();
-
- foreach ($results as $result) {
- $position = false;
- //EDIT: Check if value is json encoded, if so, cycle through array and replace URLs.
- $value = json_decode($result->value);
-
- if (json_last_error() === 0) {
- foreach( $value as $k => $v ){
- $position = strpos($v, $dir['baseurl']);
- if($position !== false){
- $value[$k] = str_replace($dir['baseurl'], ud_get_stateless_media()->get_gs_host() . '/' . $root_dir, $v );
- }
- }
-
- $result->value = json_encode($value);
- }
- else{
- $position = strpos($result->value, $dir['baseurl']);
- $result->value = str_replace($dir['baseurl'], ud_get_stateless_media()->get_gs_host() . '/' . $root_dir, $result->value);
- }
-
- if($position !== false){
- $query = sprintf(
- "
- UPDATE {$gf_table}
- SET {$gf_val_column} = '%s'
- WHERE id = %d
- "
- , $result->value, $result->id
- );
- $entries = $wpdb->get_results( $query );
- $this->throw_db_error();
- }
-
- }
- }
- }
-
- /**
- * Throw db error from last db query.
- * We need to throw db error instead of just printing,
- * so that we can catch them in ajax request.
- */
- function throw_db_error(){
-
- global $wpdb;
- $wpdb->show_errors();
-
- if($wpdb->last_error !== '' && wp_doing_ajax()) :
- ob_start();
- $wpdb->print_error();
- $error = ob_get_clean();
- if($error){
- throw new \Exception( $error );
- }
- endif;
-
- }
-
- /**
- * Delete file from GCS
- * @param $file_path
- * @param $url
- * @return string
- */
- public function gform_file_path_pre_delete_file( $file_path, $url ){
- $file_path = wp_normalize_path($file_path);
- $gs_host = wp_normalize_path( ud_get_stateless_media()->get_gs_host() );
- $dir = wp_upload_dir();
- $is_stateless = strpos($file_path, $gs_host);
-
- // If the url is a GCS link then remove it from GCS.
- if($is_stateless !== false){
- $gs_name = substr($file_path, strpos($file_path, '/gravity_forms/'));
- $file_path = $dir['basedir'] . $gs_name;
- $gs_name = apply_filters( 'wp_stateless_file_name', $gs_name, 0);
-
- $client = ud_get_stateless_media()->get_client();
- if( !is_wp_error( $client ) ) {
- $client->remove_media( trim($gs_name, '/') );
- }
- }
-
- return $file_path;
- }
-
- /**
- * @param $return
- * @param $filename
- * @return mixed
- */
- public function skip_cache_busting($return, $filename){
- $backtrace = debug_backtrace(false, 8);
- if(
- !empty($backtrace[7]['class']) &&
- $backtrace[7]['class'] == 'GFExport' &&
- (
- $backtrace[7]['function'] == 'write_file' ||
- $backtrace[7]['function'] == 'ajax_download_export'
- )
- ){
- return $filename;
- }
- return $return;
- }
- }
-
- }
-
-}
diff --git a/lib/classes/compatibility/imagify.php b/lib/classes/compatibility/imagify.php
index a21b48cac..f3eb56f26 100644
--- a/lib/classes/compatibility/imagify.php
+++ b/lib/classes/compatibility/imagify.php
@@ -1,4 +1,5 @@
is_extension_supported() ) {
+ $imagify = new \Imagify_Attachment($attachment_id);
+ if (is_callable(array($imagify, 'is_extension_supported'))) {
+ if (!$imagify->is_extension_supported()) {
return false;
}
- } elseif( function_exists( 'imagify_is_attachment_mime_type_supported' ) ) {
+ } elseif (function_exists('imagify_is_attachment_mime_type_supported')) {
// Use `imagify_is_attachment_mime_type_supported( $attachment_id )`.
- if( !imagify_is_attachment_mime_type_supported( $attachment_id ) ) {
+ if (!imagify_is_attachment_mime_type_supported($attachment_id)) {
return false;
}
- } elseif( !wp_attachment_is_image( $attachment_id ) ) {
+ } elseif (!wp_attachment_is_image($attachment_id)) {
return false;
}
@@ -91,23 +92,23 @@ public function skip_add_media( $return, $metadata, $attachment_id, $force = fal
* @return bool
* @author palant@ud
*/
- public function skip_remove_media( $return, $metadata, $attachment_id, $force = false, $args = array() ) {
+ public function skip_remove_media($return, $metadata, $attachment_id, $force = false, $args = array()) {
global $doing_manual_sync;
- if( $force || $doing_manual_sync || !get_imagify_option( 'auto_optimize' ) ) return false;
+ if ($force || $doing_manual_sync || !get_imagify_option('auto_optimize')) return false;
- $imagify = new \Imagify\Optimization\File( get_attached_file( $attachment_id ) );
+ $imagify = new \Imagify\Optimization\File(get_attached_file($attachment_id));
- if( is_callable( array( $imagify, 'is_supported' ) ) ) {
- if( !$imagify->is_supported( imagify_get_mime_types() ) ) {
+ if (is_callable(array($imagify, 'is_supported'))) {
+ if (!$imagify->is_supported(imagify_get_mime_types())) {
return false;
}
- } elseif( function_exists( 'imagify_is_attachment_mime_type_supported' ) ) {
+ } elseif (function_exists('imagify_is_attachment_mime_type_supported')) {
// Use `imagify_is_attachment_mime_type_supported( $attachment_id )`.
- if( !imagify_is_attachment_mime_type_supported( $attachment_id ) ) {
+ if (!imagify_is_attachment_mime_type_supported($attachment_id)) {
return false;
}
- } elseif( !wp_attachment_is_image( $attachment_id ) ) {
+ } elseif (!wp_attachment_is_image($attachment_id)) {
return false;
}
@@ -120,38 +121,37 @@ public function skip_remove_media( $return, $metadata, $attachment_id, $force =
* @param $attachment_id
* @return mixed
*/
- public function fix_missing_file( $attachment_id ) {
+ public function fix_missing_file($attachment_id) {
/**
* If mode is ephemeral then we change it to cdn in order images not being deleted before optimization
* Remember that we changed mode via global var
*/
- if( ud_get_stateless_media()->get( 'sm.mode' ) == 'ephemeral' ) {
- ud_get_stateless_media()->set( 'sm.mode', 'cdn' );
+ if (ud_get_stateless_media()->get('sm.mode') == 'ephemeral') {
+ ud_get_stateless_media()->set('sm.mode', 'cdn');
global $wp_stateless_imagify_mode;
$wp_stateless_imagify_mode = 'ephemeral';
}
$upload_basedir = wp_upload_dir();
- $upload_basedir = trailingslashit( $upload_basedir[ 'basedir' ] );
- $meta_data = wp_get_attachment_metadata( $attachment_id );
- $file = $upload_basedir . $meta_data[ 'file' ];
+ $upload_basedir = trailingslashit($upload_basedir['basedir']);
+ $meta_data = wp_get_attachment_metadata($attachment_id);
+ $file = $upload_basedir . $meta_data['file'];
/**
* Try to get all missing files from GCS
*/
- if( !file_exists( $file ) ) {
- ud_get_stateless_media()->get_client()->get_media( apply_filters( 'wp_stateless_file_name', $meta_data[ 'file' ] ), true, $file );
+ if (!file_exists($file)) {
+ ud_get_stateless_media()->get_client()->get_media(apply_filters('wp_stateless_file_name', $meta_data['file']), true, $file);
}
- if( !empty( $meta_data[ 'sizes' ] ) && is_array( $meta_data[ 'sizes' ] ) ) {
- $upload_basedir = trailingslashit( dirname( $file ) );
- foreach( $meta_data[ 'sizes' ] as $image ) {
- if( !empty( $image[ 'gs_name' ] ) && !file_exists( $file = $upload_basedir . $image[ 'file' ] ) ) {
- ud_get_stateless_media()->get_client()->get_media( apply_filters( 'wp_stateless_file_name', $image[ 'gs_name' ] ), true, $file );
+ if (!empty($meta_data['sizes']) && is_array($meta_data['sizes'])) {
+ $upload_basedir = trailingslashit(dirname($file));
+ foreach ($meta_data['sizes'] as $image) {
+ if (!empty($image['gs_name']) && !file_exists($file = $upload_basedir . $image['file'])) {
+ ud_get_stateless_media()->get_client()->get_media(apply_filters('wp_stateless_file_name', $image['gs_name']), true, $file);
}
}
}
-
}
/**
@@ -163,38 +163,38 @@ public function fix_missing_file( $attachment_id ) {
* )
* @param $id
*/
- public function after_imagify_optimize_attachment( $id ) {
+ public function after_imagify_optimize_attachment($id) {
/**
* Restore ephemeral mode if needed
*/
global $wp_stateless_imagify_mode;
- if( $wp_stateless_imagify_mode == 'ephemeral' ) {
- ud_get_stateless_media()->set( 'sm.mode', 'ephemeral' );
+ if ($wp_stateless_imagify_mode == 'ephemeral') {
+ ud_get_stateless_media()->set('sm.mode', 'ephemeral');
}
- $metadata = wp_get_attachment_metadata( $id );
- ud_get_stateless_media()->add_media( $metadata, $id, true );
+ $metadata = wp_get_attachment_metadata($id);
+ ud_get_stateless_media()->add_media($metadata, $id, true);
// Sync backup file with GCS
- if( current_filter() == 'after_imagify_optimize_attachment' ) {
+ if (current_filter() == 'after_imagify_optimize_attachment') {
/**
* If mode is ephemeral then we change it to cdn in order images not being deleted before optimization
* Remember that we changed mode via global var
* @todo remove if Imagify implement "imagify_has_backup" filter.
*/
- if( ud_get_stateless_media()->get( 'sm.mode' ) == 'ephemeral' ) {
- ud_get_stateless_media()->set( 'sm.mode', 'cdn' );
+ if (ud_get_stateless_media()->get('sm.mode') == 'ephemeral') {
+ ud_get_stateless_media()->set('sm.mode', 'cdn');
global $wp_stateless_imagify_mode;
$wp_stateless_imagify_mode = 'ephemeral';
}
- $file_path = get_attached_file( $id );
- $backup_path = get_imagify_attachment_backup_path( $file_path );
- if( file_exists( $backup_path ) ) {
- $overwrite = apply_filters( 'imagify_backup_overwrite_backup', false, $file_path, $backup_path );
+ $file_path = get_attached_file($id);
+ $backup_path = get_imagify_attachment_backup_path($file_path);
+ if (file_exists($backup_path)) {
+ $overwrite = apply_filters('imagify_backup_overwrite_backup', false, $file_path, $backup_path);
// wp_stateless_file_name filter will remove the basedir from the path and prepend with root dir.
- $name = apply_filters( 'wp_stateless_file_name', $backup_path );
- do_action( 'sm:sync::syncFile', $name, $backup_path, $overwrite );
+ $name = apply_filters('wp_stateless_file_name', $backup_path);
+ do_action('sm:sync::syncFile', $name, $backup_path, $overwrite);
}
}
}
@@ -203,14 +203,14 @@ public function after_imagify_optimize_attachment( $id ) {
* Restore backup file from GCS if not exist.
* @param $id
*/
- public function get_image_from_gcs( $id ) {
- $file_path = get_attached_file( $id );
- $backup_path = get_imagify_attachment_backup_path( $file_path );
- if( !file_exists( $backup_path ) ) {
+ public function get_image_from_gcs($id) {
+ $file_path = get_attached_file($id);
+ $backup_path = get_imagify_attachment_backup_path($file_path);
+ if (!file_exists($backup_path)) {
$upload_dir = wp_upload_dir();
- $name = str_replace( trailingslashit( $upload_dir[ 'basedir' ] ), '', $backup_path );
- $name = apply_filters( 'wp_stateless_file_name', $name );
- do_action( 'sm:sync::syncFile', $name, $backup_path, true );
+ $name = str_replace(trailingslashit($upload_dir['basedir']), '', $backup_path);
+ $name = apply_filters('wp_stateless_file_name', $name);
+ do_action('sm:sync::syncFile', $name, $backup_path, true);
}
}
@@ -220,10 +220,10 @@ public function get_image_from_gcs( $id ) {
* @param $has_backup
* @return bool
*/
- public function imagify_has_backup( $return, $has_backup ) {
- if( !$return && $has_backup ) {
- $name = apply_filters( 'wp_stateless_file_name', $has_backup );
- $return = (bool) apply_filters( 'sm:sync::queue_is_exists', $name );
+ public function imagify_has_backup($return, $has_backup) {
+ if (!$return && $has_backup) {
+ $name = apply_filters('wp_stateless_file_name', $has_backup);
+ $return = (bool) apply_filters('sm:sync::queue_is_exists', $name);
}
return $return;
}
@@ -233,22 +233,22 @@ public function imagify_has_backup( $return, $has_backup ) {
* @param $file
* @param array $args
*/
- public function imagify_after_optimize_file( $file, $args = array() ) {
+ public function imagify_after_optimize_file($file, $args = array()) {
global $wp_stateless_imagify_mode;
- if( $wp_stateless_imagify_mode == 'ephemeral' ) {
- ud_get_stateless_media()->set( 'sm.mode', 'ephemeral' );
+ if ($wp_stateless_imagify_mode == 'ephemeral') {
+ ud_get_stateless_media()->set('sm.mode', 'ephemeral');
}
- $name = apply_filters( 'wp_stateless_file_name', basename( $file ) );
+ $name = apply_filters('wp_stateless_file_name', basename($file));
- if( file_exists( $file ) ) {
- add_filter( 'upload_mimes', array( $this, 'add_webp_mime' ), 10, 2 );
+ if (file_exists($file)) {
+ add_filter('upload_mimes', array($this, 'add_webp_mime'), 10, 2);
/**
* Media already on GCS, so only replacing data on it. For webp format adding path and status to wp_sm_sync table
*/
- do_action( 'sm:sync::syncFile', $name, $file, true, array( 'use_root' => true, 'skip_db' => ( substr( $name, -4 ) == "webp" ? false : true ) ) );
- remove_filter( 'upload_mimes', array( $this, 'add_webp_mime' ), 10 );
+ do_action('sm:sync::syncFile', $name, $file, true, array('use_root' => true, 'skip_db' => (substr($name, -4) == "webp" ? false : true)));
+ remove_filter('upload_mimes', array($this, 'add_webp_mime'), 10);
}
}
@@ -262,16 +262,16 @@ public function imagify_after_optimize_file( $file, $args = array() ) {
* @param $is_disabled
* @return mixed
*/
- public function imagify_before_optimize_size( $return, $process, $file, $thumb_size, $optimization_level, $webp, $is_disabled ) {
+ public function imagify_before_optimize_size($return, $process, $file, $thumb_size, $optimization_level, $webp, $is_disabled) {
try {
- $attachment_id = $this->getProperties( $this->getProperties( $this->getProperties( $process )[ 'data' ] )[ 'media' ] )[ 'id' ];
+ $attachment_id = $this->getProperties($this->getProperties($this->getProperties($process)['data'])['media'])['id'];
$full_size_path = $file->get_path();
- $name = apply_filters( 'wp_stateless_file_name', basename( $full_size_path ), true, $attachment_id );
- do_action( 'sm:sync::syncFile', $name, $full_size_path, true, [ 'download' => true ] );
+ $name = apply_filters('wp_stateless_file_name', basename($full_size_path), true, $attachment_id);
+ do_action('sm:sync::syncFile', $name, $full_size_path, true, ['download' => true]);
// error_log("\n\ndo_action( 'sm:sync::syncFile', $name, $full_size_path, true, ['download' => true] );");
- } catch( \Throwable $th ) {
+ } catch (\Throwable $th) {
//throw $th;
}
return $return;
@@ -282,27 +282,23 @@ public function imagify_before_optimize_size( $return, $process, $file, $thumb_s
* @param $process
* @return array
*/
- public function getProperties( $process ) {
+ public function getProperties($process) {
$properties = array();
try {
- $rc = new \ReflectionClass( $process );
+ $rc = new \ReflectionClass($process);
do {
$rp = array();
/* @var $p \ReflectionProperty */
- foreach( $rc->getProperties() as $p ) {
- $p->setAccessible( true );
- $rp[ $p->getName() ] = $p->getValue( $process );
+ foreach ($rc->getProperties() as $p) {
+ $p->setAccessible(true);
+ $rp[$p->getName()] = $p->getValue($process);
}
- $properties = array_merge( $rp, $properties );
- } while( $rc = $rc->getParentClass() );
- } catch( \ReflectionException $e ) {
-
+ $properties = array_merge($rp, $properties);
+ } while ($rc = $rc->getParentClass());
+ } catch (\ReflectionException $e) {
}
return $properties;
}
-
}
-
}
-
}
diff --git a/lib/classes/compatibility/learn-dash.php b/lib/classes/compatibility/learn-dash.php
deleted file mode 100644
index c7c1713b9..000000000
--- a/lib/classes/compatibility/learn-dash.php
+++ /dev/null
@@ -1,69 +0,0 @@
-hook_from_learndash() ) {
- return $filename;
- }
- return $return;
- }
-
- /**
- * Determine where we hook from
- * We need to do this only for something specific in LearnDash plugin
- *
- * @return bool
- */
- private function hook_from_learndash() {
- $call_stack = debug_backtrace();
- if(
- !empty($call_stack[6]['function']) &&
- $call_stack[6]['function'] == 'sanitize_file_name' &&
- (
- strpos( $call_stack[6]['file'], 'class-ld-semper-fi-module.php' ) ||
- strpos( $call_stack[6]['file'], 'class-ld-cpt-instance.php' )
- )
- ) {
- return true;
- }
-
- return false;
- }
-
- }
-
- }
-
-}
diff --git a/lib/classes/compatibility/lite-speed-cache.php b/lib/classes/compatibility/lite-speed-cache.php
deleted file mode 100644
index 96d21536b..000000000
--- a/lib/classes/compatibility/lite-speed-cache.php
+++ /dev/null
@@ -1,380 +0,0 @@
- 28
- * [post_id] => 494
- * [optm_status] => notified
- * [src] => 2019/10/22645b39-asdf.jpg
- * [srcpath_md5] => ad206986974729e1c8edc9321ed9ba9b
- * [src_md5] => 9d396b4f7a261a5fac1234b292a7d585
- * [root_id] => 0
- * [src_filesize] => 1
- * [target_filesize] => 0
- * [target_saved] => 827956
- * [webp_filesize] => 0
- * [webp_saved] => 830743
- * [server_info] => {
- * "server":"https:\/\/us1.wp.api.litespeedtech.com",
- * "id":"SEU98",
- * "ori_md5":"3a7bb6b684d34552d75291ed4c32d399",
- * "ori":"https:\/\/us1.wp.api.litespeedtech.com\/dl\/20191011\/c91821\/47721644.jpg",
- * "webp_md5":"61d80e1d2799af383c820492a1208846",
- * "webp":"https:\/\/us1.wp.api.litespeedtech.com\/dl\/20191011\/c91821\/47721644.jpg.webp"
- * }
- * )
- *
- * @param String $local_file
- * /var/www/wp-content/uploads/2019/10/22645b39-asdf.jpg
- *
- */
- public function sync_image( $row_img, $local_file ) {
- $rm_ori_bkup = apply_filters('litespeed_conf', 'img_optm-rm_bkup' );
- $gs_name = apply_filters( 'wp_stateless_file_name', $row_img->src );
- $cloud_meta = get_post_meta( $row_img->post_id, 'sm_cloud', true );
-
- if(empty($cloud_meta)) $cloud_meta = array();
-
- if( !$rm_ori_bkup ) {
- $extension = pathinfo( $gs_name, PATHINFO_EXTENSION );
- $bk_file = substr( $gs_name, 0, -strlen( $extension ) ) . 'bk.' . $extension;
- $cloud_meta[ 'fileMd5' ][ $bk_file ] = $cloud_meta[ 'fileMd5' ][ $gs_name ];
- do_action( 'sm:sync::copyFile', $gs_name, $bk_file );
- }
-
- $cloud_meta[ 'fileMd5' ][ $gs_name ] = md5_file( $local_file );
- update_post_meta( $row_img->post_id, 'sm_cloud', $cloud_meta );
- do_action( 'sm:sync::syncFile', $gs_name, $local_file, 2 );
- }
-
- /**
- * Upload webp image after LS pulled the images.
- * @todo put md5_file hash creating here. $row_img might have attachment_id
- * @param $row_img
- * @param $local_file
- */
- public function sync_webp( $row_img, $local_file ) {
- $optm_webp = apply_filters('litespeed_conf', 'img_optm-webp' );
- if( $optm_webp ) {
- $gs_name = apply_filters( 'wp_stateless_file_name', $row_img->src . '.webp' );
-
- $cloud_meta = get_post_meta( $row_img->post_id, 'sm_cloud', true );
- $cloud_meta[ 'fileMd5' ][ $gs_name ] = md5_file( $local_file );
- update_post_meta( $row_img->post_id, 'sm_cloud', $cloud_meta );
-
- add_filter( 'upload_mimes', array( $this, 'add_webp_mime' ), 10, 2 );
- do_action( 'sm:sync::syncFile', $gs_name, $local_file, 2, array( 'use_root' => true ) );
- }
- }
-
- /**
- * Bypassing the is_internal_file check on LiteSpeed Cache.
- * That check fails because we are replacing URL with GCS URL.
- * So we need to override it with filter.
- *
- * @todo maybe we can add some validation.
- *
- * @param $return
- * @param $url
- * @return bool
- */
- public function litespeed_media_check_img( $return, $url ) {
- $image_host = ud_get_stateless_media()->get_gs_host();
- if( strpos( $url, $image_host ) === 0 ) {
- return true;
- }
- return $return;
- }
-
- /**
- * Return information about a file from relative path.
- *
- * @param $info
- * @param $short_file_path
- * @param $post_id
- * @return array( 'url', 'md5', 'size' )
- */
- public function litespeed_media_info( $info, $short_file_path, $post_id ) {
- if( !$post_id ) return $info;
-
- try {
- $metadata = wp_get_attachment_metadata( $post_id );
- $cloud_meta = get_post_meta( $post_id, 'sm_cloud', true );
-
- if( !empty( $metadata[ 'gs_link' ] ) ) {
- $short_file_path = apply_filters( 'wp_stateless_file_name', $short_file_path );
- $url = ud_get_stateless_media()->get_gs_host() . '/' . $short_file_path;
- $md5 = !empty( $cloud_meta[ 'fileMd5' ][ $short_file_path ] ) ? $cloud_meta[ 'fileMd5' ][ $short_file_path ] : null;
-
- if( $metadata[ 'file' ] == $short_file_path ) {
- $url = $metadata[ 'gs_link' ];
- } else {
- foreach( $metadata[ 'sizes' ] as $size => $meta ) {
- if( $meta[ 'file' ] == basename( $short_file_path ) ) {
- $url = $meta[ 'gs_link' ];
- break;
- }
- }
- }
-
- if( $md5 ) {
- $info = array( 'url' => $url, 'md5' => $md5, 'size' => 1, );
- }
- }
- } catch( \Throwable $th ) {
- error_log( print_r( $th, true ) );
- }
-
- return $info;
- }
-
-
- /**
- * Deletes a file in GCS and remove the hash from cloud meta.
-
- * @param $short_file_path
- * @param $post_id
- */
- public function litespeed_media_del( $short_file_path, $post_id ) {
- $short_file_path = apply_filters( 'wp_stateless_file_name', $short_file_path );
- do_action( 'sm:sync::deleteFile', $short_file_path );
- }
-
- /**
- * Hooks into the rename function of the LS cache.
- * And move the file in GCS.
- * Also update the md5_file hash on cloud meta.
- *
- * @param $short_file_path
- * @param $short_file_path_new
- * @param $post_id
- */
- public function litespeed_media_rename( $short_file_path, $short_file_path_new, $post_id ) {
- $short_file_path = apply_filters( 'wp_stateless_file_name', $short_file_path );
- $short_file_path_new = apply_filters( 'wp_stateless_file_name', $short_file_path_new );
-
- // copy file to the new location and delete the old one.
- do_action( 'sm:sync::moveFile', $short_file_path, $short_file_path_new );
-
- $this->update_hash( $post_id, $short_file_path_new, $short_file_path );
- }
-
- /**
- * add_webp_mime
- * @param $t
- * @param $user
- * @return mixed
- */
- public function add_webp_mime( $t, $user ) {
- $t[ 'webp' ] = 'image/webp';
- return $t;
- }
-
- /**
- * Move file hash from one key to another.
- *
- * @param $attachment_id
- * @param $gs_name_new key to store md5_file.
- * @param $gs_name_old whether to get md5 from another entry.
- * @param bool $delete whether only remove the key.
- * @return bool
- */
- public function update_hash( $attachment_id, $gs_name_new, $gs_name_old, $delete = false ) {
- try {
- $cloud_meta = get_post_meta( $attachment_id, 'sm_cloud', true );
-
- if( !$delete ) {
- if( $gs_name_old && !empty( $cloud_meta[ 'fileMd5' ][ $gs_name_old ] ) ) {
- $cloud_meta[ 'fileMd5' ][ $gs_name_new ] = $cloud_meta[ 'fileMd5' ][ $gs_name_old ];
- } else {
- $url = ud_get_stateless_media()->get_gs_host() . '/' . $gs_name_new;
- $cloud_meta[ 'fileMd5' ][ $gs_name_new ] = md5_file( $url );
- }
- }
-
- if( isset( $cloud_meta[ 'fileMd5' ][ $gs_name_old ] ) ) unset( $cloud_meta[ 'fileMd5' ][ $gs_name_old ] );
- update_post_meta( $attachment_id, 'sm_cloud', $cloud_meta );
- return true;
- } catch( \Throwable $th ) {
- error_log( print_r( $th, true ) );
- return false;
- }
- return false;
- }
-
- /**
- * Adds file hash to cloud meta, so that we can use it later.
- *
- * @param $cloud_meta
- * @param $media
- * @param $image_size
- * @param $img
- * @param $bucketLink
- * @return array $cloud_meta with fileMd5
- */
- public function cloud_meta_add_file_md5( $cloud_meta, $media, $image_size, $img, $bucketLink ) {
- if( $file_hash = md5_file( $img[ 'path' ] ) ) {
- $gs_name = !empty( $media[ 'name' ] ) ? $media[ 'name' ] : $img[ 'gs_name' ];
- $extension = pathinfo( $gs_name, PATHINFO_EXTENSION );
- $bk_file = substr( $gs_name, 0, -strlen( $extension ) ) . 'bk.' . $extension;
-
- // Storing file hash
- $cloud_meta[ 'fileMd5' ][ $gs_name ] = $file_hash;
- }
-
- return $cloud_meta;
- }
-
- /**
- * On manual sync/regenerate we need to sync backup/webp files.
- *
- * @param $attachment_id
- * @param $metadata
- */
- public function manual_sync_backup_file( $attachment_id, $metadata ) {
- $cloud_meta = get_post_meta( $attachment_id, 'sm_cloud', true );
-
- if( !empty( $cloud_meta[ 'fileMd5' ] ) ) {
- $upload_dir = wp_upload_dir();
- $fileMd5 = $cloud_meta[ 'fileMd5' ];
- $root_dir = ud_get_stateless_media()->get( 'sm.root_dir' );
- $root_dir = apply_filters("wp_stateless_handle_root_dir", $root_dir);
- $root_dir = trim( $root_dir, '/ ' ); // Remove any forward slash and empty space.
-
- foreach( $fileMd5 as $gs_name => $value ) {
- $_gs_name = str_replace( $root_dir, '', $gs_name );
- $local_file = $upload_dir[ 'basedir' ] . '/' . trim( $_gs_name, '/' );
-
- do_action( 'sm:sync::syncFile', $gs_name, $local_file, true );
- }
- }
- }
-
- /**
- * On manual sync/regenerate wp regenerate all image sizes.
- * So to keep the file md5 accurate we need to update it after image is regenerated.
- *
- * Manual sync if it's the first time syncing and image optimized before enabling Stateless
- *
- * @param $attachment_id
- */
- public function update_md5_and_manual_sync( $attachment_id ) {
- $cloud_meta = get_post_meta( $attachment_id, 'sm_cloud', true );
- $metadata = wp_get_attachment_metadata( $attachment_id );
- $image_sizes = Utility::get_path_and_url( $metadata, $attachment_id );
-
- if( !empty( $cloud_meta[ 'fileMd5' ] ) ) {
- foreach( $image_sizes as $img ) {
- $cloud_meta[ 'fileMd5' ][ $img[ 'gs_name' ] ] = md5_file( $img[ 'path' ] );
- }
- }
-
- if( empty( $cloud_meta[ 'fileMd5' ] ) || count( $cloud_meta[ 'fileMd5' ] ) <= 1 ) {
- if( empty( $cloud_meta ) ) {
- $cloud_meta = array();
- }
-
- // In case image optimized before enabling Stateless.
- // We only need to copy from local to GCS, otherwise file_md5 meta should be available.
- foreach( $image_sizes as $img ) {
- $file_path = $img[ 'path' ];
- $rm_ori_bkup = apply_filters('litespeed_conf', 'img_optm-rm_bkup' );
- $optm_webp = apply_filters('litespeed_conf', 'img_optm-webp' );
-
- if( !$rm_ori_bkup ) {
- $extension = pathinfo( $file_path, PATHINFO_EXTENSION );
- $bk_file = substr( $file_path, 0, -strlen( $extension ) ) . 'bk.' . $extension;
- $bk_file_optm = substr( $file_path, 0, -strlen( $extension ) ) . 'bk.optm.' . $extension;
- if( file_exists( $bk_file ) ) {
- $gs_name = apply_filters( 'wp_stateless_file_name', $bk_file );
- $cloud_meta[ 'fileMd5' ][ $gs_name ] = md5_file( $bk_file );
- do_action( 'sm:sync::syncFile', $gs_name, $bk_file );
- } elseif( file_exists( $bk_file_optm ) ) {
- $gs_name = apply_filters( 'wp_stateless_file_name', $bk_file_optm );
- $cloud_meta[ 'fileMd5' ][ $gs_name ] = md5_file( $bk_file_optm );
- do_action( 'sm:sync::syncFile', $gs_name, $bk_file_optm );
- }
- }
-
- if( $optm_webp ) {
- $gs_name_webp = $file_path . '.webp';
- $gs_name_webp_optm = $file_path . '.optm.webp';
- if( file_exists( $gs_name_webp ) ) {
- $gs_name = apply_filters( 'wp_stateless_file_name', $gs_name_webp );
- $cloud_meta[ 'fileMd5' ][ $gs_name ] = md5_file( $gs_name_webp );
- do_action( 'sm:sync::syncFile', $gs_name, $gs_name_webp );
- } elseif( file_exists( $gs_name_webp_optm ) ) {
- $gs_name = apply_filters( 'wp_stateless_file_name', $gs_name_webp_optm );
- $cloud_meta[ 'fileMd5' ][ $gs_name ] = md5_file( $gs_name_webp_optm );
- do_action( 'sm:sync::syncFile', $gs_name, $gs_name_webp_optm );
- }
- }
-
- }
-
- }
-
- update_post_meta( $attachment_id, 'sm_cloud', $cloud_meta );
- }
-
- }
-
- }
-
-}
diff --git a/lib/classes/compatibility/polylang-pro.php b/lib/classes/compatibility/polylang-pro.php
deleted file mode 100644
index f8415c908..000000000
--- a/lib/classes/compatibility/polylang-pro.php
+++ /dev/null
@@ -1,57 +0,0 @@
-path( 'lib/classes/compatibility/js/shortpixel.js', 'url' ), array( 'shortpixel' ), '', true );
+ wp_enqueue_script('stateless-short-pixel', ud_get_stateless_media()->path('lib/classes/compatibility/js/shortpixel.js', 'url'), array('shortpixel'), '', true);
$image_host = ud_get_stateless_media()->get_gs_host();
- $bucketLink = apply_filters( 'wp_stateless_bucket_link', $image_host );
-
- wp_localize_script( 'stateless-short-pixel', '_stateless_short_pixel', array( 'baseurl' => $upload_dir[ 'baseurl' ], 'bucketLink' => $bucketLink, ) );
+ $bucketLink = apply_filters('wp_stateless_bucket_link', $image_host);
+ wp_localize_script('stateless-short-pixel', '_stateless_short_pixel', array('baseurl' => $upload_dir['baseurl'], 'bucketLink' => $bucketLink,));
}
/**
@@ -78,11 +78,10 @@ public function shortPixelJS() {
* @param $thumbs
* @return string
*/
- public function getBackupFolderAny( $ret, $file, $thumbs ) {
- if( $ret == false ) {
- $fullSubDir = $this->returnSubDir( $file );
+ public function getBackupFolderAny($ret, $file, $thumbs) {
+ if ($ret == false) {
+ $fullSubDir = $this->returnSubDir($file);
$ret = SHORTPIXEL_BACKUP_FOLDER . '/' . $fullSubDir;
-
}
return $ret;
}
@@ -96,45 +95,45 @@ public function getBackupFolderAny( $ret, $file, $thumbs ) {
* @param null $id
* @return bool
*/
- public function shortpixel_image_exists( $return, $path, $id = null ) {
- if( $return ) return $return;
+ public function shortpixel_image_exists($return, $path, $id = null) {
+ if ($return) return $return;
- $key = "stateless_url_to_postid_" . md5( $path );
- $return = get_transient( $key );
+ $key = "stateless_url_to_postid_" . md5($path);
+ $return = get_transient($key);
// echo "\npath: $path \nKey: $key\nReturn: $return\nID: $id\n ";
- if( !$return ) {
+ if (!$return) {
// Checking by matching file name in gs_name and $path.
- if( !empty( $id ) ) {
- $metadata = wp_get_attachment_metadata( $id );
- $basename = basename( $path );
- if( !empty( $metadata[ 'gs_name' ] ) ) {
- $gs_basename = basename( $metadata[ 'gs_name' ] );
- if( $gs_basename == $basename ) {
+ if (!empty($id)) {
+ $metadata = wp_get_attachment_metadata($id);
+ $basename = basename($path);
+ if (!empty($metadata['gs_name'])) {
+ $gs_basename = basename($metadata['gs_name']);
+ if ($gs_basename == $basename) {
$return = true;
}
- if( is_array( $metadata[ 'sizes' ] ) ) {
- foreach( $metadata[ 'sizes' ] as $key => &$data ) {
- if( empty( $data[ 'gs_name' ] ) ) continue;
- $gs_basename = basename( $data[ 'gs_name' ] );
- if( $gs_basename == $basename ) {
+ if (is_array($metadata['sizes'])) {
+ foreach ($metadata['sizes'] as $key => &$data) {
+ if (empty($data['gs_name'])) continue;
+ $gs_basename = basename($data['gs_name']);
+ if ($gs_basename == $basename) {
$return = true;
}
}
}
}
} // Directly check on GCS if image exist.
- else if( empty( $id ) ) {
+ else if (empty($id)) {
$wp_uploads_dir = wp_get_upload_dir();
- $gs_name = str_replace( trailingslashit( $wp_uploads_dir[ 'basedir' ] ), '', $path );
- $gs_name = str_replace( trailingslashit( $wp_uploads_dir[ 'baseurl' ] ), '', $gs_name );
- $gs_name = str_replace( trailingslashit( ud_get_stateless_media()->get_gs_host() ), '', $gs_name );
- $gs_name = apply_filters( 'wp_stateless_file_name', $gs_name );
- if( $media = ud_get_stateless_media()->get_client()->media_exists( $gs_name ) ) {
+ $gs_name = str_replace(trailingslashit($wp_uploads_dir['basedir']), '', $path);
+ $gs_name = str_replace(trailingslashit($wp_uploads_dir['baseurl']), '', $gs_name);
+ $gs_name = str_replace(trailingslashit(ud_get_stateless_media()->get_gs_host()), '', $gs_name);
+ $gs_name = apply_filters('wp_stateless_file_name', $gs_name);
+ if ($media = ud_get_stateless_media()->get_client()->media_exists($gs_name)) {
$return = true;
}
}
- set_transient( $key, $return, 10 * MINUTE_IN_SECONDS );
+ set_transient($key, $return, 10 * MINUTE_IN_SECONDS);
}
return $return;
}
@@ -148,28 +147,28 @@ public function shortpixel_image_exists( $return, $path, $id = null ) {
* @param $paths
* @return bool
*/
- public function shortpixel_skip_delete_backups_and_webps( $return, $paths ) {
- if( empty( $paths ) || !is_array( $paths ) ) return $return;
+ public function shortpixel_skip_delete_backups_and_webps($return, $paths) {
+ if (empty($paths) || !is_array($paths)) return $return;
$sp__uploads = wp_upload_dir();
- $fullSubDir = $this->returnSubDir( $paths[ 0 ] );
+ $fullSubDir = $this->returnSubDir($paths[0]);
$backup_path = SHORTPIXEL_BACKUP_FOLDER . '/' . $fullSubDir;
- foreach( $paths as $key => $path ) {
+ foreach ($paths as $key => $path) {
// Removing backup
- $name = apply_filters( 'wp_stateless_file_name', SHORTPIXEL_BACKUP . '/' . $fullSubDir . basename( $path ) );
- do_action( 'sm:sync::deleteFile', $name );
+ $name = apply_filters('wp_stateless_file_name', SHORTPIXEL_BACKUP . '/' . $fullSubDir . basename($path));
+ do_action('sm:sync::deleteFile', $name);
// Removing WebP
- $backup_images = \WPShortPixelSettings::getOpt( 'wp-short-create-webp' );
- if( $backup_images ) {
- $name = str_replace( $sp__uploads[ 'basedir' ], '', $path );
- $name = apply_filters( 'wp_stateless_file_name', $name . '.webp' );
- do_action( 'sm:sync::deleteFile', $name );
+ $backup_images = \WPShortPixelSettings::getOpt('wp-short-create-webp');
+ if ($backup_images) {
+ $name = str_replace($sp__uploads['basedir'], '', $path);
+ $name = apply_filters('wp_stateless_file_name', $name . '.webp');
+ do_action('sm:sync::deleteFile', $name);
}
}
- if( ud_get_stateless_media()->get( 'sm.mode' ) == 'ephemeral' ) {
+ if (ud_get_stateless_media()->get('sm.mode') == 'ephemeral') {
return true;
}
// When ephemeral mode isn't set backup files will be available in server. So no short-circuit.
@@ -184,8 +183,8 @@ public function shortpixel_skip_delete_backups_and_webps( $return, $paths ) {
* @param $PATHs
* @return bool
*/
- public function shortpixel_skip_backup( $return, $mainPath, $PATHs ) {
- if( ud_get_stateless_media()->get( 'sm.mode' ) == 'ephemeral' ) {
+ public function shortpixel_skip_backup($return, $mainPath, $PATHs) {
+ if (ud_get_stateless_media()->get('sm.mode') == 'ephemeral') {
return true;
}
return $return;
@@ -199,11 +198,11 @@ public function shortpixel_skip_backup( $return, $mainPath, $PATHs ) {
* @param $attachment_id
* @return mixed
*/
- public function wp_update_attachment_metadata( $metadata, $attachment_id ) {
- if( ud_get_stateless_media()->get( 'sm.mode' ) == 'ephemeral' ) {
- $backup_images = \WPShortPixelSettings::getOpt( 'wp-short-backup_images' );
- if( $backup_images ) {
- $this->sync_backup_file( $attachment_id, $metadata, false, array( 'before_optimization' => true ) );
+ public function wp_update_attachment_metadata($metadata, $attachment_id) {
+ if (ud_get_stateless_media()->get('sm.mode') == 'ephemeral') {
+ $backup_images = \WPShortPixelSettings::getOpt('wp-short-backup_images');
+ if ($backup_images) {
+ $this->sync_backup_file($attachment_id, $metadata, false, array('before_optimization' => true));
}
}
return $metadata;
@@ -214,17 +213,17 @@ public function wp_update_attachment_metadata( $metadata, $attachment_id ) {
*
* @param $id
*/
- public function shortpixel_image_optimised( $id ) {
- $metadata = wp_get_attachment_metadata( $id );
- ud_get_stateless_media()->add_media( $metadata, $id, true );
+ public function shortpixel_image_optimised($id) {
+ $metadata = wp_get_attachment_metadata($id);
+ ud_get_stateless_media()->add_media($metadata, $id, true);
// Sync the webp to GCS
- $create_webp = \WPShortPixelSettings::getOpt( 'wp-short-create-webp' );
- if( $create_webp ) {
+ $create_webp = \WPShortPixelSettings::getOpt('wp-short-create-webp');
+ if ($create_webp) {
$this->sync_webp_file($id, $metadata);
}
// Don't needed in ephemeral mode. In ephemeral mode the back will be sync once on wp_update_attachment_metadata filter.
- if( ud_get_stateless_media()->get( 'sm.mode' ) !== 'ephemeral' ) {
- $this->sync_backup_file( $id, $metadata, true );
+ if (ud_get_stateless_media()->get('sm.mode') !== 'ephemeral') {
+ $this->sync_backup_file($id, $metadata, true);
}
}
@@ -234,8 +233,8 @@ public function shortpixel_image_optimised( $id ) {
* @param $id
* @param null $metadata
*/
- public function shortpixel_before_restore_image( $id, $metadata = null ) {
- $this->sync_backup_file( $id, $metadata, true, array( 'download' => true ) );
+ public function shortpixel_before_restore_image($id, $metadata = null) {
+ $this->sync_backup_file($id, $metadata, true, array('download' => true));
}
/**
@@ -245,10 +244,10 @@ public function shortpixel_before_restore_image( $id, $metadata = null ) {
* @param null $id
* @return bool
*/
- public function shortpixel_skip_restore_image( $return, $id = null ) {
- if( ud_get_stateless_media()->get( 'sm.mode' ) === 'ephemeral' ) {
+ public function shortpixel_skip_restore_image($return, $id = null) {
+ if (ud_get_stateless_media()->get('sm.mode') === 'ephemeral') {
$this->client = ud_get_stateless_media()->get_client();
- $this->client->copy_media( 'localhost/ShortpixelBackups/wp-content/uploads/2019/04/htpps.png', 'localhost/2019/04/htpps.png' );
+ $this->client->copy_media('localhost/ShortpixelBackups/wp-content/uploads/2019/04/htpps.png', 'localhost/2019/04/htpps.png');
return true;
}
return $return;
@@ -263,39 +262,39 @@ public function shortpixel_skip_restore_image( $return, $id = null ) {
* @param array $args
* before_optimization : pass true if you want to sync directly from original path instead of backup path.
*/
- public function sync_backup_file( $id, $metadata = null, $force = false, $args = array() ) {
- $args = wp_parse_args( $args, array( 'download' => false, // whether to only download.
+ public function sync_backup_file($id, $metadata = null, $force = false, $args = array()) {
+ $args = wp_parse_args($args, array(
+ 'download' => false, // whether to only download.
'before_optimization' => false, // whether to delete local file in ephemeral mode.
- ) );
+ ));
/* Get metadata in case if method is called directly. */
- if( empty( $metadata ) ) {
- $metadata = wp_get_attachment_metadata( $id );
+ if (empty($metadata)) {
+ $metadata = wp_get_attachment_metadata($id);
}
/* Now we go through all available image sizes and upload them to Google Storage */
- if( !empty( $metadata[ 'sizes' ] ) && is_array( $metadata[ 'sizes' ] ) ) {
+ if (!empty($metadata['sizes']) && is_array($metadata['sizes'])) {
// Sync backup file with GCS
- $file_path = get_attached_file( $id );
- $fullSubDir = $this->returnSubDir( $file_path );
+ $file_path = get_attached_file($id);
+ $fullSubDir = $this->returnSubDir($file_path);
$backup_path = SHORTPIXEL_BACKUP_FOLDER . '/' . $fullSubDir;
- if( $args[ 'before_optimization' ] ) {
+ if ($args['before_optimization']) {
$upload_dir = wp_upload_dir();
- $backup_path = $upload_dir[ 'basedir' ] . '/' . dirname( $metadata[ 'file' ] );
- $args = array( 'ephemeral' => false );
+ $backup_path = $upload_dir['basedir'] . '/' . dirname($metadata['file']);
+ $args = array('ephemeral' => false);
}
- $absolutePath = trailingslashit( $backup_path ) . basename( $metadata[ 'file' ] );
- $name = apply_filters( 'wp_stateless_file_name', SHORTPIXEL_BACKUP . '/' . $fullSubDir . basename( $metadata[ 'file' ] ) );
- do_action( 'sm:sync::syncFile', $name, $absolutePath, $force, $args );
+ $absolutePath = trailingslashit($backup_path) . basename($metadata['file']);
+ $name = apply_filters('wp_stateless_file_name', SHORTPIXEL_BACKUP . '/' . $fullSubDir . basename($metadata['file']));
+ do_action('sm:sync::syncFile', $name, $absolutePath, $force, $args);
- foreach( (array) $metadata[ 'sizes' ] as $image_size => $data ) {
- $absolutePath = trailingslashit( $backup_path ) . $data[ 'file' ];
- $name = apply_filters( 'wp_stateless_file_name', SHORTPIXEL_BACKUP . '/' . $fullSubDir . $data[ 'file' ] );
+ foreach ((array) $metadata['sizes'] as $image_size => $data) {
+ $absolutePath = trailingslashit($backup_path) . $data['file'];
+ $name = apply_filters('wp_stateless_file_name', SHORTPIXEL_BACKUP . '/' . $fullSubDir . $data['file']);
- do_action( 'sm:sync::syncFile', $name, $absolutePath, $force, $args );
+ do_action('sm:sync::syncFile', $name, $absolutePath, $force, $args);
}
-
}
}
@@ -305,15 +304,15 @@ public function sync_backup_file( $id, $metadata = null, $force = false, $args =
* @param $id
* @param null $metadata
*/
- public function sync_webp_file( $id, $metadata = null ) {
+ public function sync_webp_file($id, $metadata = null) {
/* Get metadata in case if method is called directly. */
- if( empty( $metadata ) ) {
- $metadata = wp_get_attachment_metadata( $id );
+ if (empty($metadata)) {
+ $metadata = wp_get_attachment_metadata($id);
}
- add_filter( 'upload_mimes', array( $this, 'add_webp_mime' ), 10, 2 );
+ add_filter('upload_mimes', array($this, 'add_webp_mime'), 10, 2);
// Sync the webp to GCS
- ud_get_stateless_media()->add_media( $metadata, $id, true, array( 'is_webp' => '.webp' ) );
- remove_filter( 'upload_mimes', array( $this, 'add_webp_mime' ), 10 );
+ ud_get_stateless_media()->add_media($metadata, $id, true, array('is_webp' => '.webp'));
+ remove_filter('upload_mimes', array($this, 'add_webp_mime'), 10);
}
/**
@@ -324,24 +323,24 @@ public function sync_webp_file( $id, $metadata = null ) {
* @param type $file
* @return string
*/
- public function returnSubDir( $file ) {
- $hp = wp_normalize_path( get_home_path() );
- $file = wp_normalize_path( $file );
+ public function returnSubDir($file) {
+ $hp = wp_normalize_path(get_home_path());
+ $file = wp_normalize_path($file);
$sp__uploads = wp_upload_dir();
- if( strstr( $file, $hp ) ) {
- $path = str_replace( $hp, "", $file );
- } elseif( strstr( $file, dirname( WP_CONTENT_DIR ) ) ) { //in some situations the content dir is not inside the root, check this also (ex. single.shortpixel.com)
- $path = str_replace( trailingslashit( dirname( WP_CONTENT_DIR ) ), "", $file );
- } elseif( ( strstr( realpath( $file ), realpath( $hp ) ) ) ) {
- $path = str_replace( realpath( $hp ), "", realpath( $file ) );
- } elseif( strstr( $file, trailingslashit( dirname( dirname( $sp__uploads[ 'basedir' ] ) ) ) ) ) {
- $path = str_replace( trailingslashit( dirname( dirname( $sp__uploads[ 'basedir' ] ) ) ), "", $file );
+ if (strstr($file, $hp)) {
+ $path = str_replace($hp, "", $file);
+ } elseif (strstr($file, dirname(WP_CONTENT_DIR))) { //in some situations the content dir is not inside the root, check this also (ex. single.shortpixel.com)
+ $path = str_replace(trailingslashit(dirname(WP_CONTENT_DIR)), "", $file);
+ } elseif ((strstr(realpath($file), realpath($hp)))) {
+ $path = str_replace(realpath($hp), "", realpath($file));
+ } elseif (strstr($file, trailingslashit(dirname(dirname($sp__uploads['basedir']))))) {
+ $path = str_replace(trailingslashit(dirname(dirname($sp__uploads['basedir']))), "", $file);
} else {
- $path = ( substr( $file, 1 ) );
+ $path = (substr($file, 1));
}
- $pathArr = explode( '/', $path );
- unset( $pathArr[ count( $pathArr ) - 1 ] );
- return implode( '/', $pathArr ) . '/';
+ $pathArr = explode('/', $path);
+ unset($pathArr[count($pathArr) - 1]);
+ return implode('/', $pathArr) . '/';
}
/**
@@ -349,9 +348,9 @@ public function returnSubDir( $file ) {
*
* @param $attachmentID
*/
- public function handleRestoreBackup( $attachmentID ) {
- $metadata = wp_get_attachment_metadata( $attachmentID );
- $this->add_media( $metadata, $attachmentID );
+ public function handleRestoreBackup($attachmentID) {
+ $metadata = wp_get_attachment_metadata($attachmentID);
+ $this->add_media($metadata, $attachmentID);
}
/**
@@ -362,67 +361,64 @@ public function handleRestoreBackup( $attachmentID ) {
* @param $metadata
* @param $attachment_id
*/
- public static function add_media( $metadata, $attachment_id ) {
+ public static function add_media($metadata, $attachment_id) {
$upload_dir = wp_upload_dir();
$client = ud_get_stateless_media()->get_client();
- if( !is_wp_error( $client ) ) {
+ if (!is_wp_error($client)) {
- $fullsizepath = wp_normalize_path( get_attached_file( $attachment_id ) );
+ $fullsizepath = wp_normalize_path(get_attached_file($attachment_id));
// Make non-images uploadable.
- if( empty( $metadata[ 'file' ] ) && $attachment_id ) {
- $metadata = array( "file" => str_replace( trailingslashit( $upload_dir[ 'basedir' ] ), '', get_attached_file( $attachment_id ) ) );
+ if (empty($metadata['file']) && $attachment_id) {
+ $metadata = array("file" => str_replace(trailingslashit($upload_dir['basedir']), '', get_attached_file($attachment_id)));
}
- $file = wp_normalize_path( $metadata[ 'file' ] );
+ $file = wp_normalize_path($metadata['file']);
$image_host = ud_get_stateless_media()->get_gs_host();
- $bucketLink = apply_filters( 'wp_stateless_bucket_link', $image_host );
- $_cacheControl = \wpCloud\StatelessMedia\Utility::getCacheControl( $attachment_id, $metadata, null );
- $_contentDisposition = \wpCloud\StatelessMedia\Utility::getContentDisposition( $attachment_id, $metadata, null );
- $_metadata = array( "width" => isset( $metadata[ 'width' ] ) ? $metadata[ 'width' ] : null, "height" => isset( $metadata[ 'height' ] ) ? $metadata[ 'height' ] : null, 'object-id' => $attachment_id, 'source-id' => md5( $attachment_id . ud_get_stateless_media()->get( 'sm.bucket' ) ), 'file-hash' => md5( $metadata[ 'file' ] ) );
+ $bucketLink = apply_filters('wp_stateless_bucket_link', $image_host);
+ $_cacheControl = \wpCloud\StatelessMedia\Utility::getCacheControl($attachment_id, $metadata, null);
+ $_contentDisposition = \wpCloud\StatelessMedia\Utility::getContentDisposition($attachment_id, $metadata, null);
+ $_metadata = array("width" => isset($metadata['width']) ? $metadata['width'] : null, "height" => isset($metadata['height']) ? $metadata['height'] : null, 'object-id' => $attachment_id, 'source-id' => md5($attachment_id . ud_get_stateless_media()->get('sm.bucket')), 'file-hash' => md5($metadata['file']));
- if( file_exists( $fullsizepath ) ) {
- $file = apply_filters( 'wp_stateless_file_name', $file );
+ if (file_exists($fullsizepath)) {
+ $file = apply_filters('wp_stateless_file_name', $file);
/* Add default image */
- $media = $client->add_media( $_mediaOptions = array_filter( array( 'force' => true, 'name' => $file, 'absolutePath' => wp_normalize_path( get_attached_file( $attachment_id ) ), 'cacheControl' => $_cacheControl, 'contentDisposition' => $_contentDisposition, 'mimeType' => get_post_mime_type( $attachment_id ), 'metadata' => $_metadata ) ) );
+ $media = $client->add_media($_mediaOptions = array_filter(array('force' => true, 'name' => $file, 'absolutePath' => wp_normalize_path(get_attached_file($attachment_id)), 'cacheControl' => $_cacheControl, 'contentDisposition' => $_contentDisposition, 'mimeType' => get_post_mime_type($attachment_id), 'metadata' => $_metadata)));
// ephemeral mode: we don't need the local version.
- if( ud_get_stateless_media()->get( 'sm.mode' ) === 'ephemeral' ) {
- unlink( $fullsizepath );
+ if (ud_get_stateless_media()->get('sm.mode') === 'ephemeral') {
+ unlink($fullsizepath);
}
}
/* Now we go through all available image sizes and upload them to Google Storage */
- if( !empty( $metadata[ 'sizes' ] ) && is_array( $metadata[ 'sizes' ] ) ) {
+ if (!empty($metadata['sizes']) && is_array($metadata['sizes'])) {
- $path = wp_normalize_path( dirname( get_attached_file( $attachment_id ) ) );
- $mediaPath = apply_filters( 'wp_stateless_file_name', trim( dirname( $metadata[ 'file' ] ), '\/\\' ) );
+ $path = wp_normalize_path(dirname(get_attached_file($attachment_id)));
+ $mediaPath = apply_filters('wp_stateless_file_name', trim(dirname($metadata['file']), '\/\\'));
- foreach( (array) $metadata[ 'sizes' ] as $image_size => $data ) {
+ foreach ((array) $metadata['sizes'] as $image_size => $data) {
- $absolutePath = wp_normalize_path( $path . '/' . $data[ 'file' ] );
+ $absolutePath = wp_normalize_path($path . '/' . $data['file']);
- if( !file_exists( $absolutePath ) ) {
+ if (!file_exists($absolutePath)) {
continue;
}
/* Add 'image size' image */
- $media = $client->add_media( array( 'force' => true, 'name' => $file_path = trim( $mediaPath . '/' . $data[ 'file' ], '/' ), 'absolutePath' => $absolutePath, 'cacheControl' => $_cacheControl, 'contentDisposition' => $_contentDisposition, 'mimeType' => $data[ 'mime-type' ], 'metadata' => array_merge( $_metadata, array( 'width' => $data[ 'width' ], 'height' => $data[ 'height' ], 'child-of' => $attachment_id, 'file-hash' => md5( $data[ 'file' ] ) ) ) ) );
+ $media = $client->add_media(array('force' => true, 'name' => $file_path = trim($mediaPath . '/' . $data['file'], '/'), 'absolutePath' => $absolutePath, 'cacheControl' => $_cacheControl, 'contentDisposition' => $_contentDisposition, 'mimeType' => $data['mime-type'], 'metadata' => array_merge($_metadata, array('width' => $data['width'], 'height' => $data['height'], 'child-of' => $attachment_id, 'file-hash' => md5($data['file'])))));
/* Break if we have errors. */
- if( !is_wp_error( $media ) ) {
+ if (!is_wp_error($media)) {
// ephemeral mode: we don't need the local version.
- if( ud_get_stateless_media()->get( 'sm.mode' ) === 'ephemeral' ) {
- unlink( $absolutePath );
+ if (ud_get_stateless_media()->get('sm.mode') === 'ephemeral') {
+ unlink($absolutePath);
}
}
-
}
-
}
-
}
}
// End add_media
@@ -433,20 +429,20 @@ public static function add_media( $metadata, $attachment_id ) {
* @param $args
* @return mixed
*/
- public function wp_stateless_add_media_args( $args ) {
- if( !empty( $args[ 'is_webp' ] ) && $args[ 'is_webp' ] ) {
- if( \file_exists( $args[ 'absolutePath' ] . '.webp' ) ) {
- $args[ 'name' ] = $args[ 'name' ] . '.webp';
- $args[ 'absolutePath' ] = $args[ 'absolutePath' ] . '.webp';
+ public function wp_stateless_add_media_args($args) {
+ if (!empty($args['is_webp']) && $args['is_webp']) {
+ if (\file_exists($args['absolutePath'] . '.webp')) {
+ $args['name'] = $args['name'] . '.webp';
+ $args['absolutePath'] = $args['absolutePath'] . '.webp';
} else {
- $pathinfo = pathinfo( $args[ 'absolutePath' ] );
- $absolutePath = trailingslashit( $pathinfo[ 'dirname' ] ) . $pathinfo[ 'filename' ] . '.webp';
- if( file_exists( $absolutePath ) ) {
- $args[ 'name' ] = $args[ 'name' ] . '.webp';
- $args[ 'absolutePath' ] = $absolutePath;
+ $pathinfo = pathinfo($args['absolutePath']);
+ $absolutePath = trailingslashit($pathinfo['dirname']) . $pathinfo['filename'] . '.webp';
+ if (file_exists($absolutePath)) {
+ $args['name'] = $args['name'] . '.webp';
+ $args['absolutePath'] = $absolutePath;
}
}
- $args[ 'mimeType' ] = 'image/webp';
+ $args['mimeType'] = 'image/webp';
}
return $args;
}
@@ -458,10 +454,10 @@ public function wp_stateless_add_media_args( $args ) {
* @param $src
* @return mixed
*/
- public function shortpixel_webp_image_base( $imageBase, $src ) {
- $gs_link = \ud_get_stateless_media()->convert_to_gs_link( $src, true );
- if( $gs_link ) {
- $imageBase = trailingslashit( dirname( $gs_link ) );
+ public function shortpixel_webp_image_base($imageBase, $src) {
+ $gs_link = \ud_get_stateless_media()->convert_to_gs_link($src, true);
+ if ($gs_link) {
+ $imageBase = trailingslashit(dirname($gs_link));
}
return $imageBase;
}
@@ -471,23 +467,20 @@ public function shortpixel_webp_image_base( $imageBase, $src ) {
* @param $id
* @return mixed
*/
- public function shortpixel_image_urls( $URLs, $id ) {
- foreach( $URLs as $key => $url ) {
- $url_parts = wp_parse_url( $url );
- if( $url_parts[ 'host' ] == 'storage.googleapis.com' ) {
- if( preg_match( "@(^/?.*?/)(.*)@", $url_parts[ 'path' ], $matches ) ) {
- $bucket = trim( $matches[ 1 ], '/' );
- $url_parts[ 'path' ] = $matches[ 2 ];
- $url_parts[ 'host' ] = $bucket . '.' . $url_parts[ 'host' ];
- $URLs[ $key ] = Utility::join_url( $url_parts );
+ public function shortpixel_image_urls($URLs, $id) {
+ foreach ($URLs as $key => $url) {
+ $url_parts = wp_parse_url($url);
+ if ($url_parts['host'] == 'storage.googleapis.com') {
+ if (preg_match("@(^/?.*?/)(.*)@", $url_parts['path'], $matches)) {
+ $bucket = trim($matches[1], '/');
+ $url_parts['path'] = $matches[2];
+ $url_parts['host'] = $bucket . '.' . $url_parts['host'];
+ $URLs[$key] = Utility::join_url($url_parts);
}
}
}
return $URLs;
}
-
}
-
}
-
}
diff --git a/lib/classes/compatibility/simple-local-avatars.php b/lib/classes/compatibility/simple-local-avatars.php
deleted file mode 100644
index baea642b7..000000000
--- a/lib/classes/compatibility/simple-local-avatars.php
+++ /dev/null
@@ -1,78 +0,0 @@
-get_gs_host();
- $bucketLink = apply_filters('wp_stateless_bucket_link', $image_host);
- $upload = wp_get_upload_dir();
-
- // Replace local urls with corresponding GCS urls
- if ( !empty( $user_meta[0] ) && is_array( $user_meta[0] ) ) {
- foreach ( $user_meta[0] as $key => &$value ) {
- if ( is_numeric( $key ) ) {
- $value = trailingslashit( $bucketLink ) . apply_filters( 'wp_stateless_file_name', str_replace( $upload['baseurl'], '', $value ), true );
- }
- }
- }
-
- // Return filtered data back
- return $user_meta;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/lib/classes/compatibility/siteorigin-css.php b/lib/classes/compatibility/siteorigin-css.php
index 6e3896431..325a268d1 100644
--- a/lib/classes/compatibility/siteorigin-css.php
+++ b/lib/classes/compatibility/siteorigin-css.php
@@ -1,4 +1,5 @@
get_client()->list_objects("prefix=$prefix");
// $files_array = $object_list->getItems();
// foreach ($files_array as $file) {
// do_action( 'sm:sync::deleteFile', $file->name );
// }
- } catch( Exception $e ) {
+ } catch (Exception $e) {
}
}
}
@@ -53,23 +54,20 @@ public function action_admin_menu() {
* @param $orig_scheme
* @return string
*/
- public function set_url_scheme( $url, $scheme, $orig_scheme ) {
- $position = strpos( $url, 'so-css/' );
- if( $position !== false ) {
+ public function set_url_scheme($url, $scheme, $orig_scheme) {
+ $position = strpos($url, 'so-css/');
+ if ($position !== false) {
$upload_data = wp_upload_dir();
- $name = substr( $url, $position );
+ $name = substr($url, $position);
// We need to get the absolute path before adding the bucket dir to name.
- $absolutePath = $upload_data[ 'basedir' ] . '/' . $name;
- $name = apply_filters( 'wp_stateless_file_name', $name, 0);
- do_action( 'sm:sync::syncFile', $name, $absolutePath );
+ $absolutePath = $upload_data['basedir'] . '/' . $name;
+ $name = apply_filters('wp_stateless_file_name', $name, 0);
+ do_action('sm:sync::syncFile', $name, $absolutePath);
// echo "do_action( 'sm:sync::syncFile', $name, $absolutePath);\n";
$url = ud_get_stateless_media()->get_gs_host() . '/' . $name;
}
return $url;
}
-
}
-
}
-
}
diff --git a/lib/classes/compatibility/siteorigin-widget-bundle.php b/lib/classes/compatibility/siteorigin-widget-bundle.php
index 6035cb403..412a3e936 100644
--- a/lib/classes/compatibility/siteorigin-widget-bundle.php
+++ b/lib/classes/compatibility/siteorigin-widget-bundle.php
@@ -1,4 +1,5 @@
get_gs_host() . '/' . $name;
}
return $url;
@@ -57,8 +58,8 @@ public function set_url_scheme( $url, $scheme, $orig_scheme ) {
* @param $transient
* @return mixed
*/
- public function clear_file_cache( $value, $expiration, $transient ) {
- do_action( 'sm:sync::deleteFiles', 'siteorigin-widgets/' );
+ public function clear_file_cache($value, $expiration, $transient) {
+ do_action('sm:sync::deleteFiles', 'siteorigin-widgets/');
return $value;
}
@@ -69,20 +70,16 @@ public function clear_file_cache( $value, $expiration, $transient ) {
* @param $so_widget
* @return mixed
*/
- public function delete_file( $new_instance, $form_options, $so_widget ) {
- $new_instance = $so_widget->modify_instance( $new_instance );
- $style = $so_widget->get_style_name( $new_instance );
- $hash = $so_widget->get_style_hash( $new_instance );
+ public function delete_file($new_instance, $form_options, $so_widget) {
+ $new_instance = $so_widget->modify_instance($new_instance);
+ $style = $so_widget->get_style_name($new_instance);
+ $hash = $so_widget->get_style_hash($new_instance);
$name = $so_widget->id_base . '-' . $style . '-' . $hash;
$file = 'siteorigin-widgets/' . $name . '.css';
- do_action( 'sm:sync::deleteFile', $file );
+ do_action('sm:sync::deleteFile', $file);
return $new_instance;
}
-
-
}
-
}
-
}
diff --git a/lib/classes/compatibility/the-events-calendar.php b/lib/classes/compatibility/the-events-calendar.php
deleted file mode 100644
index 6b7b3beec..000000000
--- a/lib/classes/compatibility/the-events-calendar.php
+++ /dev/null
@@ -1,48 +0,0 @@
-get_client();
- $file_path = apply_filters( 'wp_stateless_file_name', $file, 0 );
- $file_info = @getimagesize( $file );
+ $file_path = apply_filters('wp_stateless_file_name', $file, 0);
+ $file_info = @getimagesize($file);
if ($file_info) {
$_metadata = array(
'width' => $file_info[0],
'height' => $file_info[1],
'object-id' => 'unknown', // we really don't know it
- 'source-id' => md5( $file . ud_get_stateless_media()->get( 'sm.bucket' ) ),
- 'file-hash' => md5( $file )
+ 'source-id' => md5($file . ud_get_stateless_media()->get('sm.bucket')),
+ 'file-hash' => md5($file)
);
}
@@ -75,7 +76,5 @@ public function wp_handle_upload( $upload ) {
return $upload;
}
}
-
}
-
}
diff --git a/lib/classes/compatibility/wp-retina-2x.php b/lib/classes/compatibility/wp-retina-2x.php
index bd2166f90..557de22ac 100644
--- a/lib/classes/compatibility/wp-retina-2x.php
+++ b/lib/classes/compatibility/wp-retina-2x.php
@@ -1,4 +1,5 @@
"Over HTTP Check" setting is enabled.';
protected $plugin_file = 'wp-retina-2x-pro/wp-retina-2x-pro.php';
- protected $sm_mode_not_supported = [ 'stateless' ];
+ protected $sm_mode_not_supported = ['stateless'];
/**
* @param $sm
*/
- public function module_init( $sm ) {
+ public function module_init($sm) {
// Sync image.
// wr2x_before_generate_retina is always called
// where wr2x_before_regenerate called from ajax requests.
- add_action( 'wr2x_before_generate_retina', array( $this, 'before_generate_retina' ) );
- add_action( 'wr2x_retina_file_added', array( $this, 'retina_file_added' ), 10, 3 );
+ add_action('wr2x_before_generate_retina', array($this, 'before_generate_retina'));
+ add_action('wr2x_retina_file_added', array($this, 'retina_file_added'), 10, 3);
// Delete retina image from GCS.
- add_action( 'delete_attachment', array( $this, 'delete_retina' ) );
+ add_action('delete_attachment', array($this, 'delete_retina'));
// Manual Sync retina images.
- add_action( 'sm:synced::image', array( $this, 'manual_sync_retina' ), 10, 2 );
+ add_action('sm:synced::image', array($this, 'manual_sync_retina'), 10, 2);
- $over_http = get_option( 'wr2x_over_http_check', false );
- if( !$over_http ) {
- $url = admin_url( 'admin.php?page=wr2x_settings-menu' );
- ud_get_stateless_media()->errors->add( array( 'key' => "wp-retina-2x-pro-over-http-check", 'title' => sprintf( __( "WP Stateless Compatibility: WP Retina 2x Pro", ud_get_stateless_media()->domain ) ), 'message' => sprintf( __( 'Please enable the "Over HTTP Check" settings in Meow Apps > Retina.', ud_get_stateless_media()->domain ), $url ), ), 'notice' );
+ $over_http = get_option('wr2x_over_http_check', false);
+ if (!$over_http) {
+ $url = admin_url('admin.php?page=wr2x_settings-menu');
+ ud_get_stateless_media()->errors->add(array('key' => "wp-retina-2x-pro-over-http-check", 'title' => sprintf(__("WP Stateless Compatibility: WP Retina 2x Pro", ud_get_stateless_media()->domain)), 'message' => sprintf(__('Please enable the "Over HTTP Check" settings in Meow Apps > Retina.', ud_get_stateless_media()->domain), $url),), 'notice');
}
}
@@ -49,15 +50,15 @@ public function module_init( $sm ) {
* @param int $attachment_id
* @return void
*/
- public function before_generate_retina( $attachment_id ) {
+ public function before_generate_retina($attachment_id) {
$upload_basedir = wp_upload_dir();
- $upload_basedir = trailingslashit( $upload_basedir[ 'basedir' ] );
- $metadata = wp_get_attachment_metadata( $attachment_id );
- $image_sizes = Utility::get_path_and_url( $metadata, $attachment_id );
+ $upload_basedir = trailingslashit($upload_basedir['basedir']);
+ $metadata = wp_get_attachment_metadata($attachment_id);
+ $image_sizes = Utility::get_path_and_url($metadata, $attachment_id);
- foreach( $image_sizes as $image ) {
- if( !empty( $image[ 'gs_name' ] ) && !file_exists( $image[ 'path' ] ) ) {
- ud_get_stateless_media()->get_client()->get_media( $image[ 'gs_name' ], true, $image[ 'path' ] );
+ foreach ($image_sizes as $image) {
+ if (!empty($image['gs_name']) && !file_exists($image['path'])) {
+ ud_get_stateless_media()->get_client()->get_media($image['gs_name'], true, $image['path']);
}
}
}
@@ -70,9 +71,9 @@ public function before_generate_retina( $attachment_id ) {
* @param String $name image size
* @return void
*/
- public function retina_file_added( $attachment_id, $retina_file, $name ) {
- $gs_name = apply_filters( 'wp_stateless_file_name', $retina_file, 0 );
- do_action( 'sm:sync::syncFile', $gs_name, $retina_file, true, array( 'use_root' => true ) );
+ public function retina_file_added($attachment_id, $retina_file, $name) {
+ $gs_name = apply_filters('wp_stateless_file_name', $retina_file, 0);
+ do_action('sm:sync::syncFile', $gs_name, $retina_file, true, array('use_root' => true));
}
/**
@@ -81,20 +82,20 @@ public function retina_file_added( $attachment_id, $retina_file, $name ) {
* @param int $attachment_id
* @return void
*/
- public function delete_retina( $attachment_id ) {
- $metadata = wp_get_attachment_metadata( $attachment_id );
- $image_sizes = Utility::get_path_and_url( $metadata, $attachment_id );
- $ignore = get_option( "wr2x_ignore_sizes" );
- if( empty( $ignore ) ) $ignore = array();
-
- foreach( $image_sizes as $size => $img ) {
- if( in_array( $size, $ignore ) ) {
+ public function delete_retina($attachment_id) {
+ $metadata = wp_get_attachment_metadata($attachment_id);
+ $image_sizes = Utility::get_path_and_url($metadata, $attachment_id);
+ $ignore = get_option("wr2x_ignore_sizes");
+ if (empty($ignore)) $ignore = array();
+
+ foreach ($image_sizes as $size => $img) {
+ if (in_array($size, $ignore)) {
continue;
}
- $pathinfo = pathinfo( $img[ 'gs_name' ] );
- $gs_name_retina = trailingslashit( $pathinfo[ 'dirname' ] ) . $pathinfo[ 'filename' ] . '@2x.' . $pathinfo[ 'extension' ];
+ $pathinfo = pathinfo($img['gs_name']);
+ $gs_name_retina = trailingslashit($pathinfo['dirname']) . $pathinfo['filename'] . '@2x.' . $pathinfo['extension'];
// @todo Sometime relevant file don't exist on GCS. Try to skip those when retina don't exist.
- do_action( 'sm:sync::deleteFile', $gs_name_retina );
+ do_action('sm:sync::deleteFile', $gs_name_retina);
}
}
@@ -105,26 +106,25 @@ public function delete_retina( $attachment_id ) {
* @param array $metadata
* @return void
*/
- public function manual_sync_retina( $attachment_id, $metadata ) {
- $image_sizes = Utility::get_path_and_url( $metadata, $attachment_id );
+ public function manual_sync_retina($attachment_id, $metadata) {
+ $image_sizes = Utility::get_path_and_url($metadata, $attachment_id);
- $ignore = get_option( "wr2x_ignore_sizes" );
- if( empty( $ignore ) ) $ignore = array();
+ $ignore = get_option("wr2x_ignore_sizes");
+ if (empty($ignore)) $ignore = array();
- foreach( $image_sizes as $size => $img ) {
- if( in_array( $size, $ignore ) ) {
+ foreach ($image_sizes as $size => $img) {
+ if (in_array($size, $ignore)) {
continue;
}
- $pathinfo = pathinfo( $img['path'] ) ;
- $retina_file = trailingslashit( $pathinfo['dirname'] ) . $pathinfo['filename'] . '@2x.' . $pathinfo['extension'];
- $gs_name = apply_filters( 'wp_stateless_file_name', $retina_file, 0);
+ $pathinfo = pathinfo($img['path']);
+ $retina_file = trailingslashit($pathinfo['dirname']) . $pathinfo['filename'] . '@2x.' . $pathinfo['extension'];
+ $gs_name = apply_filters('wp_stateless_file_name', $retina_file, 0);
// @todo Sometime relevant file don't exist on GCS. Try to skip those when retina don't exist.
- do_action( 'sm:sync::syncFile', $gs_name, $retina_file, false, array( 'use_root' => true ) );
+ do_action('sm:sync::syncFile', $gs_name, $retina_file, false, array('use_root' => true));
}
}
}
}
-
}
diff --git a/lib/classes/compatibility/wp-smush.php b/lib/classes/compatibility/wp-smush.php
index 01511d393..948e1c4da 100644
--- a/lib/classes/compatibility/wp-smush.php
+++ b/lib/classes/compatibility/wp-smush.php
@@ -1,4 +1,5 @@
core()->mod->settings->get( 'auto' );
+ if (class_exists('WP_Smush_Modules')) {
+ $auto_smush = \WP_Smush::get_instance()->core()->mod->settings->get('auto');
} else {
global $wpsmush_settings;
- $auto_smush = $wpsmush_settings->settings[ 'auto' ];
+ $auto_smush = $wpsmush_settings->settings['auto'];
}
- if (!$auto_smush || !wp_attachment_is_image($attachment_id) ||
+ if (
+ !$auto_smush || !wp_attachment_is_image($attachment_id) ||
!apply_filters('wp_smush_image', true, $attachment_id) ||
!(
((!empty($_POST['action']) && 'upload-attachment' == $_POST['action']) || isset($_POST['post_id'])) &&
// And, check if Async is enabled.
- defined('WP_SMUSH_ASYNC') && WP_SMUSH_ASYNC
- )
+ defined('WP_SMUSH_ASYNC') && WP_SMUSH_ASYNC)
) {
return false;
}
@@ -85,12 +86,12 @@ public function skip_add_media( $return, $metadata, $attachment_id, $force = fal
*
* @return null
*/
- public function image_optimized( $attachment_id, $stats ) {
+ public function image_optimized($attachment_id, $stats) {
// Sync the attachment to GCS
- ud_get_stateless_media()->add_media( array(), $attachment_id, true );
+ ud_get_stateless_media()->add_media(array(), $attachment_id, true);
// also sync the backup images
- $this->sync_backup( $attachment_id );
+ $this->sync_backup($attachment_id);
}
/**
@@ -102,26 +103,26 @@ public function image_optimized( $attachment_id, $stats ) {
*
* @return null
*/
- function maybe_download_file( $file_path = '', $attachment_id = '', $size_details = array() ) {
- if( empty( $file_path ) || empty( $attachment_id ) ) {
+ function maybe_download_file($file_path = '', $attachment_id = '', $size_details = array()) {
+ if (empty($file_path) || empty($attachment_id)) {
return;
}
//Download if file not exists
- if( !file_exists( $file_path ) ) {
+ if (!file_exists($file_path)) {
$client = ud_get_stateless_media()->get_client();
- $metadata = wp_get_attachment_metadata( $attachment_id );
- if( !empty( $metadata[ 'gs_name' ] ) ) {
- $image_sizes = Utility::get_path_and_url( $metadata, $attachment_id );
- foreach( $image_sizes as $size => $img ) {
- $client->get_media( apply_filters( 'wp_stateless_file_name', $img[ 'gs_name' ] ), true, $img[ 'path' ] );
+ $metadata = wp_get_attachment_metadata($attachment_id);
+ if (!empty($metadata['gs_name'])) {
+ $image_sizes = Utility::get_path_and_url($metadata, $attachment_id);
+ foreach ($image_sizes as $size => $img) {
+ $client->get_media(apply_filters('wp_stateless_file_name', $img['gs_name']), true, $img['path']);
}
- $gs_name = dirname( $metadata[ 'gs_name' ] ) . '/' . basename( $file_path );
+ $gs_name = dirname($metadata['gs_name']) . '/' . basename($file_path);
// We need to remove backup from GCS if it's a restore action
// @todo revise this code
- if( $this->hook_from_restore_image() ) {
- $client->remove_media( apply_filters( 'wp_stateless_file_name', $gs_name ) );
+ if ($this->hook_from_restore_image()) {
+ $client->remove_media(apply_filters('wp_stateless_file_name', $gs_name));
}
}
}
@@ -132,25 +133,24 @@ function maybe_download_file( $file_path = '', $attachment_id = '', $size_detail
*
* @param $attachment_id
*/
- function remove_backup( $attachment_id ) {
+ function remove_backup($attachment_id) {
$upload_dir = wp_get_upload_dir();
- $metadata = wp_get_attachment_metadata( $attachment_id );
- $backup_paths = get_post_meta( $attachment_id, '_wp_attachment_backup_sizes', true );
+ $metadata = wp_get_attachment_metadata($attachment_id);
+ $backup_paths = get_post_meta($attachment_id, '_wp_attachment_backup_sizes', true);
- if( !empty( $metadata[ 'gs_name' ] ) && !empty( $backup_paths ) && is_array( $backup_paths ) ) {
+ if (!empty($metadata['gs_name']) && !empty($backup_paths) && is_array($backup_paths)) {
// Getting local dir path for backup image
- $base_dir = $upload_dir[ 'basedir' ] . '/' . dirname( $metadata[ 'file' ] );
+ $base_dir = $upload_dir['basedir'] . '/' . dirname($metadata['file']);
// Getting GCS dir name from meta data. In case Bucket Folder used.
- $gs_dir = dirname( $metadata[ 'gs_name' ] );
- foreach( $backup_paths as $key => $data ) {
- $gs_name = $gs_dir . '/' . basename( $data[ 'file' ] );
+ $gs_dir = dirname($metadata['gs_name']);
+ foreach ($backup_paths as $key => $data) {
+ $gs_name = $gs_dir . '/' . basename($data['file']);
// Path of backup image
- $backup_path = $base_dir . '/' . basename( $data[ 'file' ] );
- do_action( 'sm:sync::deleteFile', apply_filters( 'wp_stateless_file_name', $gs_name ), $backup_path );
- delete_transient( 'sm-wp-smush-backup-exists-' . $attachment_id );
+ $backup_path = $base_dir . '/' . basename($data['file']);
+ do_action('sm:sync::deleteFile', apply_filters('wp_stateless_file_name', $gs_name), $backup_path);
+ delete_transient('sm-wp-smush-backup-exists-' . $attachment_id);
}
}
-
}
/**
@@ -161,17 +161,17 @@ function remove_backup( $attachment_id ) {
*
* @return bool
*/
- function backup_exists_on_gcs( $exists, $attachment_id = '', $backup_path = '' ) {
- if( !$exists && $attachment_id ) {
- if( get_transient( 'sm-wp-smush-backup-exists-' . $attachment_id ) ) {
+ function backup_exists_on_gcs($exists, $attachment_id = '', $backup_path = '') {
+ if (!$exists && $attachment_id) {
+ if (get_transient('sm-wp-smush-backup-exists-' . $attachment_id)) {
return true;
}
- $metadata = wp_get_attachment_metadata( $attachment_id );
- if( !empty( $metadata[ 'gs_name' ] ) ) {
- $gs_name = dirname( $metadata[ 'gs_name' ] ) . '/' . basename( $backup_path );
- if( ud_get_stateless_media()->get_client()->media_exists( apply_filters( 'wp_stateless_file_name', $gs_name ) ) ) {
- set_transient( 'sm-wp-smush-backup-exists-' . $attachment_id, true, HOUR_IN_SECONDS );
+ $metadata = wp_get_attachment_metadata($attachment_id);
+ if (!empty($metadata['gs_name'])) {
+ $gs_name = dirname($metadata['gs_name']) . '/' . basename($backup_path);
+ if (ud_get_stateless_media()->get_client()->media_exists(apply_filters('wp_stateless_file_name', $gs_name))) {
+ set_transient('sm-wp-smush-backup-exists-' . $attachment_id, true, HOUR_IN_SECONDS);
return true;
}
}
@@ -186,28 +186,28 @@ function backup_exists_on_gcs( $exists, $attachment_id = '', $backup_path = '' )
* @param $attachment_id
* @param array $metadata
*/
- public function sync_backup( $attachment_id, $metadata = array() ) {
+ public function sync_backup($attachment_id, $metadata = array()) {
$upload_dir = wp_get_upload_dir();
- if( empty( $metadata ) || empty( $metadata[ 'gs_name' ] ) ) {
- $metadata = wp_get_attachment_metadata( $attachment_id );
+ if (empty($metadata) || empty($metadata['gs_name'])) {
+ $metadata = wp_get_attachment_metadata($attachment_id);
}
// Getting backup path from smush settings in db
- $backup_paths = get_post_meta( $attachment_id, '_wp_attachment_backup_sizes', true );
+ $backup_paths = get_post_meta($attachment_id, '_wp_attachment_backup_sizes', true);
- if( !empty( $metadata[ 'gs_name' ] ) && !empty( $backup_paths ) && is_array( $backup_paths ) ) {
+ if (!empty($metadata['gs_name']) && !empty($backup_paths) && is_array($backup_paths)) {
// Getting local dir for backup image
- $base_dir = $upload_dir[ 'basedir' ] . '/' . dirname( $metadata[ 'file' ] );
+ $base_dir = $upload_dir['basedir'] . '/' . dirname($metadata['file']);
// Getting GCS dir name from meta data. In case Bucket Folder used.
- $gs_dir = dirname( $metadata[ 'gs_name' ] );
+ $gs_dir = dirname($metadata['gs_name']);
- foreach( $backup_paths as $key => $data ) {
- $gs_name = $gs_dir . '/' . basename( $data[ 'file' ] );
+ foreach ($backup_paths as $key => $data) {
+ $gs_name = $gs_dir . '/' . basename($data['file']);
// Path of backup image
- $backup_path = $base_dir . '/' . basename( $data[ 'file' ] );
+ $backup_path = $base_dir . '/' . basename($data['file']);
// Sync backup image with GCS
- do_action( 'sm:sync::syncFile', apply_filters( 'wp_stateless_file_name', $gs_name ), $backup_path );
- delete_transient( 'sm-wp-smush-backup-exists-' . $attachment_id );
+ do_action('sm:sync::syncFile', apply_filters('wp_stateless_file_name', $gs_name), $backup_path);
+ delete_transient('sm-wp-smush-backup-exists-' . $attachment_id);
}
}
}
@@ -220,12 +220,12 @@ public function sync_backup( $attachment_id, $metadata = array() ) {
*/
private function hook_from_restore_image() {
$call_stack = debug_backtrace();
- $class_name = class_exists( 'WpSmushBackup' ) ? 'WpSmushBackup' : 'WP_Smush_Backup';
+ $class_name = class_exists('WpSmushBackup') ? 'WpSmushBackup' : 'WP_Smush_Backup';
- if( !empty( $call_stack ) && is_array( $call_stack ) ) {
- foreach( $call_stack as $step ) {
+ if (!empty($call_stack) && is_array($call_stack)) {
+ foreach ($call_stack as $step) {
- if( $step[ 'function' ] == 'restore_image' && $step[ 'class' ] == $class_name ) {
+ if ($step['function'] == 'restore_image' && $step['class'] == $class_name) {
return true;
}
}
@@ -233,9 +233,6 @@ private function hook_from_restore_image() {
return false;
}
-
}
-
}
-
}
diff --git a/lib/classes/compatibility/wpbakery-page-builder.php b/lib/classes/compatibility/wpbakery-page-builder.php
index 0bc3ecf40..99defa802 100644
--- a/lib/classes/compatibility/wpbakery-page-builder.php
+++ b/lib/classes/compatibility/wpbakery-page-builder.php
@@ -1,4 +1,5 @@
enabled ) {
+ if ($this->enabled) {
// We need to add the filter on construct. Init is too late.
- add_filter( 'vc_wpb_getimagesize', array( $this, 'vc_wpb_getimagesize' ), 10, 3 );
+ add_filter('vc_wpb_getimagesize', array($this, 'vc_wpb_getimagesize'), 10, 3);
}
}
/**
* @param $sm
*/
- public function module_init( $sm ) {
+ public function module_init($sm) {
//
}
@@ -48,36 +49,33 @@ public function module_init( $sm ) {
* @param $params
* @return mixed
*/
- public function vc_wpb_getimagesize( $args, $attach_id, $params ) {
- if( !$this->enabled ) return $args;
+ public function vc_wpb_getimagesize($args, $attach_id, $params) {
+ if (!$this->enabled) return $args;
$gs_host = ud_get_stateless_media()->get_gs_host();
- $meta_data = wp_get_attachment_metadata( $attach_id );
- preg_match( "/src=[\"|'](.*?)[\"|']/", $args[ 'thumbnail' ], $match );
+ $meta_data = wp_get_attachment_metadata($attach_id);
+ preg_match("/src=[\"|'](.*?)[\"|']/", $args['thumbnail'], $match);
- if( !empty( $match[ 1 ] ) && empty( $meta_data[ 'sizes' ][ $params[ 'thumb_size' ] ] ) ) {
+ if (!empty($match[1]) && empty($meta_data['sizes'][$params['thumb_size']])) {
$dir = wp_upload_dir();
- $url = $match[ 1 ];
- $path = str_replace( $gs_host, '', $url );
- $path = trim( $path, '/' );
- $absolute_path = $dir[ 'basedir' ] . '/' . $path;
+ $url = $match[1];
+ $path = str_replace($gs_host, '', $url);
+ $path = trim($path, '/');
+ $absolute_path = $dir['basedir'] . '/' . $path;
- $size = getimagesize( $absolute_path );
- $filetype = wp_check_filetype( $absolute_path );
+ $size = getimagesize($absolute_path);
+ $filetype = wp_check_filetype($absolute_path);
$size_info = array(
- 'file' => wp_basename( $absolute_path ),
+ 'file' => wp_basename($absolute_path),
'mime-type' => $filetype['type'],
'width' => $size[0],
'height' => $size[1],
);
- $meta_data[ 'sizes' ][ $params[ 'thumb_size' ] ] = $size_info;
- wp_update_attachment_metadata( $attach_id, $meta_data );
+ $meta_data['sizes'][$params['thumb_size']] = $size_info;
+ wp_update_attachment_metadata($attach_id, $meta_data);
}
return $args;
}
-
}
-
}
-
}
diff --git a/lib/classes/compatibility/wpforms.php b/lib/classes/compatibility/wpforms.php
index ecd25bef1..575b048bb 100644
--- a/lib/classes/compatibility/wpforms.php
+++ b/lib/classes/compatibility/wpforms.php
@@ -1,4 +1,5 @@
Date: Tue, 24 Oct 2023 18:34:47 +0300
Subject: [PATCH 02/53] Composer install
---
composer.json | 5 +
vendor/autoload.php | 18 +
vendor/bin/mozart | 120 +-
vendor/composer/ClassLoader.php | 202 +-
vendor/composer/InstalledVersions.php | 359 +++
vendor/composer/autoload_classmap.php | 21 +-
vendor/composer/autoload_files.php | 2 +-
vendor/composer/autoload_namespaces.php | 2 +-
vendor/composer/autoload_psr4.php | 2 +-
vendor/composer/autoload_real.php | 51 +-
vendor/composer/autoload_static.php | 20 +-
vendor/composer/installed.json | 3405 ++++++++++++-----------
vendor/composer/installed.php | 257 ++
vendor/composer/platform_check.php | 26 +
14 files changed, 2701 insertions(+), 1789 deletions(-)
mode change 120000 => 100755 vendor/bin/mozart
create mode 100644 vendor/composer/InstalledVersions.php
create mode 100644 vendor/composer/installed.php
create mode 100644 vendor/composer/platform_check.php
diff --git a/composer.json b/composer.json
index ce342fe63..97c1543ea 100644
--- a/composer.json
+++ b/composer.json
@@ -92,5 +92,10 @@
"require-dev": {
"coenjacobs/mozart": "0.7.1",
"deliciousbrains/wp-background-processing": "^1.0"
+ },
+ "config": {
+ "allow-plugins": {
+ "composer/installers": true
+ }
}
}
diff --git a/vendor/autoload.php b/vendor/autoload.php
index 78a66e62d..9ceacb360 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -2,6 +2,24 @@
// autoload.php @generated by Composer
+if (PHP_VERSION_ID < 50600) {
+ if (!headers_sent()) {
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+ $err = '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;
+ if (!ini_get('display_errors')) {
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+ fwrite(STDERR, $err);
+ } elseif (!headers_sent()) {
+ echo $err;
+ }
+ }
+ trigger_error(
+ $err,
+ E_USER_ERROR
+ );
+}
+
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitc59d002476a452800baaf79c430753cb::getLoader();
diff --git a/vendor/bin/mozart b/vendor/bin/mozart
deleted file mode 120000
index fcec443a6..000000000
--- a/vendor/bin/mozart
+++ /dev/null
@@ -1 +0,0 @@
-../coenjacobs/mozart/bin/mozart
\ No newline at end of file
diff --git a/vendor/bin/mozart b/vendor/bin/mozart
new file mode 100755
index 000000000..50ad97f47
--- /dev/null
+++ b/vendor/bin/mozart
@@ -0,0 +1,119 @@
+#!/usr/bin/env php
+realpath = realpath($opened_path) ?: $opened_path;
+ $opened_path = $this->realpath;
+ $this->handle = fopen($this->realpath, $mode);
+ $this->position = 0;
+
+ return (bool) $this->handle;
+ }
+
+ public function stream_read($count)
+ {
+ $data = fread($this->handle, $count);
+
+ if ($this->position === 0) {
+ $data = preg_replace('{^#!.*\r?\n}', '', $data);
+ }
+
+ $this->position += strlen($data);
+
+ return $data;
+ }
+
+ public function stream_cast($castAs)
+ {
+ return $this->handle;
+ }
+
+ public function stream_close()
+ {
+ fclose($this->handle);
+ }
+
+ public function stream_lock($operation)
+ {
+ return $operation ? flock($this->handle, $operation) : true;
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ if (0 === fseek($this->handle, $offset, $whence)) {
+ $this->position = ftell($this->handle);
+ return true;
+ }
+
+ return false;
+ }
+
+ public function stream_tell()
+ {
+ return $this->position;
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->handle);
+ }
+
+ public function stream_stat()
+ {
+ return array();
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ return true;
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $path = substr($path, 17);
+ if (file_exists($path)) {
+ return stat($path);
+ }
+
+ return false;
+ }
+ }
+ }
+
+ if (
+ (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
+ || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
+ ) {
+ return include("phpvfscomposer://" . __DIR__ . '/..'.'/coenjacobs/mozart/bin/mozart');
+ }
+}
+
+return include __DIR__ . '/..'.'/coenjacobs/mozart/bin/mozart';
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index 03b9bb9c4..7824d8f7e 100644
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -37,26 +37,81 @@
*
* @author Fabien Potencier
* @author Jordi Boggiano
- * @see http://www.php-fig.org/psr/psr-0/
- * @see http://www.php-fig.org/psr/psr-4/
+ * @see https://www.php-fig.org/psr/psr-0/
+ * @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
+ /** @var \Closure(string):void */
+ private static $includeFile;
+
+ /** @var string|null */
+ private $vendorDir;
+
// PSR-4
+ /**
+ * @var array>
+ */
private $prefixLengthsPsr4 = array();
+ /**
+ * @var array>
+ */
private $prefixDirsPsr4 = array();
+ /**
+ * @var list
+ */
private $fallbackDirsPsr4 = array();
// PSR-0
+ /**
+ * List of PSR-0 prefixes
+ *
+ * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
+ *
+ * @var array>>
+ */
private $prefixesPsr0 = array();
+ /**
+ * @var list
+ */
private $fallbackDirsPsr0 = array();
+ /** @var bool */
private $useIncludePath = false;
+
+ /**
+ * @var array
+ */
private $classMap = array();
+
+ /** @var bool */
private $classMapAuthoritative = false;
+
+ /**
+ * @var array
+ */
private $missingClasses = array();
+
+ /** @var string|null */
private $apcuPrefix;
+ /**
+ * @var array
+ */
+ private static $registeredLoaders = array();
+
+ /**
+ * @param string|null $vendorDir
+ */
+ public function __construct($vendorDir = null)
+ {
+ $this->vendorDir = $vendorDir;
+ self::initializeIncludeClosure();
+ }
+
+ /**
+ * @return array>
+ */
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
@@ -66,28 +121,42 @@ public function getPrefixes()
return array();
}
+ /**
+ * @return array>
+ */
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
+ /**
+ * @return list
+ */
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
+ /**
+ * @return list
+ */
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
+ /**
+ * @return array Array of classname => path
+ */
public function getClassMap()
{
return $this->classMap;
}
/**
- * @param array $classMap Class to filename map
+ * @param array $classMap Class to filename map
+ *
+ * @return void
*/
public function addClassMap(array $classMap)
{
@@ -102,22 +171,25 @@ public function addClassMap(array $classMap)
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
- * @param string $prefix The prefix
- * @param array|string $paths The PSR-0 root directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix
+ * @param list|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @return void
*/
public function add($prefix, $paths, $prepend = false)
{
+ $paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
- (array) $paths,
+ $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
- (array) $paths
+ $paths
);
}
@@ -126,19 +198,19 @@ public function add($prefix, $paths, $prepend = false)
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+ $this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
- (array) $paths,
+ $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
- (array) $paths
+ $paths
);
}
}
@@ -147,25 +219,28 @@ public function add($prefix, $paths, $prepend = false)
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
+ *
+ * @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
+ $paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
- (array) $paths,
+ $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
- (array) $paths
+ $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@@ -175,18 +250,18 @@ public function addPsr4($prefix, $paths, $prepend = false)
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ $this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
- (array) $paths,
+ $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
- (array) $paths
+ $paths
);
}
}
@@ -195,8 +270,10 @@ public function addPsr4($prefix, $paths, $prepend = false)
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
- * @param string $prefix The prefix
- * @param array|string $paths The PSR-0 base directories
+ * @param string $prefix The prefix
+ * @param list|string $paths The PSR-0 base directories
+ *
+ * @return void
*/
public function set($prefix, $paths)
{
@@ -211,10 +288,12 @@ public function set($prefix, $paths)
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
+ *
+ * @return void
*/
public function setPsr4($prefix, $paths)
{
@@ -234,6 +313,8 @@ public function setPsr4($prefix, $paths)
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
+ *
+ * @return void
*/
public function setUseIncludePath($useIncludePath)
{
@@ -256,6 +337,8 @@ public function getUseIncludePath()
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
+ *
+ * @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
@@ -276,6 +359,8 @@ public function isClassMapAuthoritative()
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
+ *
+ * @return void
*/
public function setApcuPrefix($apcuPrefix)
{
@@ -296,33 +381,55 @@ public function getApcuPrefix()
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
+ *
+ * @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+
+ if (null === $this->vendorDir) {
+ return;
+ }
+
+ if ($prepend) {
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
+ } else {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ self::$registeredLoaders[$this->vendorDir] = $this;
+ }
}
/**
* Unregisters this instance as an autoloader.
+ *
+ * @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
+
+ if (null !== $this->vendorDir) {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ }
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
- * @return bool|null True if loaded, null otherwise
+ * @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
- includeFile($file);
+ $includeFile = self::$includeFile;
+ $includeFile($file);
return true;
}
+
+ return null;
}
/**
@@ -367,6 +474,21 @@ public function findFile($class)
return $file;
}
+ /**
+ * Returns the currently registered loaders keyed by their corresponding vendor directories.
+ *
+ * @return array
+ */
+ public static function getRegisteredLoaders()
+ {
+ return self::$registeredLoaders;
+ }
+
+ /**
+ * @param string $class
+ * @param string $ext
+ * @return string|false
+ */
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
@@ -432,14 +554,26 @@ private function findFileWithExtension($class, $ext)
return false;
}
-}
-/**
- * Scope isolated include.
- *
- * Prevents access to $this/self from included files.
- */
-function includeFile($file)
-{
- include $file;
+ /**
+ * @return void
+ */
+ private static function initializeIncludeClosure()
+ {
+ if (self::$includeFile !== null) {
+ return;
+ }
+
+ /**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ *
+ * @param string $file
+ * @return void
+ */
+ self::$includeFile = \Closure::bind(static function($file) {
+ include $file;
+ }, null, null);
+ }
}
diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php
new file mode 100644
index 000000000..51e734a77
--- /dev/null
+++ b/vendor/composer/InstalledVersions.php
@@ -0,0 +1,359 @@
+
+ * Jordi Boggiano
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer;
+
+use Composer\Autoload\ClassLoader;
+use Composer\Semver\VersionParser;
+
+/**
+ * This class is copied in every Composer installed project and available to all
+ *
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
+ *
+ * To require its presence, you can require `composer-runtime-api ^2.0`
+ *
+ * @final
+ */
+class InstalledVersions
+{
+ /**
+ * @var mixed[]|null
+ * @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}|array{}|null
+ */
+ private static $installed;
+
+ /**
+ * @var bool|null
+ */
+ private static $canGetVendors;
+
+ /**
+ * @var array[]
+ * @psalm-var array}>
+ */
+ private static $installedByVendor = array();
+
+ /**
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
+ *
+ * @return string[]
+ * @psalm-return list
+ */
+ public static function getInstalledPackages()
+ {
+ $packages = array();
+ foreach (self::getInstalled() as $installed) {
+ $packages[] = array_keys($installed['versions']);
+ }
+
+ if (1 === \count($packages)) {
+ return $packages[0];
+ }
+
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
+ }
+
+ /**
+ * Returns a list of all package names with a specific type e.g. 'library'
+ *
+ * @param string $type
+ * @return string[]
+ * @psalm-return list
+ */
+ public static function getInstalledPackagesByType($type)
+ {
+ $packagesByType = array();
+
+ foreach (self::getInstalled() as $installed) {
+ foreach ($installed['versions'] as $name => $package) {
+ if (isset($package['type']) && $package['type'] === $type) {
+ $packagesByType[] = $name;
+ }
+ }
+ }
+
+ return $packagesByType;
+ }
+
+ /**
+ * Checks whether the given package is installed
+ *
+ * This also returns true if the package name is provided or replaced by another package
+ *
+ * @param string $packageName
+ * @param bool $includeDevRequirements
+ * @return bool
+ */
+ public static function isInstalled($packageName, $includeDevRequirements = true)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (isset($installed['versions'][$packageName])) {
+ return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether the given package satisfies a version constraint
+ *
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
+ *
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
+ *
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
+ * @param string $packageName
+ * @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
+ * @return bool
+ */
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
+ {
+ $constraint = $parser->parseConstraints((string) $constraint);
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
+
+ return $provided->matches($constraint);
+ }
+
+ /**
+ * Returns a version constraint representing all the range(s) which are installed for a given package
+ *
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
+ * whether a given version of a package is installed, and not just whether it exists
+ *
+ * @param string $packageName
+ * @return string Version constraint usable with composer/semver
+ */
+ public static function getVersionRanges($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ $ranges = array();
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
+ }
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
+ }
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
+ }
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
+ }
+
+ return implode(' || ', $ranges);
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @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
+ */
+ public static function getVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @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
+ */
+ public static function getPrettyVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['pretty_version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
+ */
+ public static function getReference($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['reference'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['reference'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @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.
+ */
+ public static function getInstallPath($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @return array
+ * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
+ */
+ public static function getRootPackage()
+ {
+ $installed = self::getInstalled();
+
+ return $installed[0]['root'];
+ }
+
+ /**
+ * Returns the raw installed.php data for custom implementations
+ *
+ * @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.
+ * @return array[]
+ * @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}
+ */
+ public static function getRawData()
+ {
+ @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);
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = include __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ return self::$installed;
+ }
+
+ /**
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
+ *
+ * @return array[]
+ * @psalm-return list}>
+ */
+ public static function getAllRawData()
+ {
+ return self::getInstalled();
+ }
+
+ /**
+ * Lets you reload the static array from another file
+ *
+ * This is only useful for complex integrations in which a project needs to use
+ * this class but then also needs to execute another project's autoloader in process,
+ * and wants to ensure both projects have access to their version of installed.php.
+ *
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
+ * the data it needs from this class, then call reload() with
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
+ * the project in which it runs can then also use this class safely, without
+ * interference between PHPUnit's dependencies and the project's dependencies.
+ *
+ * @param array[] $data A vendor/composer/installed.php data set
+ * @return void
+ *
+ * @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} $data
+ */
+ public static function reload($data)
+ {
+ self::$installed = $data;
+ self::$installedByVendor = array();
+ }
+
+ /**
+ * @return array[]
+ * @psalm-return list}>
+ */
+ private static function getInstalled()
+ {
+ if (null === self::$canGetVendors) {
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
+ }
+
+ $installed = array();
+
+ if (self::$canGetVendors) {
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
+ if (isset(self::$installedByVendor[$vendorDir])) {
+ $installed[] = self::$installedByVendor[$vendorDir];
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
+ /** @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} $required */
+ $required = require $vendorDir.'/composer/installed.php';
+ $installed[] = self::$installedByVendor[$vendorDir] = $required;
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
+ self::$installed = $installed[count($installed) - 1];
+ }
+ }
+ }
+ }
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ /** @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} $required */
+ $required = require __DIR__ . '/installed.php';
+ self::$installed = $required;
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ if (self::$installed !== array()) {
+ $installed[] = self::$installed;
+ }
+
+ return $installed;
+ }
+}
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index b05a66c47..63f1eeb5f 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -2,11 +2,12 @@
// autoload_classmap.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
@@ -41,33 +42,20 @@
'wpCloud\\StatelessMedia\\API' => $baseDir . '/lib/classes/class-api.php',
'wpCloud\\StatelessMedia\\Ajax' => $baseDir . '/lib/classes/class-ajax.php',
'wpCloud\\StatelessMedia\\Bootstrap' => $baseDir . '/lib/classes/class-bootstrap.php',
- 'wpCloud\\StatelessMedia\\BuddyBoss' => $baseDir . '/lib/classes/compatibility/buddyboss.php',
- 'wpCloud\\StatelessMedia\\BuddyPress' => $baseDir . '/lib/classes/compatibility/buddypress.php',
- 'wpCloud\\StatelessMedia\\CompatibilityAcfImageCrop' => $baseDir . '/lib/classes/compatibility/acf-image-crop.php',
+ 'wpCloud\\StatelessMedia\\Compatibility' => $baseDir . '/lib/classes/class-compatibility.php',
'wpCloud\\StatelessMedia\\CompatibilityWooExtraProductOptions' => $baseDir . '/lib/classes/compatibility/woo-extra-product-options.php',
- 'wpCloud\\StatelessMedia\\Divi' => $baseDir . '/lib/classes/compatibility/divi.php',
'wpCloud\\StatelessMedia\\DynamicImageSupport' => $baseDir . '/lib/classes/compatibility/dynamic-image-support.php',
- 'wpCloud\\StatelessMedia\\EDDDownloadMethod' => $baseDir . '/lib/classes/compatibility/easy-digital-downloads.php',
- 'wpCloud\\StatelessMedia\\EWWW' => $baseDir . '/lib/classes/compatibility/ewww.php',
- 'wpCloud\\StatelessMedia\\Elementor' => $baseDir . '/lib/classes/compatibility/elementor.php',
'wpCloud\\StatelessMedia\\Errors' => $baseDir . '/lib/classes/class-errors.php',
'wpCloud\\StatelessMedia\\FatalException' => $baseDir . '/lib/classes/exception-fatal.php',
'wpCloud\\StatelessMedia\\GS_Client' => $baseDir . '/lib/classes/class-gs-client.php',
'wpCloud\\StatelessMedia\\GoogleAppEngine' => $baseDir . '/lib/classes/compatibility/google-app-engine.php',
- 'wpCloud\\StatelessMedia\\GravityForm' => $baseDir . '/lib/classes/compatibility/gravity-forms.php',
- 'wpCloud\\StatelessMedia\\GravityFormSignature' => $baseDir . '/lib/classes/compatibility/gravity-forms-signature.php',
- 'wpCloud\\StatelessMedia\\ICompatibility' => $baseDir . '/lib/classes/compatibility/ICompatibility.php',
'wpCloud\\StatelessMedia\\Imagify' => $baseDir . '/lib/classes/compatibility/imagify.php',
- 'wpCloud\\StatelessMedia\\LSCacheWP' => $baseDir . '/lib/classes/compatibility/lite-speed-cache.php',
- 'wpCloud\\StatelessMedia\\LearnDash' => $baseDir . '/lib/classes/compatibility/learn-dash.php',
'wpCloud\\StatelessMedia\\Logger' => $baseDir . '/lib/classes/class-logger.php',
- 'wpCloud\\StatelessMedia\\Module' => $baseDir . '/lib/classes/class-compatibility.php',
- 'wpCloud\\StatelessMedia\\Polylang' => $baseDir . '/lib/classes/compatibility/polylang-pro.php',
+ 'wpCloud\\StatelessMedia\\Module' => $baseDir . '/lib/classes/class-module.php',
'wpCloud\\StatelessMedia\\SOCSS' => $baseDir . '/lib/classes/compatibility/siteorigin-css.php',
'wpCloud\\StatelessMedia\\SOWidgetCSS' => $baseDir . '/lib/classes/compatibility/siteorigin-widget-bundle.php',
'wpCloud\\StatelessMedia\\Settings' => $baseDir . '/lib/classes/class-settings.php',
'wpCloud\\StatelessMedia\\ShortPixel' => $baseDir . '/lib/classes/compatibility/shortpixel.php',
- 'wpCloud\\StatelessMedia\\SimpleLocalAvatars' => $baseDir . '/lib/classes/compatibility/simple-local-avatars.php',
'wpCloud\\StatelessMedia\\Singleton' => $baseDir . '/lib/classes/trait-singleton.php',
'wpCloud\\StatelessMedia\\StreamWrapper' => $baseDir . '/lib/classes/class-gs-stream-wrapper.php',
'wpCloud\\StatelessMedia\\SyncNonMedia' => $baseDir . '/lib/classes/class-sync-non-media.php',
@@ -78,7 +66,6 @@
'wpCloud\\StatelessMedia\\Sync\\ImageSync' => $baseDir . '/lib/classes/sync/class-image-sync.php',
'wpCloud\\StatelessMedia\\Sync\\LibrarySync' => $baseDir . '/lib/classes/sync/class-library-sync.php',
'wpCloud\\StatelessMedia\\Sync\\NonLibrarySync' => $baseDir . '/lib/classes/sync/class-non-library-sync.php',
- 'wpCloud\\StatelessMedia\\TheEventsCalendar' => $baseDir . '/lib/classes/compatibility/the-events-calendar.php',
'wpCloud\\StatelessMedia\\UnprocessableException' => $baseDir . '/lib/classes/exception-unprocessable.php',
'wpCloud\\StatelessMedia\\Upgrader' => $baseDir . '/lib/classes/class-upgrader.php',
'wpCloud\\StatelessMedia\\Utility' => $baseDir . '/lib/classes/class-utility.php',
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
index 7fe9b6d43..e70959884 100644
--- a/vendor/composer/autoload_files.php
+++ b/vendor/composer/autoload_files.php
@@ -2,7 +2,7 @@
// autoload_files.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php
index d983a0a8a..703394b01 100644
--- a/vendor/composer/autoload_namespaces.php
+++ b/vendor/composer/autoload_namespaces.php
@@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index 7a5da030f..f69715179 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -2,7 +2,7 @@
// autoload_psr4.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index 8fbed1399..ea6820089 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -22,52 +22,29 @@ public static function getLoader()
return self::$loader;
}
+ require __DIR__ . '/platform_check.php';
+
spl_autoload_register(array('ComposerAutoloaderInitc59d002476a452800baaf79c430753cb', 'loadClassLoader'), true, true);
- self::$loader = $loader = new \Composer\Autoload\ClassLoader();
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitc59d002476a452800baaf79c430753cb', 'loadClassLoader'));
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
- if ($useStaticLoader) {
- require_once __DIR__ . '/autoload_static.php';
+ require __DIR__ . '/autoload_static.php';
+ call_user_func(\Composer\Autoload\ComposerStaticInitc59d002476a452800baaf79c430753cb::getInitializer($loader));
- call_user_func(\Composer\Autoload\ComposerStaticInitc59d002476a452800baaf79c430753cb::getInitializer($loader));
- } else {
- $map = require __DIR__ . '/autoload_namespaces.php';
- foreach ($map as $namespace => $path) {
- $loader->set($namespace, $path);
- }
+ $loader->register(true);
- $map = require __DIR__ . '/autoload_psr4.php';
- foreach ($map as $namespace => $path) {
- $loader->setPsr4($namespace, $path);
- }
+ $filesToLoad = \Composer\Autoload\ComposerStaticInitc59d002476a452800baaf79c430753cb::$files;
+ $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
- $classMap = require __DIR__ . '/autoload_classmap.php';
- if ($classMap) {
- $loader->addClassMap($classMap);
+ require $file;
}
- }
-
- $loader->register(true);
-
- if ($useStaticLoader) {
- $includeFiles = Composer\Autoload\ComposerStaticInitc59d002476a452800baaf79c430753cb::$files;
- } else {
- $includeFiles = require __DIR__ . '/autoload_files.php';
- }
- foreach ($includeFiles as $fileIdentifier => $file) {
- composerRequirec59d002476a452800baaf79c430753cb($fileIdentifier, $file);
+ }, null, null);
+ foreach ($filesToLoad as $fileIdentifier => $file) {
+ $requireFile($fileIdentifier, $file);
}
return $loader;
}
}
-
-function composerRequirec59d002476a452800baaf79c430753cb($fileIdentifier, $file)
-{
- if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
- require $file;
-
- $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
- }
-}
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 033759d40..5f60a88b8 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -15,7 +15,6 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php',
- '8ca8a91f0a826d6c6c8f274c90ca7d88' => __DIR__ . '/..' . '/wpmetabox/meta-box/meta-box.php',
);
public static $prefixLengthsPsr4 = array (
@@ -131,6 +130,7 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb
public static $classMap = array (
'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
@@ -165,33 +165,20 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb
'wpCloud\\StatelessMedia\\API' => __DIR__ . '/../..' . '/lib/classes/class-api.php',
'wpCloud\\StatelessMedia\\Ajax' => __DIR__ . '/../..' . '/lib/classes/class-ajax.php',
'wpCloud\\StatelessMedia\\Bootstrap' => __DIR__ . '/../..' . '/lib/classes/class-bootstrap.php',
- 'wpCloud\\StatelessMedia\\BuddyBoss' => __DIR__ . '/../..' . '/lib/classes/compatibility/buddyboss.php',
- 'wpCloud\\StatelessMedia\\BuddyPress' => __DIR__ . '/../..' . '/lib/classes/compatibility/buddypress.php',
- 'wpCloud\\StatelessMedia\\CompatibilityAcfImageCrop' => __DIR__ . '/../..' . '/lib/classes/compatibility/acf-image-crop.php',
+ 'wpCloud\\StatelessMedia\\Compatibility' => __DIR__ . '/../..' . '/lib/classes/class-compatibility.php',
'wpCloud\\StatelessMedia\\CompatibilityWooExtraProductOptions' => __DIR__ . '/../..' . '/lib/classes/compatibility/woo-extra-product-options.php',
- 'wpCloud\\StatelessMedia\\Divi' => __DIR__ . '/../..' . '/lib/classes/compatibility/divi.php',
'wpCloud\\StatelessMedia\\DynamicImageSupport' => __DIR__ . '/../..' . '/lib/classes/compatibility/dynamic-image-support.php',
- 'wpCloud\\StatelessMedia\\EDDDownloadMethod' => __DIR__ . '/../..' . '/lib/classes/compatibility/easy-digital-downloads.php',
- 'wpCloud\\StatelessMedia\\EWWW' => __DIR__ . '/../..' . '/lib/classes/compatibility/ewww.php',
- 'wpCloud\\StatelessMedia\\Elementor' => __DIR__ . '/../..' . '/lib/classes/compatibility/elementor.php',
'wpCloud\\StatelessMedia\\Errors' => __DIR__ . '/../..' . '/lib/classes/class-errors.php',
'wpCloud\\StatelessMedia\\FatalException' => __DIR__ . '/../..' . '/lib/classes/exception-fatal.php',
'wpCloud\\StatelessMedia\\GS_Client' => __DIR__ . '/../..' . '/lib/classes/class-gs-client.php',
'wpCloud\\StatelessMedia\\GoogleAppEngine' => __DIR__ . '/../..' . '/lib/classes/compatibility/google-app-engine.php',
- 'wpCloud\\StatelessMedia\\GravityForm' => __DIR__ . '/../..' . '/lib/classes/compatibility/gravity-forms.php',
- 'wpCloud\\StatelessMedia\\GravityFormSignature' => __DIR__ . '/../..' . '/lib/classes/compatibility/gravity-forms-signature.php',
- 'wpCloud\\StatelessMedia\\ICompatibility' => __DIR__ . '/../..' . '/lib/classes/compatibility/ICompatibility.php',
'wpCloud\\StatelessMedia\\Imagify' => __DIR__ . '/../..' . '/lib/classes/compatibility/imagify.php',
- 'wpCloud\\StatelessMedia\\LSCacheWP' => __DIR__ . '/../..' . '/lib/classes/compatibility/lite-speed-cache.php',
- 'wpCloud\\StatelessMedia\\LearnDash' => __DIR__ . '/../..' . '/lib/classes/compatibility/learn-dash.php',
'wpCloud\\StatelessMedia\\Logger' => __DIR__ . '/../..' . '/lib/classes/class-logger.php',
- 'wpCloud\\StatelessMedia\\Module' => __DIR__ . '/../..' . '/lib/classes/class-compatibility.php',
- 'wpCloud\\StatelessMedia\\Polylang' => __DIR__ . '/../..' . '/lib/classes/compatibility/polylang-pro.php',
+ 'wpCloud\\StatelessMedia\\Module' => __DIR__ . '/../..' . '/lib/classes/class-module.php',
'wpCloud\\StatelessMedia\\SOCSS' => __DIR__ . '/../..' . '/lib/classes/compatibility/siteorigin-css.php',
'wpCloud\\StatelessMedia\\SOWidgetCSS' => __DIR__ . '/../..' . '/lib/classes/compatibility/siteorigin-widget-bundle.php',
'wpCloud\\StatelessMedia\\Settings' => __DIR__ . '/../..' . '/lib/classes/class-settings.php',
'wpCloud\\StatelessMedia\\ShortPixel' => __DIR__ . '/../..' . '/lib/classes/compatibility/shortpixel.php',
- 'wpCloud\\StatelessMedia\\SimpleLocalAvatars' => __DIR__ . '/../..' . '/lib/classes/compatibility/simple-local-avatars.php',
'wpCloud\\StatelessMedia\\Singleton' => __DIR__ . '/../..' . '/lib/classes/trait-singleton.php',
'wpCloud\\StatelessMedia\\StreamWrapper' => __DIR__ . '/../..' . '/lib/classes/class-gs-stream-wrapper.php',
'wpCloud\\StatelessMedia\\SyncNonMedia' => __DIR__ . '/../..' . '/lib/classes/class-sync-non-media.php',
@@ -202,7 +189,6 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb
'wpCloud\\StatelessMedia\\Sync\\ImageSync' => __DIR__ . '/../..' . '/lib/classes/sync/class-image-sync.php',
'wpCloud\\StatelessMedia\\Sync\\LibrarySync' => __DIR__ . '/../..' . '/lib/classes/sync/class-library-sync.php',
'wpCloud\\StatelessMedia\\Sync\\NonLibrarySync' => __DIR__ . '/../..' . '/lib/classes/sync/class-non-library-sync.php',
- 'wpCloud\\StatelessMedia\\TheEventsCalendar' => __DIR__ . '/../..' . '/lib/classes/compatibility/the-events-calendar.php',
'wpCloud\\StatelessMedia\\UnprocessableException' => __DIR__ . '/../..' . '/lib/classes/exception-unprocessable.php',
'wpCloud\\StatelessMedia\\Upgrader' => __DIR__ . '/../..' . '/lib/classes/class-upgrader.php',
'wpCloud\\StatelessMedia\\Utility' => __DIR__ . '/../..' . '/lib/classes/class-utility.php',
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 2a09072c9..1a3b3d642 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1,1692 +1,1737 @@
-[
- {
- "name": "ccampbell/chromephp",
- "version": "4.1.0",
- "version_normalized": "4.1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/ccampbell/chromephp.git",
- "reference": "c3c297615d48ae5b2a86a82311152d1ed095fcef"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ccampbell/chromephp/zipball/c3c297615d48ae5b2a86a82311152d1ed095fcef",
- "reference": "c3c297615d48ae5b2a86a82311152d1ed095fcef",
- "shasum": ""
- },
- "require": {
- "php": ">=5.0.0"
- },
- "time": "2013-06-26T03:44:33+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-0": {
- "ChromePhp": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "Craig Campbell",
- "email": "iamcraigcampbell@gmail.com",
- "homepage": "http://craig.is",
- "role": "Developer"
- }
- ],
- "description": "Log variables to the Chrome console (via Chrome Logger Google Chrome extension).",
- "homepage": "http://github.com/ccampbell/chromephp",
- "keywords": [
- "log",
- "logging"
- ]
- },
- {
- "name": "coenjacobs/mozart",
- "version": "0.7.1",
- "version_normalized": "0.7.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/coenjacobs/mozart.git",
- "reference": "dbcdeb992d20d9c8914eef090f9a0d684bb1102c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/coenjacobs/mozart/zipball/dbcdeb992d20d9c8914eef090f9a0d684bb1102c",
- "reference": "dbcdeb992d20d9c8914eef090f9a0d684bb1102c",
- "shasum": ""
- },
- "require": {
- "league/flysystem": "^1.0",
- "php": "^7.3|^8.0",
- "symfony/console": "^4|^5",
- "symfony/finder": "^4|^5"
- },
- "require-dev": {
- "mheap/phpunit-github-actions-printer": "^1.4",
- "phpunit/phpunit": "^8.5",
- "squizlabs/php_codesniffer": "^3.5",
- "vimeo/psalm": "^4.4"
- },
- "time": "2021-02-02T21:37:03+00:00",
- "bin": [
- "bin/mozart"
- ],
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "CoenJacobs\\Mozart\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Coen Jacobs",
- "email": "coenjacobs@gmail.com"
- }
- ],
- "description": "Composes all dependencies as a package inside a WordPress plugin",
- "funding": [
- {
- "url": "https://github.com/coenjacobs",
- "type": "github"
- }
- ]
- },
- {
- "name": "composer/installers",
- "version": "v1.12.0",
- "version_normalized": "1.12.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/composer/installers.git",
- "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/composer/installers/zipball/d20a64ed3c94748397ff5973488761b22f6d3f19",
- "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19",
- "shasum": ""
- },
- "require": {
- "composer-plugin-api": "^1.0 || ^2.0"
- },
- "replace": {
- "roundcube/plugin-installer": "*",
- "shama/baton": "*"
- },
- "require-dev": {
- "composer/composer": "1.6.* || ^2.0",
- "composer/semver": "^1 || ^3",
- "phpstan/phpstan": "^0.12.55",
- "phpstan/phpstan-phpunit": "^0.12.16",
- "symfony/phpunit-bridge": "^4.2 || ^5",
- "symfony/process": "^2.3"
- },
- "time": "2021-09-13T08:19:44+00:00",
- "type": "composer-plugin",
- "extra": {
- "class": "Composer\\Installers\\Plugin",
- "branch-alias": {
- "dev-main": "1.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Composer\\Installers\\": "src/Composer/Installers"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Kyle Robinson Young",
- "email": "kyle@dontkry.com",
- "homepage": "https://github.com/shama"
- }
- ],
- "description": "A multi-framework Composer library installer",
- "homepage": "https://composer.github.io/installers/",
- "keywords": [
- "Craft",
- "Dolibarr",
- "Eliasis",
- "Hurad",
- "ImageCMS",
- "Kanboard",
- "Lan Management System",
- "MODX Evo",
- "MantisBT",
- "Mautic",
- "Maya",
- "OXID",
- "Plentymarkets",
- "Porto",
- "RadPHP",
- "SMF",
- "Starbug",
- "Thelia",
- "Whmcs",
- "WolfCMS",
- "agl",
- "aimeos",
- "annotatecms",
- "attogram",
- "bitrix",
- "cakephp",
- "chef",
- "cockpit",
- "codeigniter",
- "concrete5",
- "croogo",
- "dokuwiki",
- "drupal",
- "eZ Platform",
- "elgg",
- "expressionengine",
- "fuelphp",
- "grav",
- "installer",
- "itop",
- "joomla",
- "known",
- "kohana",
- "laravel",
- "lavalite",
- "lithium",
- "magento",
- "majima",
- "mako",
- "mediawiki",
- "miaoxing",
- "modulework",
- "modx",
- "moodle",
- "osclass",
- "pantheon",
- "phpbb",
- "piwik",
- "ppi",
- "processwire",
- "puppet",
- "pxcms",
- "reindex",
- "roundcube",
- "shopware",
- "silverstripe",
- "sydes",
- "sylius",
- "symfony",
- "tastyigniter",
- "typo3",
- "wordpress",
- "yawik",
- "zend",
- "zikula"
- ],
- "funding": [
- {
- "url": "https://packagist.com",
- "type": "custom"
- },
- {
- "url": "https://github.com/composer",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/composer/composer",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "deliciousbrains/wp-background-processing",
- "version": "1.1.0",
- "version_normalized": "1.1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/deliciousbrains/wp-background-processing.git",
- "reference": "d5ef95cecba7f792ddca3e3bd70ebfb90dc4996d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/deliciousbrains/wp-background-processing/zipball/d5ef95cecba7f792ddca3e3bd70ebfb90dc4996d",
- "reference": "d5ef95cecba7f792ddca3e3bd70ebfb90dc4996d",
- "shasum": ""
- },
- "require": {
- "php": ">=5.6"
- },
- "require-dev": {
- "phpcompatibility/phpcompatibility-wp": "*",
- "phpunit/phpunit": "^8.0",
- "spryker/code-sniffer": "^0.17.18",
- "wp-coding-standards/wpcs": "^2.3",
- "yoast/phpunit-polyfills": "^1.0"
- },
- "suggest": {
- "coenjacobs/mozart": "Easily wrap this library with your own prefix, to prevent collisions when multiple plugins use this library"
- },
- "time": "2023-04-18T12:32:25+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "classmap": [
- "classes/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "GPL-2.0-or-later"
- ],
- "authors": [
- {
- "name": "Delicious Brains",
- "email": "nom@deliciousbrains.com"
- }
- ],
- "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."
- },
- {
- "name": "firebase/php-jwt",
- "version": "v6.6.0",
- "version_normalized": "6.6.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/firebase/php-jwt.git",
- "reference": "5a9cf79b4a2eb347230384648cc7b0d68cd97faa"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/firebase/php-jwt/zipball/5a9cf79b4a2eb347230384648cc7b0d68cd97faa",
- "reference": "5a9cf79b4a2eb347230384648cc7b0d68cd97faa",
- "shasum": ""
- },
- "require": {
- "php": "^7.4||^8.0"
- },
- "require-dev": {
- "guzzlehttp/guzzle": "^6.5||^7.4",
- "phpspec/prophecy-phpunit": "^2.0",
- "phpunit/phpunit": "^9.5",
- "psr/cache": "^1.0||^2.0",
- "psr/http-client": "^1.0",
- "psr/http-factory": "^1.0"
- },
- "suggest": {
- "ext-sodium": "Support EdDSA (Ed25519) signatures",
- "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
- },
- "time": "2023-06-13T17:11:06+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Firebase\\JWT\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Neuman Vong",
- "email": "neuman+pear@twilio.com",
- "role": "Developer"
- },
- {
- "name": "Anant Narayanan",
- "email": "anant@php.net",
- "role": "Developer"
- }
- ],
- "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
- "homepage": "https://github.com/firebase/php-jwt",
- "keywords": [
- "jwt",
- "php"
- ]
- },
- {
- "name": "league/flysystem",
- "version": "1.1.10",
- "version_normalized": "1.1.10.0",
- "source": {
- "type": "git",
- "url": "https://github.com/thephpleague/flysystem.git",
- "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3239285c825c152bcc315fe0e87d6b55f5972ed1",
- "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1",
- "shasum": ""
- },
- "require": {
- "ext-fileinfo": "*",
- "league/mime-type-detection": "^1.3",
- "php": "^7.2.5 || ^8.0"
- },
- "conflict": {
- "league/flysystem-sftp": "<1.0.6"
- },
- "require-dev": {
- "phpspec/prophecy": "^1.11.1",
- "phpunit/phpunit": "^8.5.8"
- },
- "suggest": {
- "ext-ftp": "Allows you to use FTP server storage",
- "ext-openssl": "Allows you to use FTPS server storage",
- "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
- "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3",
- "league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
- "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching",
- "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
- "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
- "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib",
- "league/flysystem-webdav": "Allows you to use WebDAV storage",
- "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter",
- "spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
- "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
- },
- "time": "2022-10-04T09:16:37+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "League\\Flysystem\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Frank de Jonge",
- "email": "info@frenky.net"
- }
- ],
- "description": "Filesystem abstraction: Many filesystems, one API.",
- "keywords": [
- "Cloud Files",
- "WebDAV",
- "abstraction",
- "aws",
- "cloud",
- "copy.com",
- "dropbox",
- "file systems",
- "files",
- "filesystem",
- "filesystems",
- "ftp",
- "rackspace",
- "remote",
- "s3",
- "sftp",
- "storage"
- ],
- "funding": [
- {
- "url": "https://offset.earth/frankdejonge",
- "type": "other"
- }
- ]
- },
- {
- "name": "league/mime-type-detection",
- "version": "1.11.0",
- "version_normalized": "1.11.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/thephpleague/mime-type-detection.git",
- "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
- "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
- "shasum": ""
- },
- "require": {
- "ext-fileinfo": "*",
- "php": "^7.2 || ^8.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "^3.2",
- "phpstan/phpstan": "^0.12.68",
- "phpunit/phpunit": "^8.5.8 || ^9.3"
- },
- "time": "2022-04-17T13:12:02+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "League\\MimeTypeDetection\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Frank de Jonge",
- "email": "info@frankdejonge.nl"
- }
- ],
- "description": "Mime-type detection for Flysystem",
- "funding": [
- {
- "url": "https://github.com/frankdejonge",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/league/flysystem",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "psr/container",
- "version": "2.0.2",
- "version_normalized": "2.0.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/container.git",
- "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
- "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
- "shasum": ""
- },
- "require": {
- "php": ">=7.4.0"
- },
- "time": "2021-11-05T16:47:00+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Psr\\Container\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common Container Interface (PHP FIG PSR-11)",
- "homepage": "https://github.com/php-fig/container",
- "keywords": [
- "PSR-11",
- "container",
- "container-interface",
- "container-interop",
- "psr"
- ]
- },
- {
- "name": "symfony/console",
- "version": "v5.4.24",
- "version_normalized": "5.4.24.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/console.git",
- "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8",
- "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1|^3",
- "symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php73": "^1.9",
- "symfony/polyfill-php80": "^1.16",
- "symfony/service-contracts": "^1.1|^2|^3",
- "symfony/string": "^5.1|^6.0"
- },
- "conflict": {
- "psr/log": ">=3",
- "symfony/dependency-injection": "<4.4",
- "symfony/dotenv": "<5.1",
- "symfony/event-dispatcher": "<4.4",
- "symfony/lock": "<4.4",
- "symfony/process": "<4.4"
- },
- "provide": {
- "psr/log-implementation": "1.0|2.0"
- },
- "require-dev": {
- "psr/log": "^1|^2",
- "symfony/config": "^4.4|^5.0|^6.0",
- "symfony/dependency-injection": "^4.4|^5.0|^6.0",
- "symfony/event-dispatcher": "^4.4|^5.0|^6.0",
- "symfony/lock": "^4.4|^5.0|^6.0",
- "symfony/process": "^4.4|^5.0|^6.0",
- "symfony/var-dumper": "^4.4|^5.0|^6.0"
- },
- "suggest": {
- "psr/log": "For using the console logger",
- "symfony/event-dispatcher": "",
- "symfony/lock": "",
- "symfony/process": ""
- },
- "time": "2023-05-26T05:13:16+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Console\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Eases the creation of beautiful and testable command line interfaces",
- "homepage": "https://symfony.com",
- "keywords": [
- "cli",
- "command-line",
- "console",
- "terminal"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "symfony/deprecation-contracts",
- "version": "v3.3.0",
- "version_normalized": "3.3.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/deprecation-contracts.git",
- "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf",
- "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf",
- "shasum": ""
- },
- "require": {
- "php": ">=8.1"
- },
- "time": "2023-05-23T14:45:45+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.4-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "function.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "A generic function and convention to trigger deprecation notices",
- "homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "symfony/finder",
- "version": "v5.4.21",
- "version_normalized": "5.4.21.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/finder.git",
- "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19",
- "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1|^3",
- "symfony/polyfill-php80": "^1.16"
- },
- "time": "2023-02-16T09:33:00+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Finder\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Finds files and directories via an intuitive fluent interface",
- "homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "symfony/polyfill-ctype",
- "version": "v1.27.0",
- "version_normalized": "1.27.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "provide": {
- "ext-ctype": "*"
- },
- "suggest": {
- "ext-ctype": "For best performance"
- },
- "time": "2022-11-03T14:55:06+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Ctype\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Gert de Pagter",
- "email": "BackEndTea@gmail.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for ctype functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "ctype",
- "polyfill",
- "portable"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "symfony/polyfill-intl-grapheme",
- "version": "v1.27.0",
- "version_normalized": "1.27.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "511a08c03c1960e08a883f4cffcacd219b758354"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354",
- "reference": "511a08c03c1960e08a883f4cffcacd219b758354",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "suggest": {
- "ext-intl": "For best performance"
- },
- "time": "2022-11-03T14:55:06+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for intl's grapheme_* functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "grapheme",
- "intl",
- "polyfill",
- "portable",
- "shim"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "symfony/polyfill-intl-normalizer",
- "version": "v1.27.0",
- "version_normalized": "1.27.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
- "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6",
- "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "suggest": {
- "ext-intl": "For best performance"
- },
- "time": "2022-11-03T14:55:06+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "bootstrap.php"
+{
+ "packages": [
+ {
+ "name": "ccampbell/chromephp",
+ "version": "4.1.0",
+ "version_normalized": "4.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ccampbell/chromephp.git",
+ "reference": "c3c297615d48ae5b2a86a82311152d1ed095fcef"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ccampbell/chromephp/zipball/c3c297615d48ae5b2a86a82311152d1ed095fcef",
+ "reference": "c3c297615d48ae5b2a86a82311152d1ed095fcef",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.0.0"
+ },
+ "time": "2013-06-26T03:44:33+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "ChromePhp": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Craig Campbell",
+ "email": "iamcraigcampbell@gmail.com",
+ "homepage": "http://craig.is",
+ "role": "Developer"
+ }
+ ],
+ "description": "Log variables to the Chrome console (via Chrome Logger Google Chrome extension).",
+ "homepage": "http://github.com/ccampbell/chromephp",
+ "keywords": [
+ "log",
+ "logging"
],
- "psr-4": {
- "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+ "install-path": "../ccampbell/chromephp"
+ },
+ {
+ "name": "coenjacobs/mozart",
+ "version": "0.7.1",
+ "version_normalized": "0.7.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/coenjacobs/mozart.git",
+ "reference": "dbcdeb992d20d9c8914eef090f9a0d684bb1102c"
},
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for intl's Normalizer class and related functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "intl",
- "normalizer",
- "polyfill",
- "portable",
- "shim"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "symfony/polyfill-mbstring",
- "version": "v1.27.0",
- "version_normalized": "1.27.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "provide": {
- "ext-mbstring": "*"
- },
- "suggest": {
- "ext-mbstring": "For best performance"
- },
- "time": "2022-11-03T14:55:06+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for the Mbstring extension",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "mbstring",
- "polyfill",
- "portable",
- "shim"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "symfony/polyfill-php73",
- "version": "v1.27.0",
- "version_normalized": "1.27.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
- "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "time": "2022-11-03T14:55:06+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "bootstrap.php"
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/coenjacobs/mozart/zipball/dbcdeb992d20d9c8914eef090f9a0d684bb1102c",
+ "reference": "dbcdeb992d20d9c8914eef090f9a0d684bb1102c",
+ "shasum": ""
+ },
+ "require": {
+ "league/flysystem": "^1.0",
+ "php": "^7.3|^8.0",
+ "symfony/console": "^4|^5",
+ "symfony/finder": "^4|^5"
+ },
+ "require-dev": {
+ "mheap/phpunit-github-actions-printer": "^1.4",
+ "phpunit/phpunit": "^8.5",
+ "squizlabs/php_codesniffer": "^3.5",
+ "vimeo/psalm": "^4.4"
+ },
+ "time": "2021-02-02T21:37:03+00:00",
+ "bin": [
+ "bin/mozart"
],
- "psr-4": {
- "Symfony\\Polyfill\\Php73\\": ""
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "CoenJacobs\\Mozart\\": "src/"
+ }
},
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "symfony/polyfill-php80",
- "version": "v1.27.0",
- "version_normalized": "1.27.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "time": "2022-11-03T14:55:06+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "bootstrap.php"
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
],
- "psr-4": {
- "Symfony\\Polyfill\\Php80\\": ""
+ "authors": [
+ {
+ "name": "Coen Jacobs",
+ "email": "coenjacobs@gmail.com"
+ }
+ ],
+ "description": "Composes all dependencies as a package inside a WordPress plugin",
+ "funding": [
+ {
+ "url": "https://github.com/coenjacobs",
+ "type": "github"
+ }
+ ],
+ "install-path": "../coenjacobs/mozart"
+ },
+ {
+ "name": "composer/installers",
+ "version": "v1.12.0",
+ "version_normalized": "1.12.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/installers.git",
+ "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19"
},
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Ion Bazan",
- "email": "ion.bazan@gmail.com"
- },
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "symfony/service-contracts",
- "version": "v3.3.0",
- "version_normalized": "3.3.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/service-contracts.git",
- "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4",
- "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4",
- "shasum": ""
- },
- "require": {
- "php": ">=8.1",
- "psr/container": "^2.0"
- },
- "conflict": {
- "ext-psr": "<1.1|>=2"
- },
- "time": "2023-05-23T14:45:45+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.4-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Contracts\\Service\\": ""
- },
- "exclude-from-classmap": [
- "/Test/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Generic abstractions related to writing services",
- "homepage": "https://symfony.com",
- "keywords": [
- "abstractions",
- "contracts",
- "decoupling",
- "interfaces",
- "interoperability",
- "standards"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "symfony/string",
- "version": "v6.3.0",
- "version_normalized": "6.3.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/string.git",
- "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
- "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
- "shasum": ""
- },
- "require": {
- "php": ">=8.1",
- "symfony/polyfill-ctype": "~1.8",
- "symfony/polyfill-intl-grapheme": "~1.0",
- "symfony/polyfill-intl-normalizer": "~1.0",
- "symfony/polyfill-mbstring": "~1.0"
- },
- "conflict": {
- "symfony/translation-contracts": "<2.5"
- },
- "require-dev": {
- "symfony/error-handler": "^5.4|^6.0",
- "symfony/http-client": "^5.4|^6.0",
- "symfony/intl": "^6.2",
- "symfony/translation-contracts": "^2.5|^3.0",
- "symfony/var-exporter": "^5.4|^6.0"
- },
- "time": "2023-03-21T21:06:29+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "files": [
- "Resources/functions.php"
- ],
- "psr-4": {
- "Symfony\\Component\\String\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
- "homepage": "https://symfony.com",
- "keywords": [
- "grapheme",
- "i18n",
- "string",
- "unicode",
- "utf-8",
- "utf8"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "udx/lib-settings",
- "version": "0.3.0",
- "version_normalized": "0.3.0.0",
- "source": {
- "type": "git",
- "url": "git@github.com:udx/lib-settings",
- "reference": "0.3.0"
- },
- "dist": {
- "type": "zip",
- "url": "https://github.com/udx/lib-settings/archive/0.3.0.zip",
- "reference": "0.3.0"
- },
- "require": {
- "udx/lib-utility": "~0.3"
- },
- "require-dev": {
- "justinrainbow/json-schema": "1.1.*"
- },
- "type": "library",
- "extra": {
- "component": {
- "scripts": [
- "static/scripts/settings.js"
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/installers/zipball/d20a64ed3c94748397ff5973488761b22f6d3f19",
+ "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.0 || ^2.0"
+ },
+ "replace": {
+ "roundcube/plugin-installer": "*",
+ "shama/baton": "*"
+ },
+ "require-dev": {
+ "composer/composer": "1.6.* || ^2.0",
+ "composer/semver": "^1 || ^3",
+ "phpstan/phpstan": "^0.12.55",
+ "phpstan/phpstan-phpunit": "^0.12.16",
+ "symfony/phpunit-bridge": "^4.2 || ^5",
+ "symfony/process": "^2.3"
+ },
+ "time": "2021-09-13T08:19:44+00:00",
+ "type": "composer-plugin",
+ "extra": {
+ "class": "Composer\\Installers\\Plugin",
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Composer\\Installers\\": "src/Composer/Installers"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Kyle Robinson Young",
+ "email": "kyle@dontkry.com",
+ "homepage": "https://github.com/shama"
+ }
+ ],
+ "description": "A multi-framework Composer library installer",
+ "homepage": "https://composer.github.io/installers/",
+ "keywords": [
+ "Craft",
+ "Dolibarr",
+ "Eliasis",
+ "Hurad",
+ "ImageCMS",
+ "Kanboard",
+ "Lan Management System",
+ "MODX Evo",
+ "MantisBT",
+ "Mautic",
+ "Maya",
+ "OXID",
+ "Plentymarkets",
+ "Porto",
+ "RadPHP",
+ "SMF",
+ "Starbug",
+ "Thelia",
+ "Whmcs",
+ "WolfCMS",
+ "agl",
+ "aimeos",
+ "annotatecms",
+ "attogram",
+ "bitrix",
+ "cakephp",
+ "chef",
+ "cockpit",
+ "codeigniter",
+ "concrete5",
+ "croogo",
+ "dokuwiki",
+ "drupal",
+ "eZ Platform",
+ "elgg",
+ "expressionengine",
+ "fuelphp",
+ "grav",
+ "installer",
+ "itop",
+ "joomla",
+ "known",
+ "kohana",
+ "laravel",
+ "lavalite",
+ "lithium",
+ "magento",
+ "majima",
+ "mako",
+ "mediawiki",
+ "miaoxing",
+ "modulework",
+ "modx",
+ "moodle",
+ "osclass",
+ "pantheon",
+ "phpbb",
+ "piwik",
+ "ppi",
+ "processwire",
+ "puppet",
+ "pxcms",
+ "reindex",
+ "roundcube",
+ "shopware",
+ "silverstripe",
+ "sydes",
+ "sylius",
+ "symfony",
+ "tastyigniter",
+ "typo3",
+ "wordpress",
+ "yawik",
+ "zend",
+ "zikula"
+ ],
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "./installers"
+ },
+ {
+ "name": "deliciousbrains/wp-background-processing",
+ "version": "1.1.0",
+ "version_normalized": "1.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/deliciousbrains/wp-background-processing.git",
+ "reference": "d5ef95cecba7f792ddca3e3bd70ebfb90dc4996d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/deliciousbrains/wp-background-processing/zipball/d5ef95cecba7f792ddca3e3bd70ebfb90dc4996d",
+ "reference": "d5ef95cecba7f792ddca3e3bd70ebfb90dc4996d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.6"
+ },
+ "require-dev": {
+ "phpcompatibility/phpcompatibility-wp": "*",
+ "phpunit/phpunit": "^8.0",
+ "spryker/code-sniffer": "^0.17.18",
+ "wp-coding-standards/wpcs": "^2.3",
+ "yoast/phpunit-polyfills": "^1.0"
+ },
+ "suggest": {
+ "coenjacobs/mozart": "Easily wrap this library with your own prefix, to prevent collisions when multiple plugins use this library"
+ },
+ "time": "2023-04-18T12:32:25+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "classes/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Delicious Brains",
+ "email": "nom@deliciousbrains.com"
+ }
+ ],
+ "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.",
+ "install-path": "../deliciousbrains/wp-background-processing"
+ },
+ {
+ "name": "firebase/php-jwt",
+ "version": "v6.6.0",
+ "version_normalized": "6.6.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/firebase/php-jwt.git",
+ "reference": "5a9cf79b4a2eb347230384648cc7b0d68cd97faa"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/firebase/php-jwt/zipball/5a9cf79b4a2eb347230384648cc7b0d68cd97faa",
+ "reference": "5a9cf79b4a2eb347230384648cc7b0d68cd97faa",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4||^8.0"
+ },
+ "require-dev": {
+ "guzzlehttp/guzzle": "^6.5||^7.4",
+ "phpspec/prophecy-phpunit": "^2.0",
+ "phpunit/phpunit": "^9.5",
+ "psr/cache": "^1.0||^2.0",
+ "psr/http-client": "^1.0",
+ "psr/http-factory": "^1.0"
+ },
+ "suggest": {
+ "ext-sodium": "Support EdDSA (Ed25519) signatures",
+ "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
+ },
+ "time": "2023-06-13T17:11:06+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Firebase\\JWT\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Neuman Vong",
+ "email": "neuman+pear@twilio.com",
+ "role": "Developer"
+ },
+ {
+ "name": "Anant Narayanan",
+ "email": "anant@php.net",
+ "role": "Developer"
+ }
+ ],
+ "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
+ "homepage": "https://github.com/firebase/php-jwt",
+ "keywords": [
+ "jwt",
+ "php"
+ ],
+ "install-path": "../firebase/php-jwt"
+ },
+ {
+ "name": "league/flysystem",
+ "version": "1.1.10",
+ "version_normalized": "1.1.10.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/thephpleague/flysystem.git",
+ "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3239285c825c152bcc315fe0e87d6b55f5972ed1",
+ "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1",
+ "shasum": ""
+ },
+ "require": {
+ "ext-fileinfo": "*",
+ "league/mime-type-detection": "^1.3",
+ "php": "^7.2.5 || ^8.0"
+ },
+ "conflict": {
+ "league/flysystem-sftp": "<1.0.6"
+ },
+ "require-dev": {
+ "phpspec/prophecy": "^1.11.1",
+ "phpunit/phpunit": "^8.5.8"
+ },
+ "suggest": {
+ "ext-ftp": "Allows you to use FTP server storage",
+ "ext-openssl": "Allows you to use FTPS server storage",
+ "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
+ "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3",
+ "league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
+ "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching",
+ "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
+ "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
+ "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib",
+ "league/flysystem-webdav": "Allows you to use WebDAV storage",
+ "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter",
+ "spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
+ "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
+ },
+ "time": "2022-10-04T09:16:37+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "League\\Flysystem\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Frank de Jonge",
+ "email": "info@frenky.net"
+ }
+ ],
+ "description": "Filesystem abstraction: Many filesystems, one API.",
+ "keywords": [
+ "Cloud Files",
+ "WebDAV",
+ "abstraction",
+ "aws",
+ "cloud",
+ "copy.com",
+ "dropbox",
+ "file systems",
+ "files",
+ "filesystem",
+ "filesystems",
+ "ftp",
+ "rackspace",
+ "remote",
+ "s3",
+ "sftp",
+ "storage"
+ ],
+ "funding": [
+ {
+ "url": "https://offset.earth/frankdejonge",
+ "type": "other"
+ }
+ ],
+ "install-path": "../league/flysystem"
+ },
+ {
+ "name": "league/mime-type-detection",
+ "version": "1.11.0",
+ "version_normalized": "1.11.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/thephpleague/mime-type-detection.git",
+ "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
+ "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
+ "shasum": ""
+ },
+ "require": {
+ "ext-fileinfo": "*",
+ "php": "^7.2 || ^8.0"
+ },
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "^3.2",
+ "phpstan/phpstan": "^0.12.68",
+ "phpunit/phpunit": "^8.5.8 || ^9.3"
+ },
+ "time": "2022-04-17T13:12:02+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "League\\MimeTypeDetection\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Frank de Jonge",
+ "email": "info@frankdejonge.nl"
+ }
+ ],
+ "description": "Mime-type detection for Flysystem",
+ "funding": [
+ {
+ "url": "https://github.com/frankdejonge",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/league/flysystem",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../league/mime-type-detection"
+ },
+ {
+ "name": "psr/container",
+ "version": "2.0.2",
+ "version_normalized": "2.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
+ "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.4.0"
+ },
+ "time": "2021-11-05T16:47:00+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "install-path": "../psr/container"
+ },
+ {
+ "name": "symfony/console",
+ "version": "v5.4.24",
+ "version_normalized": "5.4.24.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/console.git",
+ "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8",
+ "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php73": "^1.9",
+ "symfony/polyfill-php80": "^1.16",
+ "symfony/service-contracts": "^1.1|^2|^3",
+ "symfony/string": "^5.1|^6.0"
+ },
+ "conflict": {
+ "psr/log": ">=3",
+ "symfony/dependency-injection": "<4.4",
+ "symfony/dotenv": "<5.1",
+ "symfony/event-dispatcher": "<4.4",
+ "symfony/lock": "<4.4",
+ "symfony/process": "<4.4"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0|2.0"
+ },
+ "require-dev": {
+ "psr/log": "^1|^2",
+ "symfony/config": "^4.4|^5.0|^6.0",
+ "symfony/dependency-injection": "^4.4|^5.0|^6.0",
+ "symfony/event-dispatcher": "^4.4|^5.0|^6.0",
+ "symfony/lock": "^4.4|^5.0|^6.0",
+ "symfony/process": "^4.4|^5.0|^6.0",
+ "symfony/var-dumper": "^4.4|^5.0|^6.0"
+ },
+ "suggest": {
+ "psr/log": "For using the console logger",
+ "symfony/event-dispatcher": "",
+ "symfony/lock": "",
+ "symfony/process": ""
+ },
+ "time": "2023-05-26T05:13:16+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Console\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Eases the creation of beautiful and testable command line interfaces",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "cli",
+ "command-line",
+ "console",
+ "terminal"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/console"
+ },
+ {
+ "name": "symfony/deprecation-contracts",
+ "version": "v3.3.0",
+ "version_normalized": "3.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf",
+ "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1"
+ },
+ "time": "2023-05-23T14:45:45+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.4-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/deprecation-contracts"
+ },
+ {
+ "name": "symfony/finder",
+ "version": "v5.4.21",
+ "version_normalized": "5.4.21.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/finder.git",
+ "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19",
+ "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "time": "2023-02-16T09:33:00+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Finder\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Finds files and directories via an intuitive fluent interface",
+ "homepage": "https://symfony.com",
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/finder"
+ },
+ {
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.27.0",
+ "version_normalized": "1.27.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
+ "reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "provide": {
+ "ext-ctype": "*"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "time": "2022-11-03T14:55:06+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.27-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
],
- "templates": [
- "static/views/new-installation.xhtml"
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for ctype functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-ctype"
+ },
+ {
+ "name": "symfony/polyfill-intl-grapheme",
+ "version": "v1.27.0",
+ "version_normalized": "1.27.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+ "reference": "511a08c03c1960e08a883f4cffcacd219b758354"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354",
+ "reference": "511a08c03c1960e08a883f4cffcacd219b758354",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "time": "2022-11-03T14:55:06+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.27-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
],
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for intl's grapheme_* functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "grapheme",
+ "intl",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-intl-grapheme"
+ },
+ {
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "v1.27.0",
+ "version_normalized": "1.27.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6",
+ "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "time": "2022-11-03T14:55:06+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.27-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
"files": [
- "static/schemas/settings.json"
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
]
},
- "installer-name": "lib-settings"
- },
- "installation-source": "dist",
- "autoload": {
- "classmap": [
- "lib"
- ]
- },
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Andy Potanin",
- "email": "andy.potanin@usabilitydynamics.com",
- "homepage": "https://www.usabilitydynamics.com",
- "role": "Developer"
- },
- {
- "name": "Maxim Peshkov",
- "email": "maxim.peshkov@usabilitydynamics.com",
- "homepage": "https://www.usabilitydynamics.com",
- "role": "Developer"
- },
- {
- "name": "Anton Korotkov",
- "email": "anton.korotkov@usabilitydynamics.com",
- "homepage": "https://www.usabilitydynamics.com",
- "role": "Developer"
- }
- ],
- "homepage": "https://github.com/udx/lib-settings",
- "keywords": [
- "settings"
- ]
- },
- {
- "name": "udx/lib-ud-api-client",
- "version": "1.2.1",
- "version_normalized": "1.2.1.0",
- "source": {
- "type": "git",
- "url": "git@github.com:udx/lib-ud-api-client",
- "reference": "1.2.1"
- },
- "dist": {
- "type": "zip",
- "url": "https://github.com/udx/lib-ud-api-client/archive/1.2.1.zip",
- "reference": "1.2.1"
- },
- "require": {
- "php": ">=5.3"
- },
- "type": "library",
- "extra": {
- "installer-name": "lib-ud-api-client"
- },
- "installation-source": "dist",
- "autoload": {
- "classmap": [
- "lib/classes"
- ]
- },
- "license": [
- "GPLv2"
- ],
- "authors": [
- {
- "name": "UsabilityDynamics, Inc.",
- "homepage": "https://www.usabilitydynamics.com"
- }
- ],
- "description": "UD API Client for WooCommerce API Manager",
- "homepage": "https://github.com/udx/lib-ud-api-client",
- "keywords": [
- "api",
- "client",
- "licenses",
- "plugins",
- "wordpress"
- ]
- },
- {
- "name": "udx/lib-utility",
- "version": "0.4.0",
- "version_normalized": "0.4.0.0",
- "source": {
- "type": "git",
- "url": "git@github.com:udx/lib-utility",
- "reference": "0.4.0"
- },
- "dist": {
- "type": "zip",
- "url": "https://github.com/udx/lib-utility/archive/0.4.0.zip",
- "reference": "0.4.0"
- },
- "require-dev": {
- "phpunit/phpunit": "4.1.*"
- },
- "type": "library",
- "extra": {
- "installer-name": "lib-utility",
- "component": {
- "name": "utility",
- "scripts": [
- "scripts/*.js"
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for intl's Normalizer class and related functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "intl",
+ "normalizer",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-intl-normalizer"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.27.0",
+ "version_normalized": "1.27.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "provide": {
+ "ext-mbstring": "*"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "time": "2022-11-03T14:55:06+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.27-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-mbstring"
+ },
+ {
+ "name": "symfony/polyfill-php73",
+ "version": "v1.27.0",
+ "version_normalized": "1.27.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php73.git",
+ "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
+ "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2022-11-03T14:55:06+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.27-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php73\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
]
- }
- },
- "installation-source": "dist",
- "autoload": {
- "classmap": [
- "lib"
- ]
- },
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Andy Potanin",
- "email": "andy.potanin@usabilitydynamics.com",
- "homepage": "https://www.usabilitydynamics.com",
- "role": "Developer"
- },
- {
- "name": "Maxim Peshkov",
- "email": "maxim.peshkov@usabilitydynamics.com",
- "homepage": "https://www.usabilitydynamics.com",
- "role": "Developer"
- },
- {
- "name": "Anton Korotkov",
- "email": "anton.korotkov@usabilitydynamics.com",
- "homepage": "https://www.usabilitydynamics.com",
- "role": "Developer"
- }
- ],
- "keywords": [
- "job",
- "process",
- "utility"
- ]
- },
- {
- "name": "udx/lib-wp-bootstrap",
- "version": "1.3.0",
- "version_normalized": "1.3.0.0",
- "source": {
- "type": "git",
- "url": "git@github.com:udx/lib-wp-bootstrap",
- "reference": "1.3.0"
- },
- "dist": {
- "type": "zip",
- "url": "https://github.com/udx/lib-wp-bootstrap/archive/1.3.0.zip",
- "reference": "1.3.0"
- },
- "require": {
- "php": ">=5.3",
- "udx/lib-utility": "~0.3"
- },
- "type": "library",
- "extra": {
- "installer-name": "lib-wp-bootstrap"
- },
- "installation-source": "dist",
- "autoload": {
- "classmap": [
- "lib/classes"
- ]
- },
- "license": [
- "MIT"
- ],
- "description": "Wordpress bootstrap library created by UsabilityDynamics",
- "homepage": "https://github.com/udx/lib-wp-bootstrap",
- "keywords": [
- "wordpress"
- ]
- },
- {
- "name": "wpmetabox/meta-box",
- "version": "5.6.3",
- "version_normalized": "5.6.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/wpmetabox/meta-box.git",
- "reference": "c2c4a30ed70163dfdfe93f2865e88a7a45c46856"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/wpmetabox/meta-box/zipball/c2c4a30ed70163dfdfe93f2865e88a7a45c46856",
- "reference": "c2c4a30ed70163dfdfe93f2865e88a7a45c46856",
- "shasum": ""
- },
- "time": "2022-04-18T03:20:58+00:00",
- "type": "wordpress-plugin",
- "installation-source": "dist",
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "GPL-2.0"
- ],
- "authors": [
- {
- "name": "Tran Ngoc Tuan Anh",
- "email": "anhtnt@elightup.com",
- "homepage": "https://metabox.io",
- "role": "Developer"
- }
- ],
- "description": "A powerful, professional developer toolkit to create custom meta boxes and custom fields for WordPress websites.",
- "homepage": "https://metabox.io",
- "keywords": [
- "custom-field",
- "meta-box",
- "select2",
- "ui",
- "wordpress",
- "wordpress-plugin",
- "wp-admin"
- ]
- }
-]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-php73"
+ },
+ {
+ "name": "symfony/polyfill-php80",
+ "version": "v1.27.0",
+ "version_normalized": "1.27.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
+ "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2022-11-03T14:55:06+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.27-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "ion.bazan@gmail.com"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-php80"
+ },
+ {
+ "name": "symfony/service-contracts",
+ "version": "v3.3.0",
+ "version_normalized": "3.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4",
+ "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1",
+ "psr/container": "^2.0"
+ },
+ "conflict": {
+ "ext-psr": "<1.1|>=2"
+ },
+ "time": "2023-05-23T14:45:45+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.4-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\Service\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Test/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to writing services",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/service-contracts"
+ },
+ {
+ "name": "symfony/string",
+ "version": "v6.3.0",
+ "version_normalized": "6.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/string.git",
+ "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
+ "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-intl-grapheme": "~1.0",
+ "symfony/polyfill-intl-normalizer": "~1.0",
+ "symfony/polyfill-mbstring": "~1.0"
+ },
+ "conflict": {
+ "symfony/translation-contracts": "<2.5"
+ },
+ "require-dev": {
+ "symfony/error-handler": "^5.4|^6.0",
+ "symfony/http-client": "^5.4|^6.0",
+ "symfony/intl": "^6.2",
+ "symfony/translation-contracts": "^2.5|^3.0",
+ "symfony/var-exporter": "^5.4|^6.0"
+ },
+ "time": "2023-03-21T21:06:29+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "Resources/functions.php"
+ ],
+ "psr-4": {
+ "Symfony\\Component\\String\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "grapheme",
+ "i18n",
+ "string",
+ "unicode",
+ "utf-8",
+ "utf8"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/string"
+ },
+ {
+ "name": "udx/lib-settings",
+ "version": "0.3.0",
+ "version_normalized": "0.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "git@github.com:udx/lib-settings",
+ "reference": "0.3.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/udx/lib-settings/archive/0.3.0.zip",
+ "reference": "0.3.0"
+ },
+ "require": {
+ "udx/lib-utility": "~0.3"
+ },
+ "require-dev": {
+ "justinrainbow/json-schema": "1.1.*"
+ },
+ "type": "library",
+ "extra": {
+ "component": {
+ "scripts": [
+ "static/scripts/settings.js"
+ ],
+ "templates": [
+ "static/views/new-installation.xhtml"
+ ],
+ "files": [
+ "static/schemas/settings.json"
+ ]
+ },
+ "installer-name": "lib-settings"
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "lib"
+ ]
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Andy Potanin",
+ "email": "andy.potanin@usabilitydynamics.com",
+ "homepage": "https://www.usabilitydynamics.com",
+ "role": "Developer"
+ },
+ {
+ "name": "Maxim Peshkov",
+ "email": "maxim.peshkov@usabilitydynamics.com",
+ "homepage": "https://www.usabilitydynamics.com",
+ "role": "Developer"
+ },
+ {
+ "name": "Anton Korotkov",
+ "email": "anton.korotkov@usabilitydynamics.com",
+ "homepage": "https://www.usabilitydynamics.com",
+ "role": "Developer"
+ }
+ ],
+ "homepage": "https://github.com/udx/lib-settings",
+ "keywords": [
+ "settings"
+ ],
+ "install-path": "../udx/lib-settings"
+ },
+ {
+ "name": "udx/lib-ud-api-client",
+ "version": "1.2.1",
+ "version_normalized": "1.2.1.0",
+ "source": {
+ "type": "git",
+ "url": "git@github.com:udx/lib-ud-api-client",
+ "reference": "1.2.1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/udx/lib-ud-api-client/archive/1.2.1.zip",
+ "reference": "1.2.1"
+ },
+ "require": {
+ "php": ">=5.3"
+ },
+ "type": "library",
+ "extra": {
+ "installer-name": "lib-ud-api-client"
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "lib/classes"
+ ]
+ },
+ "license": [
+ "GPLv2"
+ ],
+ "authors": [
+ {
+ "name": "UsabilityDynamics, Inc.",
+ "homepage": "https://www.usabilitydynamics.com"
+ }
+ ],
+ "description": "UD API Client for WooCommerce API Manager",
+ "homepage": "https://github.com/udx/lib-ud-api-client",
+ "keywords": [
+ "api",
+ "client",
+ "licenses",
+ "plugins",
+ "wordpress"
+ ],
+ "install-path": "../udx/lib-ud-api-client"
+ },
+ {
+ "name": "udx/lib-utility",
+ "version": "0.4.0",
+ "version_normalized": "0.4.0.0",
+ "source": {
+ "type": "git",
+ "url": "git@github.com:udx/lib-utility",
+ "reference": "0.4.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/udx/lib-utility/archive/0.4.0.zip",
+ "reference": "0.4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.1.*"
+ },
+ "type": "library",
+ "extra": {
+ "installer-name": "lib-utility",
+ "component": {
+ "name": "utility",
+ "scripts": [
+ "scripts/*.js"
+ ]
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "lib"
+ ]
+ },
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Andy Potanin",
+ "email": "andy.potanin@usabilitydynamics.com",
+ "homepage": "https://www.usabilitydynamics.com",
+ "role": "Developer"
+ },
+ {
+ "name": "Maxim Peshkov",
+ "email": "maxim.peshkov@usabilitydynamics.com",
+ "homepage": "https://www.usabilitydynamics.com",
+ "role": "Developer"
+ },
+ {
+ "name": "Anton Korotkov",
+ "email": "anton.korotkov@usabilitydynamics.com",
+ "homepage": "https://www.usabilitydynamics.com",
+ "role": "Developer"
+ }
+ ],
+ "keywords": [
+ "job",
+ "process",
+ "utility"
+ ],
+ "install-path": "../udx/lib-utility"
+ },
+ {
+ "name": "udx/lib-wp-bootstrap",
+ "version": "1.3.0",
+ "version_normalized": "1.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "git@github.com:udx/lib-wp-bootstrap",
+ "reference": "1.3.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/udx/lib-wp-bootstrap/archive/1.3.0.zip",
+ "reference": "1.3.0"
+ },
+ "require": {
+ "php": ">=5.3",
+ "udx/lib-utility": "~0.3"
+ },
+ "type": "library",
+ "extra": {
+ "installer-name": "lib-wp-bootstrap"
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "lib/classes"
+ ]
+ },
+ "license": [
+ "MIT"
+ ],
+ "description": "Wordpress bootstrap library created by UsabilityDynamics",
+ "homepage": "https://github.com/udx/lib-wp-bootstrap",
+ "keywords": [
+ "wordpress"
+ ],
+ "install-path": "../udx/lib-wp-bootstrap"
+ },
+ {
+ "name": "wpmetabox/meta-box",
+ "version": "5.6.3",
+ "version_normalized": "5.6.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/wpmetabox/meta-box.git",
+ "reference": "c2c4a30ed70163dfdfe93f2865e88a7a45c46856"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/wpmetabox/meta-box/zipball/c2c4a30ed70163dfdfe93f2865e88a7a45c46856",
+ "reference": "c2c4a30ed70163dfdfe93f2865e88a7a45c46856",
+ "shasum": ""
+ },
+ "time": "2022-04-18T03:20:58+00:00",
+ "type": "wordpress-plugin",
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Tran Ngoc Tuan Anh",
+ "email": "anhtnt@elightup.com",
+ "homepage": "https://metabox.io",
+ "role": "Developer"
+ }
+ ],
+ "description": "A powerful, professional developer toolkit to create custom meta boxes and custom fields for WordPress websites.",
+ "homepage": "https://metabox.io",
+ "keywords": [
+ "custom-field",
+ "meta-box",
+ "select2",
+ "ui",
+ "wordpress",
+ "wordpress-plugin",
+ "wp-admin"
+ ],
+ "install-path": "../../wp-content/plugins/meta-box"
+ }
+ ],
+ "dev": true,
+ "dev-package-names": [
+ "coenjacobs/mozart",
+ "deliciousbrains/wp-background-processing",
+ "league/flysystem",
+ "league/mime-type-detection",
+ "psr/container",
+ "symfony/console",
+ "symfony/deprecation-contracts",
+ "symfony/finder",
+ "symfony/polyfill-ctype",
+ "symfony/polyfill-intl-grapheme",
+ "symfony/polyfill-intl-normalizer",
+ "symfony/polyfill-mbstring",
+ "symfony/polyfill-php73",
+ "symfony/polyfill-php80",
+ "symfony/service-contracts",
+ "symfony/string"
+ ]
+}
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
new file mode 100644
index 000000000..956594363
--- /dev/null
+++ b/vendor/composer/installed.php
@@ -0,0 +1,257 @@
+ array(
+ 'name' => 'wpcloud/wp-stateless',
+ 'pretty_version' => 'dev-latest',
+ 'version' => 'dev-latest',
+ 'reference' => 'e250b94bb16b40d6333182bd18f2e52c4058d34d',
+ 'type' => 'wordpress-plugin',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'dev' => true,
+ ),
+ 'versions' => array(
+ 'ccampbell/chromephp' => array(
+ 'pretty_version' => '4.1.0',
+ 'version' => '4.1.0.0',
+ 'reference' => 'c3c297615d48ae5b2a86a82311152d1ed095fcef',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../ccampbell/chromephp',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'coenjacobs/mozart' => array(
+ 'pretty_version' => '0.7.1',
+ 'version' => '0.7.1.0',
+ 'reference' => 'dbcdeb992d20d9c8914eef090f9a0d684bb1102c',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../coenjacobs/mozart',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'composer/installers' => array(
+ 'pretty_version' => 'v1.12.0',
+ 'version' => '1.12.0.0',
+ 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19',
+ 'type' => 'composer-plugin',
+ 'install_path' => __DIR__ . '/./installers',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'deliciousbrains/wp-background-processing' => array(
+ 'pretty_version' => '1.1.0',
+ 'version' => '1.1.0.0',
+ 'reference' => 'd5ef95cecba7f792ddca3e3bd70ebfb90dc4996d',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../deliciousbrains/wp-background-processing',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'firebase/php-jwt' => array(
+ 'pretty_version' => 'v6.6.0',
+ 'version' => '6.6.0.0',
+ 'reference' => '5a9cf79b4a2eb347230384648cc7b0d68cd97faa',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../firebase/php-jwt',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'league/flysystem' => array(
+ 'pretty_version' => '1.1.10',
+ 'version' => '1.1.10.0',
+ 'reference' => '3239285c825c152bcc315fe0e87d6b55f5972ed1',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../league/flysystem',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'league/mime-type-detection' => array(
+ 'pretty_version' => '1.11.0',
+ 'version' => '1.11.0.0',
+ 'reference' => 'ff6248ea87a9f116e78edd6002e39e5128a0d4dd',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../league/mime-type-detection',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'psr/container' => array(
+ 'pretty_version' => '2.0.2',
+ 'version' => '2.0.2.0',
+ 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/container',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'psr/log-implementation' => array(
+ 'dev_requirement' => true,
+ 'provided' => array(
+ 0 => '1.0|2.0',
+ ),
+ ),
+ 'roundcube/plugin-installer' => array(
+ 'dev_requirement' => false,
+ 'replaced' => array(
+ 0 => '*',
+ ),
+ ),
+ 'shama/baton' => array(
+ 'dev_requirement' => false,
+ 'replaced' => array(
+ 0 => '*',
+ ),
+ ),
+ 'symfony/console' => array(
+ 'pretty_version' => 'v5.4.24',
+ 'version' => '5.4.24.0',
+ 'reference' => '560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/console',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/deprecation-contracts' => array(
+ 'pretty_version' => 'v3.3.0',
+ 'version' => '3.3.0.0',
+ 'reference' => '7c3aff79d10325257a001fcf92d991f24fc967cf',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/finder' => array(
+ 'pretty_version' => 'v5.4.21',
+ 'version' => '5.4.21.0',
+ 'reference' => '078e9a5e1871fcfe6a5ce421b539344c21afef19',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/finder',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/polyfill-ctype' => array(
+ 'pretty_version' => 'v1.27.0',
+ 'version' => '1.27.0.0',
+ 'reference' => '5bbc823adecdae860bb64756d639ecfec17b050a',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/polyfill-intl-grapheme' => array(
+ 'pretty_version' => 'v1.27.0',
+ 'version' => '1.27.0.0',
+ 'reference' => '511a08c03c1960e08a883f4cffcacd219b758354',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/polyfill-intl-normalizer' => array(
+ 'pretty_version' => 'v1.27.0',
+ 'version' => '1.27.0.0',
+ 'reference' => '19bd1e4fcd5b91116f14d8533c57831ed00571b6',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/polyfill-mbstring' => array(
+ 'pretty_version' => 'v1.27.0',
+ 'version' => '1.27.0.0',
+ 'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/polyfill-php73' => array(
+ 'pretty_version' => 'v1.27.0',
+ 'version' => '1.27.0.0',
+ 'reference' => '9e8ecb5f92152187c4799efd3c96b78ccab18ff9',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php73',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/polyfill-php80' => array(
+ 'pretty_version' => 'v1.27.0',
+ 'version' => '1.27.0.0',
+ 'reference' => '7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php80',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/service-contracts' => array(
+ 'pretty_version' => 'v3.3.0',
+ 'version' => '3.3.0.0',
+ 'reference' => '40da9cc13ec349d9e4966ce18b5fbcd724ab10a4',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/service-contracts',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/string' => array(
+ 'pretty_version' => 'v6.3.0',
+ 'version' => '6.3.0.0',
+ 'reference' => 'f2e190ee75ff0f5eced645ec0be5c66fac81f51f',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/string',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'udx/lib-settings' => array(
+ 'pretty_version' => '0.3.0',
+ 'version' => '0.3.0.0',
+ 'reference' => '0.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../udx/lib-settings',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'udx/lib-ud-api-client' => array(
+ 'pretty_version' => '1.2.1',
+ 'version' => '1.2.1.0',
+ 'reference' => '1.2.1',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../udx/lib-ud-api-client',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'udx/lib-utility' => array(
+ 'pretty_version' => '0.4.0',
+ 'version' => '0.4.0.0',
+ 'reference' => '0.4.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../udx/lib-utility',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'udx/lib-wp-bootstrap' => array(
+ 'pretty_version' => '1.3.0',
+ 'version' => '1.3.0.0',
+ 'reference' => '1.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../udx/lib-wp-bootstrap',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'wpcloud/wp-stateless' => array(
+ 'pretty_version' => 'dev-latest',
+ 'version' => 'dev-latest',
+ 'reference' => 'e250b94bb16b40d6333182bd18f2e52c4058d34d',
+ 'type' => 'wordpress-plugin',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'wpmetabox/meta-box' => array(
+ 'pretty_version' => '5.6.3',
+ 'version' => '5.6.3.0',
+ 'reference' => 'c2c4a30ed70163dfdfe93f2865e88a7a45c46856',
+ 'type' => 'wordpress-plugin',
+ 'install_path' => __DIR__ . '/../../wp-content/plugins/meta-box',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ ),
+);
diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php
new file mode 100644
index 000000000..580fa9609
--- /dev/null
+++ b/vendor/composer/platform_check.php
@@ -0,0 +1,26 @@
+= 70400)) {
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
+}
+
+if ($issues) {
+ if (!headers_sent()) {
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+ if (!ini_get('display_errors')) {
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+ fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
+ } elseif (!headers_sent()) {
+ echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
+ }
+ }
+ trigger_error(
+ 'Composer detected issues in your platform: ' . implode(' ', $issues),
+ E_USER_ERROR
+ );
+}
From c50d3c2204db76a5a20022b55fab0a30fa33bca6 Mon Sep 17 00:00:00 2001
From: balexey88
Date: Tue, 24 Oct 2023 20:44:59 +0300
Subject: [PATCH 03/53] #2 fix install path for metabox
---
composer.json | 3 +++
vendor/composer/installed.json | 2 +-
vendor/composer/installed.php | 6 +++---
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/composer.json b/composer.json
index 97c1543ea..345c7ab8a 100644
--- a/composer.json
+++ b/composer.json
@@ -87,6 +87,9 @@
},
"product": false
}
+ },
+ "installer-paths": {
+ "vendor/wpmetabox/meta-box": ["wpmetabox/meta-box"]
}
},
"require-dev": {
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 1a3b3d642..d1abce28a 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1712,7 +1712,7 @@
"wordpress-plugin",
"wp-admin"
],
- "install-path": "../../wp-content/plugins/meta-box"
+ "install-path": "../wpmetabox/meta-box"
}
],
"dev": true,
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index 956594363..301196736 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => 'wpcloud/wp-stateless',
'pretty_version' => 'dev-latest',
'version' => 'dev-latest',
- 'reference' => 'e250b94bb16b40d6333182bd18f2e52c4058d34d',
+ 'reference' => '642420f5fd4f9c33c4e07bc1de46107e7d2108ad',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -238,7 +238,7 @@
'wpcloud/wp-stateless' => array(
'pretty_version' => 'dev-latest',
'version' => 'dev-latest',
- 'reference' => 'e250b94bb16b40d6333182bd18f2e52c4058d34d',
+ 'reference' => '642420f5fd4f9c33c4e07bc1de46107e7d2108ad',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -249,7 +249,7 @@
'version' => '5.6.3.0',
'reference' => 'c2c4a30ed70163dfdfe93f2865e88a7a45c46856',
'type' => 'wordpress-plugin',
- 'install_path' => __DIR__ . '/../../wp-content/plugins/meta-box',
+ 'install_path' => __DIR__ . '/../wpmetabox/meta-box',
'aliases' => array(),
'dev_requirement' => false,
),
From c7cda276a472b6e6b16d7cb287bfb39c21e7d56d Mon Sep 17 00:00:00 2001
From: nitin-pandita
Date: Fri, 27 Oct 2023 14:55:41 +0530
Subject: [PATCH 04/53] Fixed the typo in the readme
---
readme.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/readme.md b/readme.md
index 8d79a50d5..dbb1f74b1 100644
--- a/readme.md
+++ b/readme.md
@@ -2,19 +2,19 @@
## Description
-Upload and serve your WordPress media from Google Cloud Storage (GCS) with the WP-Stateless plugin. In as little as two minutes, you will be benefitting from serving your media from Google Cloud's distributed servers.
+Upload and serve your WordPress media from Google Cloud Storage (GCS) with the WP-Stateless plugin. In as little as two minutes, you will be benefiting from serving your media from Google Cloud's distributed servers.
New to Google Cloud? Google is offering you a [$300 credit](https://console.cloud.google.com/freetrial?referralId=e1c28cf728ff49b38d4eb5add3f5bfc8) to get you started.
### Benefits
* Store and deliver media files on Google Cloud Storage instead of your server.
* Google Cloud Storage is geo-redundant, meaning your media is delivered by the closest server - reducing latency and improving page speed.
-* Scale your WordPress website across multiple servers without the need of synchronizing media files.
+* Scale your WordPress website across multiple servers without the need for synchronizing media files.
* Native integration between Google Cloud Storage and WordPress.
* $300 free trial from Google Cloud. Nice!
### Modes
-* Backup - Upload media files to Google Storage and serve local file urls.
+* Backup - Upload media files to Google Storage and serve local file URLs.
* CDN - Copy media files to Google Storage and serve them directly from there.
* Ephemeral - Store and serve media files with Google Cloud Storage only. Media files are not stored locally, but local storage is used temporarily for processing and is required for certain compatibilities.
* Stateless - Store and serve media files with Google Cloud Storage only. Media files are not stored locally.
@@ -22,7 +22,7 @@ New to Google Cloud? Google is offering you a [$300 credit](https://console.clou
### Features
* Setup assistant makes getting started fast and easy.
* No need to manually create service accounts or buckets - handled automatically.
-* Settings panel provides you with further GCS configuration and file url customization.
+* Settings panel provides you with further GCS configuration and file URL customization.
* Mask the default GCS URL with your own custom domain.
* Automatically replace hardcoded media URLs with GCS equivalents in post editor and meta.
* Batch image thumbnail regeneration.
@@ -43,9 +43,9 @@ Looking for a unique feature for your next project? [Hire us!](https://udx.io/)
1. Search, install, and activate the *WP-Stateless* plugin via your WordPress dashboard.
2. Begin WP-Stateless setup assistant at *Media > Stateless Setup* and click "Get Started Now."
-3. Click "Google Login" and sign-in with your Google account.
+3. Click "Google Login" and sign in with your Google account.
4. Set a Google Cloud Project, Google Cloud Storage Bucket, and Google Cloud Billing Account and click "Continue."
-5. Installation and setup is now complete. Visit *Media > Stateless Settings* for more options.
+5. Installation and setup are now complete. Visit *Media > Stateless Settings* for more options.
For a more detailed installation and setup walkthrough, please see the [manual setup instructions on Github](https://wp-stateless.github.io/docs/manual-setup/).
@@ -79,4 +79,4 @@ To ensure new releases cause as little disruption as possible, we rely on a numb
### Who maintains this plugin?
-[UDX](https://udx.io/) maintains this plugin by continuing development through it's own staff, reviewing pull requests, testing, and steering the overall release schedule. UDX is located in Durham, North Carolina and provides WordPress engineering and hosting services to clients throughout the United States.
+[UDX](https://udx.io/) maintains this plugin by continuing development through its own staff, reviewing pull requests, testing, and steering the overall release schedule. UDX is located in Durham, North Carolina, and provides WordPress engineering and hosting services to clients throughout the United States.
From a65b00d5816f9ff7834e1bdecce520e30c49f67b Mon Sep 17 00:00:00 2001
From: balexey88
Date: Tue, 14 Nov 2023 17:02:30 +0200
Subject: [PATCH 05/53] Update libraries. Remove Compatibilities (moved to
external addons). Addon compatibilities are enabled by default. Update
changlogs and readmes. Dynamic image support is part of the core. Google App
Engine compatibility is part of the core. Fix issue with Image upload in
Statless mode on Google App Engine. Fix - prevent dulicating messages in
Admin Panel. Fix - 'View stateless meta' link remove when not in Media
Library.
---
changelog.txt | 20 +
changes.md | 22 +-
composer.json | 2 +-
composer.lock | 279 +-
lib/Google/CHANGELOG.md | 7 +
lib/Google/CODE_OF_CONDUCT.md | 43 +
lib/Google/README.md | 9 +-
lib/Google/UPGRADING.md | 377 +
lib/Google/composer.json | 19 +-
lib/Google/composer.lock | 977 +-
lib/Google/phpstan.neon.dist | 5 +
lib/Google/vendor/autoload.php | 20 +-
lib/Google/vendor/bin/google-cloud-batch | 120 +-
lib/Google/vendor/composer/ClassLoader.php | 202 +-
.../vendor/composer/InstalledVersions.php | 359 +
.../vendor/composer/autoload_classmap.php | 5 +-
lib/Google/vendor/composer/autoload_files.php | 7 +-
.../vendor/composer/autoload_namespaces.php | 2 +-
lib/Google/vendor/composer/autoload_psr4.php | 5 +-
lib/Google/vendor/composer/autoload_real.php | 57 +-
.../vendor/composer/autoload_static.php | 34 +-
lib/Google/vendor/composer/installed.json | 3333 ++++---
lib/Google/vendor/composer/installed.php | 269 +
lib/Google/vendor/composer/platform_check.php | 26 +
.../vendor/firebase/php-jwt/CHANGELOG.md | 46 +
lib/Google/vendor/firebase/php-jwt/README.md | 11 +-
.../php-jwt/src/BeforeValidException.php | 13 +-
.../firebase/php-jwt/src/CachedKeySet.php | 10 +
.../firebase/php-jwt/src/ExpiredException.php | 13 +-
.../vendor/firebase/php-jwt/src/JWK.php | 32 +-
.../vendor/firebase/php-jwt/src/JWT.php | 48 +-
.../src/JWTExceptionWithPayloadInterface.php | 20 +
.../vendor/google/apiclient-services/LICENSE | 203 +
.../google/apiclient-services/README.md | 17 +
.../google/apiclient-services/SECURITY.md | 7 +
.../google/apiclient-services/autoload.php | 36 +
.../google/apiclient-services/composer.json | 27 +
.../apiclient-services/src}/Storage.php | 417 +-
.../src/Storage/AnywhereCache.php | 224 +
.../src/Storage/AnywhereCaches.php | 79 +
.../src}/Storage/Bucket.php | 32 +
.../src}/Storage/BucketAccessControl.php | 0
.../BucketAccessControlProjectTeam.php | 0
.../src}/Storage/BucketAccessControls.php | 0
.../src}/Storage/BucketAutoclass.php | 36 +
.../src}/Storage/BucketBilling.php | 0
.../src}/Storage/BucketCors.php | 0
.../Storage/BucketCustomPlacementConfig.php | 0
.../src}/Storage/BucketEncryption.php | 0
.../src}/Storage/BucketIamConfiguration.php | 0
...BucketIamConfigurationBucketPolicyOnly.php | 0
...mConfigurationUniformBucketLevelAccess.php | 0
.../src}/Storage/BucketLifecycle.php | 0
.../src}/Storage/BucketLifecycleRule.php | 0
.../Storage/BucketLifecycleRuleAction.php | 0
.../Storage/BucketLifecycleRuleCondition.php | 0
.../src}/Storage/BucketLogging.php | 0
.../src/Storage/BucketObjectRetention.php | 44 +
.../src}/Storage/BucketOwner.php | 0
.../src}/Storage/BucketRetentionPolicy.php | 0
.../src/Storage/BucketSoftDeletePolicy.php | 62 +
.../src}/Storage/BucketVersioning.php | 0
.../src}/Storage/BucketWebsite.php | 0
.../src}/Storage/Buckets.php | 0
.../src/Storage/BulkRestoreObjectsRequest.php | 117 +
.../src}/Storage/Channel.php | 0
.../src}/Storage/ComposeRequest.php | 0
.../Storage/ComposeRequestSourceObjects.php | 0
...equestSourceObjectsObjectPreconditions.php | 0
.../apiclient-services/src}/Storage/Expr.php | 0
...oogleLongrunningListOperationsResponse.php | 61 +
.../Storage/GoogleLongrunningOperation.php | 114 +
.../src/Storage/GoogleRpcStatus.php | 81 +
.../src}/Storage/HmacKey.php | 0
.../src}/Storage/HmacKeyMetadata.php | 0
.../src}/Storage/HmacKeysMetadata.php | 0
.../src/Storage/ManagedFolder.php | 170 +
.../src/Storage/ManagedFolders.php | 79 +
.../src}/Storage/Notification.php | 0
.../src}/Storage/Notifications.php | 0
.../src}/Storage/ObjectAccessControl.php | 0
.../ObjectAccessControlProjectTeam.php | 0
.../src}/Storage/ObjectAccessControls.php | 0
.../src}/Storage/Objects.php | 0
.../src}/Storage/Policy.php | 0
.../src}/Storage/PolicyBindings.php | 0
.../src/Storage/Resource/AnywhereCache.php | 142 +
.../Storage/Resource/BucketAccessControls.php | 0
.../src}/Storage/Resource/Buckets.php | 2 +
.../src}/Storage/Resource/Channels.php | 0
.../Resource/DefaultObjectAccessControls.php | 2 +-
.../src/Storage/Resource/ManagedFolders.php | 171 +
.../src}/Storage/Resource/Notifications.php | 0
.../Storage/Resource/ObjectAccessControls.php | 18 +-
.../src}/Storage/Resource/Objects.php | 117 +-
.../src/Storage/Resource/Operations.php | 88 +
.../src}/Storage/Resource/Projects.php | 0
.../Storage/Resource/ProjectsHmacKeys.php | 0
.../Resource/ProjectsServiceAccount.php | 0
.../src}/Storage/RewriteResponse.php | 0
.../src}/Storage/ServiceAccount.php | 0
.../src}/Storage/StorageObject.php | 52 +
.../StorageObjectCustomerEncryption.php | 0
.../src}/Storage/StorageObjectOwner.php | 0
.../src/Storage/StorageObjectRetention.php | 62 +
.../Storage/TestIamPermissionsResponse.php | 0
lib/Google/vendor/google/auth/composer.json | 4 +-
.../vendor/google/auth/src/AccessToken.php | 34 +-
.../src/CredentialSource/AwsNativeSource.php | 360 +
.../auth/src/CredentialSource/FileSource.php | 75 +
.../auth/src/CredentialSource/UrlSource.php | 97 +
.../ExternalAccountCredentials.php | 241 +
.../auth/src/Credentials/GCECredentials.php | 21 +
.../ImpersonatedServiceAccountCredentials.php | 34 +-
.../google/auth/src/CredentialsLoader.php | 48 +-
...ternalAccountCredentialSourceInterface.php | 23 +
lib/Google/vendor/google/auth/src/OAuth2.php | 118 +-
.../google/auth/src/UpdateMetadataTrait.php | 66 +
.../google/cloud-core/.repo-metadata.json | 1 +
lib/Google/vendor/google/cloud-core/VERSION | 2 +-
.../vendor/google/cloud-core/composer.json | 8 +-
.../cloud-core/src/Batch/BatchTrait.php | 2 +-
.../src/Batch/HandleFailureTrait.php | 2 +-
.../src/Batch/InMemoryConfigStorage.php | 5 +-
.../cloud-core/src/Batch/InterruptTrait.php | 3 +-
.../src/Batch/QueueOverflowException.php | 2 +-
.../google/cloud-core/src/Batch/Retry.php | 5 +
.../src/Batch/SerializableClientTrait.php | 2 +-
.../cloud-core/src/Batch/SimpleJobTrait.php | 2 +-
.../cloud-core/src/ExponentialBackoff.php | 2 +-
.../cloud-core/src/GrpcRequestWrapper.php | 2 +-
.../vendor/google/cloud-core/src/Iam/Iam.php | 6 +-
.../cloud-core/src/LongRunning/LROTrait.php | 3 +
.../LongRunningConnectionInterface.php | 1 +
.../src/LongRunning/LongRunningOperation.php | 3 +
.../src/Report/EmptyMetadataProvider.php | 3 +-
.../src/Report/GAEMetadataProvider.php | 3 +-
.../src/Report/MetadataProviderInterface.php | 3 +-
.../src/Report/SimpleMetadataProvider.php | 3 +-
.../google/cloud-core/src/RequestWrapper.php | 3 +-
.../vendor/google/cloud-core/src/Retry.php | 2 +-
.../google/cloud-core/src/ServiceBuilder.php | 30 +-
.../cloud-core/src/Testing/TestHelpers.php | 4 +-
.../src/Upload/ResumableUploader.php | 6 +-
.../google/cloud-storage/.repo-metadata.json | 1 +
.../vendor/google/cloud-storage/VERSION | 2 +-
.../vendor/google/cloud-storage/composer.json | 3 +-
.../vendor/google/cloud-storage/src/Acl.php | 27 +-
.../google/cloud-storage/src/Bucket.php | 47 +-
.../src/Connection/ConnectionInterface.php | 2 +
.../src/Connection/IamBucket.php | 2 +
.../cloud-storage/src/Connection/Rest.php | 25 +-
.../ServiceDefinition/storage-v1.json | 8749 +++++++++--------
.../google/cloud-storage/src/HmacKey.php | 5 +-
.../google/cloud-storage/src/Lifecycle.php | 4 +-
.../google/cloud-storage/src/Notification.php | 6 +-
.../cloud-storage/src/ObjectIterator.php | 4 +-
.../cloud-storage/src/ObjectPageIterator.php | 4 +-
.../google/cloud-storage/src/ReadStream.php | 6 +-
.../cloud-storage/src/SigningHelper.php | 21 +-
.../cloud-storage/src/StorageClient.php | 16 +-
.../cloud-storage/src/StorageObject.php | 28 +-
.../google/cloud-storage/src/WriteStream.php | 8 +-
.../google/crc32/.github/workflows/test.yml | 45 -
lib/Google/vendor/google/crc32/.gitignore | 6 -
.../vendor/google/crc32/CONTRIBUTING.md | 28 -
lib/Google/vendor/google/crc32/LICENSE | 201 -
lib/Google/vendor/google/crc32/Makefile | 71 -
lib/Google/vendor/google/crc32/README.md | 138 -
lib/Google/vendor/google/crc32/composer.json | 25 -
.../vendor/google/crc32/crc32_benchmark.php | 112 -
lib/Google/vendor/google/crc32/ext/.gitignore | 35 -
lib/Google/vendor/google/crc32/ext/config.m4 | 63 -
.../vendor/google/crc32/ext/hash_crc32c.c | 75 -
.../vendor/google/crc32/ext/install_crc32c.sh | 34 -
.../vendor/google/crc32/ext/php_crc32c.c | 174 -
.../vendor/google/crc32/ext/php_crc32c.h | 53 -
.../google/crc32/ext/tests/001_loaded.phpt | 14 -
.../google/crc32/ext/tests/002_basic.phpt | 93 -
.../google/crc32/ext/tests/003_extend.phpt | 47 -
.../google/crc32/ext/tests/004_error.phpt | 36 -
.../google/crc32/ext/tests/005_hash.phpt | 22 -
.../google/crc32/ext/tests/006_serialize.phpt | 26 -
.../vendor/google/crc32/src/Builtin.php | 88 -
lib/Google/vendor/google/crc32/src/CRC32.php | 112 -
.../vendor/google/crc32/src/CRCInterface.php | 59 -
.../vendor/google/crc32/src/CRCTrait.php | 54 -
lib/Google/vendor/google/crc32/src/Google.php | 69 -
lib/Google/vendor/google/crc32/src/PHP.php | 80 -
.../vendor/google/crc32/src/PHPSlicedBy4.php | 108 -
lib/Google/vendor/google/crc32/src/Table.php | 113 -
.../vendor/google/crc32/tests/BuiltinTest.php | 50 -
.../vendor/google/crc32/tests/CRC32Test.php | 158 -
.../google/crc32/tests/DataIterator.php | 204 -
.../vendor/google/crc32/tests/GoogleTest.php | 56 -
.../vendor/guzzlehttp/guzzle/CHANGELOG.md | 15 +
.../vendor/guzzlehttp/guzzle/UPGRADING.md | 2 +-
.../vendor/guzzlehttp/guzzle/composer.json | 4 +-
.../vendor/guzzlehttp/guzzle/src/Client.php | 2 +-
.../guzzlehttp/guzzle/src/ClientInterface.php | 2 +-
.../guzzle/src/Cookie/CookieJar.php | 38 +-
.../guzzle/src/Cookie/CookieJarInterface.php | 3 +-
.../guzzle/src/Handler/CurlFactory.php | 18 +-
.../guzzle/src/Handler/CurlMultiHandler.php | 10 +-
.../guzzlehttp/guzzle/src/HandlerStack.php | 4 +-
.../guzzle/src/MessageFormatter.php | 2 +-
.../guzzle/src/MessageFormatterInterface.php | 2 +-
.../guzzle/src/RedirectMiddleware.php | 4 +-
.../guzzlehttp/guzzle/src/TransferStats.php | 4 +-
.../vendor/guzzlehttp/promises/.editorconfig | 9 -
.../vendor/guzzlehttp/promises/.gitattributes | 12 -
.../guzzlehttp/promises/.github/.editorconfig | 2 -
.../guzzlehttp/promises/.github/FUNDING.yml | 2 -
.../guzzlehttp/promises/.github/stale.yml | 14 -
.../promises/.github/workflows/checks.yml | 21 -
.../promises/.github/workflows/ci.yml | 65 -
.../promises/.github/workflows/static.yml | 62 -
.../vendor/guzzlehttp/promises/.gitignore | 7 -
.../promises/.php-cs-fixer.dist.php | 87 -
.../vendor/guzzlehttp/promises/.travis.yml | 19 -
.../vendor/guzzlehttp/promises/CHANGELOG.md | 29 +
.../vendor/guzzlehttp/promises/Makefile | 13 -
.../vendor/guzzlehttp/promises/README.md | 21 +-
.../vendor/guzzlehttp/promises/composer.json | 19 +-
.../guzzlehttp/promises/phpstan-baseline.neon | 37 -
.../guzzlehttp/promises/phpstan.neon.dist | 7 -
.../guzzlehttp/promises/phpunit.xml.dist | 21 -
.../vendor/guzzlehttp/promises/psalm.xml | 15 -
.../promises/src/AggregateException.php | 4 +-
.../promises/src/CancellationException.php | 2 +
.../guzzlehttp/promises/src/Coroutine.php | 39 +-
.../vendor/guzzlehttp/promises/src/Create.php | 21 +-
.../vendor/guzzlehttp/promises/src/Each.php | 24 +-
.../guzzlehttp/promises/src/EachPromise.php | 43 +-
.../promises/src/FulfilledPromise.php | 29 +-
.../vendor/guzzlehttp/promises/src/Is.php | 18 +-
.../guzzlehttp/promises/src/Promise.php | 51 +-
.../promises/src/PromiseInterface.php | 34 +-
.../promises/src/PromisorInterface.php | 6 +-
.../promises/src/RejectedPromise.php | 30 +-
.../promises/src/RejectionException.php | 15 +-
.../guzzlehttp/promises/src/TaskQueue.php | 16 +-
.../promises/src/TaskQueueInterface.php | 10 +-
.../vendor/guzzlehttp/promises/src/Utils.php | 67 +-
.../guzzlehttp/promises/src/functions.php | 363 -
.../promises/src/functions_include.php | 6 -
.../promises/tests/AggregateExceptionTest.php | 16 -
.../promises/tests/CoroutineTest.php | 113 -
.../guzzlehttp/promises/tests/CreateTest.php | 56 -
.../promises/tests/EachPromiseTest.php | 430 -
.../guzzlehttp/promises/tests/EachTest.php | 34 -
.../promises/tests/FulfilledPromiseTest.php | 113 -
.../guzzlehttp/promises/tests/IsTest.php | 40 -
.../promises/tests/NotPromiseInstance.php | 49 -
.../guzzlehttp/promises/tests/PromiseTest.php | 761 --
.../promises/tests/PropertyHelper.php | 27 -
.../promises/tests/RejectedPromiseTest.php | 149 -
.../promises/tests/RejectionExceptionTest.php | 28 -
.../promises/tests/TaskQueueTest.php | 33 -
.../guzzlehttp/promises/tests/Thennable.php | 25 -
.../guzzlehttp/promises/tests/Thing1.php | 18 -
.../guzzlehttp/promises/tests/Thing2.php | 12 -
.../guzzlehttp/promises/tests/UtilsTest.php | 731 --
.../vendor/guzzlehttp/psr7/CHANGELOG.md | 23 +-
lib/Google/vendor/guzzlehttp/psr7/README.md | 24 +-
.../guzzlehttp/psr7/src/AppendStream.php | 14 +-
.../guzzlehttp/psr7/src/BufferStream.php | 2 -
.../vendor/guzzlehttp/psr7/src/FnStream.php | 9 +-
.../vendor/guzzlehttp/psr7/src/Header.php | 2 +-
.../guzzlehttp/psr7/src/HttpFactory.php | 8 +-
.../guzzlehttp/psr7/src/InflateStream.php | 6 +-
.../vendor/guzzlehttp/psr7/src/Message.php | 26 +-
.../guzzlehttp/psr7/src/MessageTrait.php | 12 +-
.../vendor/guzzlehttp/psr7/src/MimeType.php | 34 +-
.../guzzlehttp/psr7/src/MultipartStream.php | 8 +-
.../vendor/guzzlehttp/psr7/src/PumpStream.php | 6 +-
.../vendor/guzzlehttp/psr7/src/Query.php | 4 +-
.../vendor/guzzlehttp/psr7/src/Request.php | 6 +-
.../vendor/guzzlehttp/psr7/src/Response.php | 1 +
.../vendor/guzzlehttp/psr7/src/Rfc7230.php | 2 +-
.../guzzlehttp/psr7/src/ServerRequest.php | 14 +-
.../vendor/guzzlehttp/psr7/src/Stream.php | 11 +-
.../psr7/src/StreamDecoratorTrait.php | 5 +-
.../guzzlehttp/psr7/src/StreamWrapper.php | 60 +-
lib/Google/vendor/guzzlehttp/psr7/src/Uri.php | 51 +-
.../guzzlehttp/psr7/src/UriNormalizer.php | 10 +-
.../guzzlehttp/psr7/src/UriResolver.php | 18 +-
.../vendor/guzzlehttp/psr7/src/Utils.php | 10 +-
.../vendor/monolog/monolog/CHANGELOG.md | 6 +
.../monolog/src/Monolog/ErrorHandler.php | 2 +-
.../src/Monolog/Formatter/LineFormatter.php | 2 +-
.../Monolog/Formatter/NormalizerFormatter.php | 3 +
...chHandler.php => ElasticsearchHandler.php} | 0
.../src/Monolog/Handler/StreamHandler.php | 11 +-
.../vendor/phpseclib/phpseclib/BACKERS.md | 3 +-
.../vendor/phpseclib/phpseclib/README.md | 3 +-
.../phpseclib/Crypt/Common/AsymmetricKey.php | 2 +-
.../phpseclib/Crypt/Common/SymmetricKey.php | 6 +-
.../phpseclib/phpseclib/Crypt/RSA.php | 20 +-
.../phpseclib/phpseclib/Crypt/Rijndael.php | 4 +-
.../phpseclib/phpseclib/File/ASN1.php | 5 +-
.../phpseclib/phpseclib/File/X509.php | 26 +-
.../phpseclib/phpseclib/Math/BigInteger.php | 18 +-
.../Math/BigInteger/Engines/Engine.php | 5 +
.../phpseclib/Math/BigInteger/Engines/PHP.php | 14 +
.../Math/BigInteger/Engines/PHP32.php | 6 +-
.../Math/BigInteger/Engines/PHP64.php | 2 +-
.../phpseclib/Math/PrimeField/Integer.php | 7 +-
.../phpseclib/phpseclib/Net/SFTP.php | 380 +-
.../phpseclib/phpseclib/Net/SSH2.php | 605 +-
.../psr/cache/src/CacheItemInterface.php | 4 +-
.../vendor/psr/http-client/CHANGELOG.md | 8 +
.../vendor/psr/http-client/composer.json | 3 +
.../vendor/psr/http-message/composer.json | 4 +-
.../psr/http-message/src/MessageInterface.php | 24 +-
.../psr/http-message/src/RequestInterface.php | 15 +-
.../http-message/src/ResponseInterface.php | 8 +-
.../src/ServerRequestInterface.php | 24 +-
.../psr/http-message/src/StreamInterface.php | 28 +-
.../src/UploadedFileInterface.php | 14 +-
.../psr/http-message/src/UriInterface.php | 34 +-
.../vendor/ramsey/collection/composer.json | 3 +-
.../ramsey/collection/src/AbstractArray.php | 55 +-
.../collection/src/AbstractCollection.php | 206 +-
.../ramsey/collection/src/AbstractSet.php | 10 +-
.../ramsey/collection/src/ArrayInterface.php | 4 +-
.../ramsey/collection/src/Collection.php | 13 +-
.../collection/src/CollectionInterface.php | 113 +-
.../collection/src/DoubleEndedQueue.php | 127 +-
.../src/DoubleEndedQueueInterface.php | 36 +-
.../Exception/CollectionMismatchException.php | 2 +-
.../Exception/InvalidArgumentException.php | 4 +-
...tion.php => InvalidSortOrderException.php} | 7 +-
.../src/Exception/NoSuchElementException.php | 2 +-
.../src/Exception/OutOfBoundsException.php | 4 +-
.../UnsupportedOperationException.php | 2 +-
...ethod.php => ValueExtractionException.php} | 6 +-
.../ramsey/collection/src/Map/AbstractMap.php | 106 +-
.../collection/src/Map/AbstractTypedMap.php | 18 +-
.../src/Map/AssociativeArrayMap.php | 3 +-
.../collection/src/Map/MapInterface.php | 57 +-
.../collection/src/Map/NamedParameterMap.php | 21 +-
.../ramsey/collection/src/Map/TypedMap.php | 30 +-
.../collection/src/Map/TypedMapInterface.php | 3 +-
.../vendor/ramsey/collection/src/Queue.php | 97 +-
.../ramsey/collection/src/QueueInterface.php | 18 +-
.../vendor/ramsey/collection/src/Set.php | 14 +-
.../vendor/ramsey/collection/src/Sort.php | 31 -
.../ramsey/collection/src/Tool/TypeTrait.php | 49 +-
.../src/Tool/ValueExtractorTrait.php | 58 +-
.../src/Tool/ValueToStringTrait.php | 15 +-
lib/Google/vendor/ramsey/uuid/src/Uuid.php | 2 +-
.../symfony/deprecation-contracts/.gitignore | 3 +
.../symfony/deprecation-contracts/LICENSE | 2 +-
.../symfony/deprecation-contracts/README.md | 2 +-
.../deprecation-contracts/composer.json | 4 +-
.../vendor/symfony/polyfill-php81}/LICENSE | 2 +-
.../vendor/symfony/polyfill-php81/Php81.php | 37 +
.../vendor/symfony/polyfill-php81/README.md | 18 +
.../Resources/stubs/CURLStringFile.php | 51 +
.../Resources/stubs/ReturnTypeWillChange.php | 8 +-
.../symfony/polyfill-php81/bootstrap.php | 28 +
.../symfony/polyfill-php81}/composer.json | 8 +-
lib/classes/class-api.php | 2 +-
lib/classes/class-bootstrap.php | 31 +-
lib/classes/class-compatibility.php | 2 +-
...rt.php => class-dynamic-image-support.php} | 52 +-
lib/classes/class-errors.php | 22 +-
lib/classes/class-google-app-engine.php | 93 +
lib/classes/class-module.php | 60 -
lib/classes/class-settings.php | 5 +-
lib/classes/class-upgrader.php | 28 +
lib/classes/class-utility.php | 3 +-
.../compatibility/google-app-engine.php | 38 -
lib/classes/compatibility/imagify.php | 304 -
lib/classes/compatibility/js/shortpixel.js | 18 -
lib/classes/compatibility/shortpixel.php | 486 -
lib/classes/compatibility/siteorigin-css.php | 73 -
.../siteorigin-widget-bundle.php | 85 -
lib/classes/compatibility/vidorev.php | 40 -
.../woo-extra-product-options.php | 80 -
lib/classes/compatibility/woocommerce.php | 47 -
lib/classes/compatibility/wp-retina-2x.php | 130 -
lib/classes/compatibility/wp-smush.php | 238 -
.../compatibility/wpbakery-page-builder.php | 81 -
lib/classes/compatibility/wpforms.php | 30 -
lib/meta-box-tabs/meta-box-tabs.php | 63 +-
lib/meta-box-tabs/tabs.css | 243 +-
lib/meta-box-tabs/tabs.js | 18 +-
readme.txt | 4 +-
static/scripts/wp-stateless.js | 9 +
static/views/settings_interface.php | 35 +-
vendor/bin/mozart | 119 -
vendor/coenjacobs/mozart/.github/FUNDING.yml | 3 -
.../mozart/.github/workflows/analysis.yml | 20 -
.../.github/workflows/docker-latest.yml | 52 -
.../mozart/.github/workflows/main.yml | 50 -
.../mozart/.github/workflows/release.yml | 92 -
vendor/coenjacobs/mozart/.gitignore | 6 -
vendor/coenjacobs/mozart/Dockerfile | 17 -
vendor/coenjacobs/mozart/LICENSE | 21 -
vendor/coenjacobs/mozart/README.md | 146 -
vendor/coenjacobs/mozart/bin/mozart | 29 -
vendor/coenjacobs/mozart/composer.json | 40 -
vendor/coenjacobs/mozart/phpcs.xml | 7 -
vendor/coenjacobs/mozart/phpunit.xml | 16 -
vendor/coenjacobs/mozart/psalm.xml | 15 -
.../src/Composer/Autoload/Autoloader.php | 9 -
.../mozart/src/Composer/Autoload/Classmap.php | 36 -
.../Composer/Autoload/NamespaceAutoloader.php | 49 -
.../mozart/src/Composer/Autoload/Psr0.php | 7 -
.../mozart/src/Composer/Autoload/Psr4.php | 22 -
.../mozart/src/Composer/Package.php | 69 -
.../mozart/src/Console/Application.php | 20 -
.../mozart/src/Console/Commands/Compose.php | 243 -
vendor/coenjacobs/mozart/src/Mover.php | 243 -
.../mozart/src/Replace/BaseReplacer.php | 20 -
.../mozart/src/Replace/ClassmapReplacer.php | 64 -
.../mozart/src/Replace/NamespaceReplacer.php | 43 -
.../mozart/src/Replace/Replacer.php | 11 -
vendor/coenjacobs/mozart/src/Replacer.php | 223 -
.../tests/Console/Commands/ComposeTest.php | 225 -
vendor/coenjacobs/mozart/tests/MoverTest.php | 230 -
.../mozart/tests/issue89-composer.json | 18 -
.../tests/replacers/ClassMapReplacerTest.php | 155 -
.../ClassmapReplacerIntegrationTest.php | 137 -
.../NamespaceReplacerIntegrationTest.php | 131 -
.../tests/replacers/NamespaceReplacerTest.php | 126 -
vendor/composer/autoload_classmap.php | 30 +-
vendor/composer/autoload_files.php | 17 -
vendor/composer/autoload_psr4.php | 15 +-
vendor/composer/autoload_real.php | 12 -
vendor/composer/autoload_static.php | 120 +-
vendor/composer/installed.json | 1527 +--
vendor/composer/installed.php | 176 +-
.../.circleci/config.yml | 93 -
.../wp-background-processing/.gitignore | 3 -
.../wp-background-processing/.phpcs.xml | 65 -
.../wp-background-processing/Makefile | 18 -
.../wp-background-processing/README.md | 376 -
.../bin/install-wp-tests.sh | 181 -
.../classes/wp-async-request.php | 202 -
.../classes/wp-background-process.php | 733 --
.../wp-background-processing/composer.json | 35 -
.../wp-background-processing/composer.lock | 2022 ----
.../wp-background-processing/license.txt | 280 -
.../wp-background-processing/phpunit.xml | 15 -
.../tests/Test_Setup.php | 19 -
.../tests/Test_WP_Background_Process.php | 589 --
.../tests/bootstrap.php | 38 -
.../wp-background-processing.php | 24 -
vendor/firebase/php-jwt/CHANGELOG.md | 34 +
.../php-jwt/src/BeforeValidException.php | 13 +-
vendor/firebase/php-jwt/src/CachedKeySet.php | 10 +
.../firebase/php-jwt/src/ExpiredException.php | 13 +-
vendor/firebase/php-jwt/src/JWK.php | 32 +-
vendor/firebase/php-jwt/src/JWT.php | 41 +-
.../src/JWTExceptionWithPayloadInterface.php | 20 +
vendor/league/flysystem/CODE_OF_CONDUCT.md | 76 -
vendor/league/flysystem/LICENSE | 19 -
vendor/league/flysystem/SECURITY.md | 16 -
vendor/league/flysystem/composer.json | 68 -
vendor/league/flysystem/deprecations.md | 19 -
.../flysystem/src/Adapter/AbstractAdapter.php | 72 -
.../src/Adapter/AbstractFtpAdapter.php | 705 --
.../src/Adapter/CanOverwriteFiles.php | 12 -
vendor/league/flysystem/src/Adapter/Ftp.php | 584 --
vendor/league/flysystem/src/Adapter/Ftpd.php | 48 -
vendor/league/flysystem/src/Adapter/Local.php | 533 -
.../flysystem/src/Adapter/NullAdapter.php | 144 -
.../Polyfill/NotSupportingVisibilityTrait.php | 33 -
.../Adapter/Polyfill/StreamedCopyTrait.php | 51 -
.../Adapter/Polyfill/StreamedReadingTrait.php | 44 -
.../src/Adapter/Polyfill/StreamedTrait.php | 9 -
.../Adapter/Polyfill/StreamedWritingTrait.php | 60 -
.../flysystem/src/Adapter/SynologyFtp.php | 8 -
.../league/flysystem/src/AdapterInterface.php | 118 -
vendor/league/flysystem/src/Config.php | 107 -
.../league/flysystem/src/ConfigAwareTrait.php | 49 -
.../src/ConnectionErrorException.php | 9 -
.../src/ConnectionRuntimeException.php | 9 -
.../flysystem/src/CorruptedPathDetected.php | 17 -
vendor/league/flysystem/src/Directory.php | 31 -
vendor/league/flysystem/src/Exception.php | 8 -
vendor/league/flysystem/src/File.php | 205 -
.../flysystem/src/FileExistsException.php | 37 -
.../flysystem/src/FileNotFoundException.php | 37 -
vendor/league/flysystem/src/Filesystem.php | 409 -
.../flysystem/src/FilesystemException.php | 7 -
.../flysystem/src/FilesystemInterface.php | 284 -
.../src/FilesystemNotFoundException.php | 12 -
vendor/league/flysystem/src/Handler.php | 137 -
.../flysystem/src/InvalidRootException.php | 9 -
vendor/league/flysystem/src/MountManager.php | 648 --
.../flysystem/src/NotSupportedException.php | 37 -
.../flysystem/src/Plugin/AbstractPlugin.php | 24 -
.../league/flysystem/src/Plugin/EmptyDir.php | 34 -
.../flysystem/src/Plugin/ForcedCopy.php | 44 -
.../flysystem/src/Plugin/ForcedRename.php | 44 -
.../flysystem/src/Plugin/GetWithMetadata.php | 51 -
.../league/flysystem/src/Plugin/ListFiles.php | 35 -
.../league/flysystem/src/Plugin/ListPaths.php | 36 -
.../league/flysystem/src/Plugin/ListWith.php | 60 -
.../flysystem/src/Plugin/PluggableTrait.php | 97 -
.../src/Plugin/PluginNotFoundException.php | 10 -
.../league/flysystem/src/PluginInterface.php | 20 -
vendor/league/flysystem/src/ReadInterface.php | 88 -
.../flysystem/src/RootViolationException.php | 10 -
vendor/league/flysystem/src/SafeStorage.php | 39 -
.../flysystem/src/UnreadableFileException.php | 18 -
vendor/league/flysystem/src/Util.php | 354 -
.../src/Util/ContentListingFormatter.php | 122 -
vendor/league/flysystem/src/Util/MimeType.php | 80 -
.../flysystem/src/Util/StreamHasher.php | 36 -
.../league/mime-type-detection/CHANGELOG.md | 31 -
vendor/league/mime-type-detection/LICENSE | 19 -
.../league/mime-type-detection/composer.json | 34 -
.../src/EmptyExtensionToMimeTypeMap.php | 13 -
.../src/ExtensionMimeTypeDetector.php | 42 -
.../src/ExtensionToMimeTypeMap.php | 10 -
.../src/FinfoMimeTypeDetector.php | 92 -
.../src/GeneratedExtensionToMimeTypeMap.php | 1227 ---
.../src/MimeTypeDetector.php | 19 -
.../src/OverridingExtensionToMimeTypeMap.php | 30 -
vendor/psr/container/.gitignore | 3 -
vendor/psr/container/LICENSE | 21 -
vendor/psr/container/README.md | 13 -
vendor/psr/container/composer.json | 27 -
.../src/ContainerExceptionInterface.php | 12 -
.../psr/container/src/ContainerInterface.php | 36 -
.../src/NotFoundExceptionInterface.php | 10 -
vendor/symfony/console/Application.php | 1301 ---
.../symfony/console/Attribute/AsCommand.php | 39 -
vendor/symfony/console/CHANGELOG.md | 217 -
.../console/CI/GithubActionReporter.php | 99 -
vendor/symfony/console/Color.php | 180 -
vendor/symfony/console/Command/Command.php | 710 --
.../console/Command/CompleteCommand.php | 205 -
.../console/Command/DumpCompletionCommand.php | 145 -
.../symfony/console/Command/HelpCommand.php | 101 -
.../symfony/console/Command/LazyCommand.php | 218 -
.../symfony/console/Command/ListCommand.php | 95 -
.../symfony/console/Command/LockableTrait.php | 69 -
.../Command/SignalableCommandInterface.php | 30 -
.../CommandLoader/CommandLoaderInterface.php | 42 -
.../CommandLoader/ContainerCommandLoader.php | 63 -
.../CommandLoader/FactoryCommandLoader.php | 62 -
.../console/Completion/CompletionInput.php | 249 -
.../Completion/CompletionSuggestions.php | 99 -
.../Output/BashCompletionOutput.php | 33 -
.../Output/CompletionOutputInterface.php | 25 -
.../symfony/console/Completion/Suggestion.php | 37 -
vendor/symfony/console/ConsoleEvents.php | 72 -
vendor/symfony/console/Cursor.php | 207 -
.../AddConsoleCommandPass.php | 148 -
.../Descriptor/ApplicationDescription.php | 143 -
.../symfony/console/Descriptor/Descriptor.php | 94 -
.../Descriptor/DescriptorInterface.php | 24 -
.../console/Descriptor/JsonDescriptor.php | 181 -
.../console/Descriptor/MarkdownDescriptor.php | 206 -
.../console/Descriptor/TextDescriptor.php | 341 -
.../console/Descriptor/XmlDescriptor.php | 247 -
.../console/Event/ConsoleCommandEvent.php | 51 -
.../console/Event/ConsoleErrorEvent.php | 58 -
vendor/symfony/console/Event/ConsoleEvent.php | 67 -
.../console/Event/ConsoleSignalEvent.php | 35 -
.../console/Event/ConsoleTerminateEvent.php | 43 -
.../console/EventListener/ErrorListener.php | 95 -
.../Exception/CommandNotFoundException.php | 43 -
.../console/Exception/ExceptionInterface.php | 21 -
.../Exception/InvalidArgumentException.php | 19 -
.../Exception/InvalidOptionException.php | 21 -
.../console/Exception/LogicException.php | 19 -
.../Exception/MissingInputException.php | 21 -
.../Exception/NamespaceNotFoundException.php | 21 -
.../console/Exception/RuntimeException.php | 19 -
.../console/Formatter/NullOutputFormatter.php | 69 -
.../Formatter/NullOutputFormatterStyle.php | 66 -
.../console/Formatter/OutputFormatter.php | 285 -
.../Formatter/OutputFormatterInterface.php | 60 -
.../Formatter/OutputFormatterStyle.php | 109 -
.../OutputFormatterStyleInterface.php | 52 -
.../Formatter/OutputFormatterStyleStack.php | 110 -
.../WrappableOutputFormatterInterface.php | 25 -
.../console/Helper/DebugFormatterHelper.php | 107 -
.../console/Helper/DescriptorHelper.php | 92 -
vendor/symfony/console/Helper/Dumper.php | 64 -
.../console/Helper/FormatterHelper.php | 92 -
vendor/symfony/console/Helper/Helper.php | 180 -
.../console/Helper/HelperInterface.php | 39 -
vendor/symfony/console/Helper/HelperSet.php | 108 -
.../console/Helper/InputAwareHelper.php | 33 -
.../symfony/console/Helper/ProcessHelper.php | 144 -
vendor/symfony/console/Helper/ProgressBar.php | 609 --
.../console/Helper/ProgressIndicator.php | 249 -
.../symfony/console/Helper/QuestionHelper.php | 625 --
.../console/Helper/SymfonyQuestionHelper.php | 109 -
vendor/symfony/console/Helper/Table.php | 915 --
vendor/symfony/console/Helper/TableCell.php | 78 -
.../symfony/console/Helper/TableCellStyle.php | 89 -
vendor/symfony/console/Helper/TableRows.php | 30 -
.../symfony/console/Helper/TableSeparator.php | 25 -
vendor/symfony/console/Helper/TableStyle.php | 376 -
vendor/symfony/console/Input/ArgvInput.php | 378 -
vendor/symfony/console/Input/ArrayInput.php | 210 -
vendor/symfony/console/Input/Input.php | 213 -
.../symfony/console/Input/InputArgument.php | 129 -
.../console/Input/InputAwareInterface.php | 26 -
.../symfony/console/Input/InputDefinition.php | 424 -
.../symfony/console/Input/InputInterface.php | 151 -
vendor/symfony/console/Input/InputOption.php | 231 -
.../Input/StreamableInputInterface.php | 37 -
vendor/symfony/console/Input/StringInput.php | 84 -
vendor/symfony/console/LICENSE | 19 -
.../symfony/console/Logger/ConsoleLogger.php | 126 -
.../symfony/console/Output/BufferedOutput.php | 45 -
.../symfony/console/Output/ConsoleOutput.php | 172 -
.../console/Output/ConsoleOutputInterface.php | 32 -
.../console/Output/ConsoleSectionOutput.php | 143 -
vendor/symfony/console/Output/NullOutput.php | 128 -
vendor/symfony/console/Output/Output.php | 174 -
.../console/Output/OutputInterface.php | 110 -
.../symfony/console/Output/StreamOutput.php | 115 -
.../console/Output/TrimmedBufferOutput.php | 63 -
.../console/Question/ChoiceQuestion.php | 183 -
.../console/Question/ConfirmationQuestion.php | 57 -
vendor/symfony/console/Question/Question.php | 299 -
vendor/symfony/console/README.md | 36 -
.../console/Resources/bin/hiddeninput.exe | Bin 9216 -> 0 bytes
.../symfony/console/Resources/completion.bash | 84 -
.../console/SignalRegistry/SignalRegistry.php | 65 -
.../console/SingleCommandApplication.php | 72 -
vendor/symfony/console/Style/OutputStyle.php | 153 -
.../symfony/console/Style/StyleInterface.php | 132 -
vendor/symfony/console/Style/SymfonyStyle.php | 518 -
vendor/symfony/console/Terminal.php | 177 -
.../console/Tester/ApplicationTester.php | 85 -
.../Tester/CommandCompletionTester.php | 56 -
.../symfony/console/Tester/CommandTester.php | 76 -
.../Tester/Constraint/CommandIsSuccessful.php | 55 -
vendor/symfony/console/Tester/TesterTrait.php | 197 -
vendor/symfony/console/composer.json | 60 -
.../deprecation-contracts/CHANGELOG.md | 5 -
.../symfony/deprecation-contracts/README.md | 26 -
.../deprecation-contracts/composer.json | 35 -
.../deprecation-contracts/function.php | 27 -
vendor/symfony/finder/CHANGELOG.md | 87 -
.../symfony/finder/Comparator/Comparator.php | 117 -
.../finder/Comparator/DateComparator.php | 50 -
.../finder/Comparator/NumberComparator.php | 78 -
.../Exception/AccessDeniedException.php | 19 -
.../Exception/DirectoryNotFoundException.php | 19 -
vendor/symfony/finder/Finder.php | 806 --
vendor/symfony/finder/Gitignore.php | 93 -
vendor/symfony/finder/Glob.php | 111 -
.../finder/Iterator/CustomFilterIterator.php | 64 -
.../Iterator/DateRangeFilterIterator.php | 61 -
.../Iterator/DepthRangeFilterIterator.php | 51 -
.../ExcludeDirectoryFilterIterator.php | 97 -
.../Iterator/FileTypeFilterIterator.php | 56 -
.../Iterator/FilecontentFilterIterator.php | 61 -
.../Iterator/FilenameFilterIterator.php | 50 -
.../symfony/finder/Iterator/LazyIterator.php | 32 -
.../Iterator/MultiplePcreFilterIterator.php | 117 -
.../finder/Iterator/PathFilterIterator.php | 59 -
.../Iterator/RecursiveDirectoryIterator.php | 168 -
.../Iterator/SizeRangeFilterIterator.php | 60 -
.../finder/Iterator/SortableIterator.php | 104 -
.../Iterator/VcsIgnoredFilterIterator.php | 151 -
vendor/symfony/finder/LICENSE | 19 -
vendor/symfony/finder/README.md | 14 -
vendor/symfony/finder/SplFileInfo.php | 88 -
vendor/symfony/finder/composer.json | 30 -
vendor/symfony/polyfill-ctype/Ctype.php | 232 -
vendor/symfony/polyfill-ctype/LICENSE | 19 -
vendor/symfony/polyfill-ctype/README.md | 12 -
vendor/symfony/polyfill-ctype/bootstrap.php | 50 -
vendor/symfony/polyfill-ctype/bootstrap80.php | 46 -
vendor/symfony/polyfill-ctype/composer.json | 41 -
.../polyfill-intl-grapheme/Grapheme.php | 247 -
vendor/symfony/polyfill-intl-grapheme/LICENSE | 19 -
.../symfony/polyfill-intl-grapheme/README.md | 31 -
.../polyfill-intl-grapheme/bootstrap.php | 58 -
.../polyfill-intl-grapheme/bootstrap80.php | 50 -
.../polyfill-intl-grapheme/composer.json | 38 -
.../symfony/polyfill-intl-normalizer/LICENSE | 19 -
.../polyfill-intl-normalizer/Normalizer.php | 310 -
.../polyfill-intl-normalizer/README.md | 14 -
.../Resources/stubs/Normalizer.php | 17 -
.../unidata/canonicalComposition.php | 945 --
.../unidata/canonicalDecomposition.php | 2065 ----
.../Resources/unidata/combiningClass.php | 876 --
.../unidata/compatibilityDecomposition.php | 3695 -------
.../polyfill-intl-normalizer/bootstrap.php | 23 -
.../polyfill-intl-normalizer/bootstrap80.php | 19 -
.../polyfill-intl-normalizer/composer.json | 39 -
vendor/symfony/polyfill-mbstring/LICENSE | 19 -
vendor/symfony/polyfill-mbstring/Mbstring.php | 874 --
vendor/symfony/polyfill-mbstring/README.md | 13 -
.../Resources/unidata/lowerCase.php | 1397 ---
.../Resources/unidata/titleCaseRegexp.php | 5 -
.../Resources/unidata/upperCase.php | 1489 ---
.../symfony/polyfill-mbstring/bootstrap.php | 147 -
.../symfony/polyfill-mbstring/bootstrap80.php | 143 -
.../symfony/polyfill-mbstring/composer.json | 41 -
vendor/symfony/polyfill-php73/LICENSE | 19 -
vendor/symfony/polyfill-php73/Php73.php | 43 -
vendor/symfony/polyfill-php73/README.md | 18 -
.../Resources/stubs/JsonException.php | 16 -
vendor/symfony/polyfill-php73/bootstrap.php | 31 -
vendor/symfony/polyfill-php80/LICENSE | 19 -
vendor/symfony/polyfill-php80/Php80.php | 115 -
vendor/symfony/polyfill-php80/PhpToken.php | 103 -
vendor/symfony/polyfill-php80/README.md | 25 -
.../Resources/stubs/Attribute.php | 31 -
.../Resources/stubs/Stringable.php | 20 -
.../Resources/stubs/UnhandledMatchError.php | 16 -
.../Resources/stubs/ValueError.php | 16 -
vendor/symfony/polyfill-php80/bootstrap.php | 42 -
vendor/symfony/polyfill-php80/composer.json | 40 -
.../service-contracts/Attribute/Required.php | 25 -
.../Attribute/SubscribedService.php | 47 -
vendor/symfony/service-contracts/CHANGELOG.md | 5 -
vendor/symfony/service-contracts/LICENSE | 19 -
vendor/symfony/service-contracts/README.md | 9 -
.../service-contracts/ResetInterface.php | 33 -
.../service-contracts/ServiceLocatorTrait.php | 115 -
.../ServiceProviderInterface.php | 45 -
.../ServiceSubscriberInterface.php | 62 -
.../ServiceSubscriberTrait.php | 78 -
.../Test/ServiceLocatorTest.php | 23 -
.../Test/ServiceLocatorTestCase.php | 92 -
.../symfony/service-contracts/composer.json | 41 -
vendor/symfony/string/AbstractString.php | 708 --
.../symfony/string/AbstractUnicodeString.php | 590 --
vendor/symfony/string/ByteString.php | 485 -
vendor/symfony/string/CHANGELOG.md | 40 -
vendor/symfony/string/CodePointString.php | 260 -
.../string/Exception/ExceptionInterface.php | 16 -
.../Exception/InvalidArgumentException.php | 16 -
.../string/Exception/RuntimeException.php | 16 -
.../string/Inflector/EnglishInflector.php | 511 -
.../string/Inflector/FrenchInflector.php | 151 -
.../string/Inflector/InflectorInterface.php | 33 -
vendor/symfony/string/LICENSE | 19 -
vendor/symfony/string/LazyString.php | 145 -
vendor/symfony/string/README.md | 14 -
.../Resources/data/wcswidth_table_wide.php | 1143 ---
.../Resources/data/wcswidth_table_zero.php | 1415 ---
vendor/symfony/string/Resources/functions.php | 38 -
.../symfony/string/Slugger/AsciiSlugger.php | 210 -
.../string/Slugger/SluggerInterface.php | 27 -
vendor/symfony/string/UnicodeString.php | 358 -
vendor/symfony/string/composer.json | 43 -
.../lib/classes/class-admin.php | 2 +-
...e-checker.php => class-update-checker.php} | 58 +-
vendor/udx/lib-ud-api-client/readme.md | 18 +-
.../lib/classes/class-bootstrap-plugin.php | 2 +
.../lib/classes/class-bootstrap-theme.php | 2 +
.../lib/classes/class-bootstrap.php | 40 +
.../lib/classes/class-errors.php | 4 +
.../lib/classes/class-tgm-bulk-installer.php | 554 ++
.../lib/classes/class-tgm-list-table.php | 681 ++
.../classes/class-tgm-plugin-activation.php | 1033 ++
vendor/wpmetabox/meta-box/.distignore | 24 +
vendor/wpmetabox/meta-box/README.md | 167 -
vendor/wpmetabox/meta-box/composer.json | 25 -
.../wpmetabox/meta-box/css/button-group.css | 88 +-
vendor/wpmetabox/meta-box/css/date.css | 211 +-
vendor/wpmetabox/meta-box/css/file.css | 1 -
vendor/wpmetabox/meta-box/css/input-list.css | 19 +-
.../wpmetabox/meta-box/css/jqueryui/core.css | 6 +-
.../meta-box/css/jqueryui/datepicker.css | 4 +-
.../meta-box/css/jqueryui/slider.css | 6 +-
.../wpmetabox/meta-box/css/jqueryui/theme.css | 45 +-
vendor/wpmetabox/meta-box/css/media-modal.css | 18 -
vendor/wpmetabox/meta-box/css/media.css | 1 +
vendor/wpmetabox/meta-box/css/modal.css | 70 +
.../wpmetabox/meta-box/css/osm-frontend.css | 4 +
vendor/wpmetabox/meta-box/css/select-tree.css | 4 +-
vendor/wpmetabox/meta-box/css/style.css | 4 +-
vendor/wpmetabox/meta-box/css/switch.css | 59 +-
vendor/wpmetabox/meta-box/css/taxonomy.css | 18 -
vendor/wpmetabox/meta-box/gulpfile.js | 27 -
vendor/wpmetabox/meta-box/inc/about/about.php | 98 +-
.../meta-box/inc/about/css/about.css | 40 +-
.../meta-box/inc/about/dashboard.php | 40 +-
.../inc/about/sections/extensions.php | 8 +-
.../about/sections/getting-started-pro.php | 12 +
.../inc/about/sections/getting-started.php | 8 +-
.../meta-box/inc/about/sections/products.php | 20 +-
.../meta-box/inc/about/sections/review.php | 11 +
.../meta-box/inc/about/sections/support.php | 18 +-
.../meta-box/inc/about/sections/tabs.php | 8 +-
.../meta-box/inc/about/sections/upgrade.php | 8 +-
.../meta-box/inc/about/sections/welcome.php | 10 +-
vendor/wpmetabox/meta-box/inc/autoloader.php | 48 +-
vendor/wpmetabox/meta-box/inc/clone.php | 47 +-
vendor/wpmetabox/meta-box/inc/core.php | 76 +-
.../wpmetabox/meta-box/inc/field-registry.php | 26 +-
vendor/wpmetabox/meta-box/inc/field.php | 260 +-
.../meta-box/inc/fields/autocomplete.php | 33 +-
.../meta-box/inc/fields/background.php | 186 +-
.../meta-box/inc/fields/button-group.php | 31 +-
.../wpmetabox/meta-box/inc/fields/button.php | 26 +-
.../meta-box/inc/fields/checkbox-list.php | 8 +-
.../meta-box/inc/fields/checkbox.php | 16 +-
.../wpmetabox/meta-box/inc/fields/choice.php | 34 +-
.../wpmetabox/meta-box/inc/fields/color.php | 52 +-
.../meta-box/inc/fields/custom-html.php | 10 +-
vendor/wpmetabox/meta-box/inc/fields/date.php | 17 +-
.../meta-box/inc/fields/datetime.php | 185 +-
.../wpmetabox/meta-box/inc/fields/divider.php | 33 +-
.../meta-box/inc/fields/fieldset-text.php | 33 +-
.../meta-box/inc/fields/file-input.php | 24 +-
.../meta-box/inc/fields/file-upload.php | 35 +-
vendor/wpmetabox/meta-box/inc/fields/file.php | 120 +-
.../wpmetabox/meta-box/inc/fields/heading.php | 33 +-
.../meta-box/inc/fields/image-advanced.php | 41 +-
.../meta-box/inc/fields/image-select.php | 25 +-
.../meta-box/inc/fields/image-upload.php | 13 +-
.../wpmetabox/meta-box/inc/fields/image.php | 53 +-
.../meta-box/inc/fields/input-list.php | 32 +-
.../wpmetabox/meta-box/inc/fields/input.php | 84 +-
.../meta-box/inc/fields/key-value.php | 40 +-
vendor/wpmetabox/meta-box/inc/fields/map.php | 159 +-
.../wpmetabox/meta-box/inc/fields/media.php | 148 +-
.../meta-box/inc/fields/multiple-values.php | 8 +-
.../wpmetabox/meta-box/inc/fields/number.php | 35 +-
.../meta-box/inc/fields/object-choice.php | 95 +-
.../wpmetabox/meta-box/inc/fields/oembed.php | 50 +-
vendor/wpmetabox/meta-box/inc/fields/osm.php | 108 +-
.../meta-box/inc/fields/password.php | 8 +-
vendor/wpmetabox/meta-box/inc/fields/post.php | 129 +-
.../wpmetabox/meta-box/inc/fields/radio.php | 14 +-
.../wpmetabox/meta-box/inc/fields/range.php | 24 +-
.../meta-box/inc/fields/select-advanced.php | 59 +-
.../meta-box/inc/fields/select-tree.php | 15 +-
.../wpmetabox/meta-box/inc/fields/select.php | 33 +-
.../wpmetabox/meta-box/inc/fields/sidebar.php | 38 +-
.../meta-box/inc/fields/single-image.php | 23 +-
.../wpmetabox/meta-box/inc/fields/slider.php | 47 +-
.../wpmetabox/meta-box/inc/fields/switch.php | 26 +-
.../meta-box/inc/fields/taxonomy-advanced.php | 44 +-
.../meta-box/inc/fields/taxonomy.php | 208 +-
.../meta-box/inc/fields/text-list.php | 21 +-
.../meta-box/inc/fields/textarea.php | 54 +-
vendor/wpmetabox/meta-box/inc/fields/time.php | 11 +-
vendor/wpmetabox/meta-box/inc/fields/user.php | 109 +-
.../wpmetabox/meta-box/inc/fields/video.php | 66 +-
.../wpmetabox/meta-box/inc/fields/wysiwyg.php | 39 +-
vendor/wpmetabox/meta-box/inc/functions.php | 64 +-
.../wpmetabox/meta-box/inc/helpers/array.php | 91 +-
.../wpmetabox/meta-box/inc/helpers/field.php | 44 +-
.../wpmetabox/meta-box/inc/helpers/string.php | 18 +-
.../wpmetabox/meta-box/inc/helpers/value.php | 2 +-
.../meta-box/inc/interfaces/storage.php | 11 +-
vendor/wpmetabox/meta-box/inc/loader.php | 51 +-
vendor/wpmetabox/meta-box/inc/media-modal.php | 83 +-
.../meta-box/inc/meta-box-registry.php | 39 +-
vendor/wpmetabox/meta-box/inc/meta-box.php | 192 +-
vendor/wpmetabox/meta-box/inc/request.php | 70 +-
vendor/wpmetabox/meta-box/inc/sanitizer.php | 175 +-
vendor/wpmetabox/meta-box/inc/shortcode.php | 8 +-
.../meta-box/inc/storage-registry.php | 14 +-
.../wpmetabox/meta-box/inc/storages/base.php | 9 +-
.../wpmetabox/meta-box/inc/storages/post.php | 2 +
.../meta-box/inc/templates/audio.php | 2 +
.../meta-box/inc/templates/image-advanced.php | 2 +
.../meta-box/inc/templates/media.php | 4 +-
.../meta-box/inc/templates/upload.php | 2 +
.../meta-box/inc/templates/video.php | 2 +
.../wpmetabox/meta-box/inc/update/checker.php | 220 -
vendor/wpmetabox/meta-box/inc/validation.php | 76 +-
.../wpmetabox/meta-box/inc/walkers/base.php | 12 +-
.../meta-box/inc/walkers/input-list.php | 32 +-
.../meta-box/inc/walkers/select-tree.php | 14 +-
.../wpmetabox/meta-box/inc/walkers/select.php | 10 +-
vendor/wpmetabox/meta-box/inc/wpml.php | 24 +-
vendor/wpmetabox/meta-box/js/button-group.js | 6 +-
vendor/wpmetabox/meta-box/js/clone.js | 13 +-
vendor/wpmetabox/meta-box/js/color.js | 22 +-
vendor/wpmetabox/meta-box/js/date.js | 9 +-
vendor/wpmetabox/meta-box/js/datetime.js | 9 +-
vendor/wpmetabox/meta-box/js/file.js | 20 +-
vendor/wpmetabox/meta-box/js/input-list.js | 2 +-
vendor/wpmetabox/meta-box/js/map.js | 110 +-
vendor/wpmetabox/meta-box/js/media.js | 2 +-
vendor/wpmetabox/meta-box/js/modal.js | 132 +
vendor/wpmetabox/meta-box/js/oembed.js | 1 +
vendor/wpmetabox/meta-box/js/osm.js | 104 +-
vendor/wpmetabox/meta-box/js/post.js | 48 +
vendor/wpmetabox/meta-box/js/script.js | 5 +-
.../wpmetabox/meta-box/js/select-advanced.js | 46 +-
vendor/wpmetabox/meta-box/js/select.js | 3 +-
vendor/wpmetabox/meta-box/js/taxonomy.js | 40 +-
vendor/wpmetabox/meta-box/js/user.js | 35 +
.../wpmetabox/meta-box/js/validation.min.js | 18 -
.../js/validation/additional-methods.js | 1512 ---
.../meta-box/js/validation/jquery.validate.js | 1650 ----
.../meta-box/js/validation/validation.js | 131 -
vendor/wpmetabox/meta-box/js/wysiwyg.js | 6 +-
vendor/wpmetabox/meta-box/meta-box.php | 4 +-
vendor/wpmetabox/meta-box/package.json | 11 -
vendor/wpmetabox/meta-box/readme.txt | 241 +-
.../wpmetabox/meta-box/src/Block/Register.php | 17 +
.../meta-box/src/Bricks/Register.php | 13 +
.../meta-box/src/Elementor/Register.php | 18 +
.../meta-box/src/Oxygen/Register.php | 16 +
vendor/wpmetabox/meta-box/src/Support/Arr.php | 147 +
.../wpmetabox/meta-box/src/Support/Data.php | 366 +
.../meta-box/src/Updater/Checker.php | 182 +
.../Updater/Notification.php} | 95 +-
.../option.php => src/Updater/Option.php} | 41 +-
.../settings.php => src/Updater/Settings.php} | 93 +-
.../wpmetabox/meta-box/tests/001-helper.php | 191 -
.../meta-box/tests/002-wysiwyg-clone.php | 103 -
vendor/wpmetabox/meta-box/tests/003-wpml.php | 44 -
.../wpmetabox/meta-box/tests/004-same-ids.php | 49 -
.../meta-box/tests/005-rwmb-the-value.php | 271 -
.../tests/006-oembed-clone-remove-preview.php | 36 -
.../meta-box/tests/007-large-embed.php | 35 -
.../meta-box/tests/008-input-types.php | 123 -
.../wpmetabox/meta-box/tests/009-datetime.php | 53 -
.../meta-box/tests/010-clone-style.php | 239 -
.../wpmetabox/meta-box/tests/011-choices.php | 96 -
.../tests/012-multiple-localize-scripts.php | 32 -
.../meta-box/tests/013-clone-default.php | 112 -
.../tests/014-clone-taxonomy-advanced.php | 86 -
.../meta-box/tests/015-save-field-value.php | 100 -
.../tests/016-file-upload-custom-folder.php | 60 -
.../meta-box/tests/017-shortcode.php | 84 -
.../tests/018-label-description-required.php | 26 -
wp-stateless-media.php | 3 +
934 files changed, 21193 insertions(+), 80778 deletions(-)
create mode 100644 lib/Google/CODE_OF_CONDUCT.md
create mode 100644 lib/Google/UPGRADING.md
create mode 100644 lib/Google/phpstan.neon.dist
mode change 120000 => 100755 lib/Google/vendor/bin/google-cloud-batch
create mode 100644 lib/Google/vendor/composer/InstalledVersions.php
create mode 100644 lib/Google/vendor/composer/installed.php
create mode 100644 lib/Google/vendor/composer/platform_check.php
create mode 100644 lib/Google/vendor/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php
create mode 100644 lib/Google/vendor/google/apiclient-services/LICENSE
create mode 100644 lib/Google/vendor/google/apiclient-services/README.md
create mode 100644 lib/Google/vendor/google/apiclient-services/SECURITY.md
create mode 100644 lib/Google/vendor/google/apiclient-services/autoload.php
create mode 100644 lib/Google/vendor/google/apiclient-services/composer.json
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage.php (79%)
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/AnywhereCache.php
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/AnywhereCaches.php
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Bucket.php (92%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketAccessControl.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketAccessControlProjectTeam.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketAccessControls.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketAutoclass.php (64%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketBilling.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketCors.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketCustomPlacementConfig.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketEncryption.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketIamConfiguration.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketIamConfigurationBucketPolicyOnly.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketIamConfigurationUniformBucketLevelAccess.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketLifecycle.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketLifecycleRule.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketLifecycleRuleAction.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketLifecycleRuleCondition.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketLogging.php (100%)
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/BucketObjectRetention.php
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketOwner.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketRetentionPolicy.php (100%)
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/BucketSoftDeletePolicy.php
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketVersioning.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/BucketWebsite.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Buckets.php (100%)
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/BulkRestoreObjectsRequest.php
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Channel.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/ComposeRequest.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/ComposeRequestSourceObjects.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/ComposeRequestSourceObjectsObjectPreconditions.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Expr.php (100%)
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/GoogleLongrunningListOperationsResponse.php
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/GoogleLongrunningOperation.php
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/GoogleRpcStatus.php
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/HmacKey.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/HmacKeyMetadata.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/HmacKeysMetadata.php (100%)
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/ManagedFolder.php
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/ManagedFolders.php
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Notification.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Notifications.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/ObjectAccessControl.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/ObjectAccessControlProjectTeam.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/ObjectAccessControls.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Objects.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Policy.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/PolicyBindings.php (100%)
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/Resource/AnywhereCache.php
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Resource/BucketAccessControls.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Resource/Buckets.php (98%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Resource/Channels.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Resource/DefaultObjectAccessControls.php (99%)
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/Resource/ManagedFolders.php
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Resource/Notifications.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Resource/ObjectAccessControls.php (89%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Resource/Objects.php (83%)
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Operations.php
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Resource/Projects.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Resource/ProjectsHmacKeys.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/Resource/ProjectsServiceAccount.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/RewriteResponse.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/ServiceAccount.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/StorageObject.php (91%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/StorageObjectCustomerEncryption.php (100%)
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/StorageObjectOwner.php (100%)
create mode 100644 lib/Google/vendor/google/apiclient-services/src/Storage/StorageObjectRetention.php
rename lib/Google/{src/Service => vendor/google/apiclient-services/src}/Storage/TestIamPermissionsResponse.php (100%)
create mode 100644 lib/Google/vendor/google/auth/src/CredentialSource/AwsNativeSource.php
create mode 100644 lib/Google/vendor/google/auth/src/CredentialSource/FileSource.php
create mode 100644 lib/Google/vendor/google/auth/src/CredentialSource/UrlSource.php
create mode 100644 lib/Google/vendor/google/auth/src/Credentials/ExternalAccountCredentials.php
create mode 100644 lib/Google/vendor/google/auth/src/ExternalAccountCredentialSourceInterface.php
create mode 100644 lib/Google/vendor/google/auth/src/UpdateMetadataTrait.php
delete mode 100644 lib/Google/vendor/google/crc32/.github/workflows/test.yml
delete mode 100644 lib/Google/vendor/google/crc32/.gitignore
delete mode 100644 lib/Google/vendor/google/crc32/CONTRIBUTING.md
delete mode 100644 lib/Google/vendor/google/crc32/LICENSE
delete mode 100644 lib/Google/vendor/google/crc32/Makefile
delete mode 100644 lib/Google/vendor/google/crc32/README.md
delete mode 100644 lib/Google/vendor/google/crc32/composer.json
delete mode 100644 lib/Google/vendor/google/crc32/crc32_benchmark.php
delete mode 100644 lib/Google/vendor/google/crc32/ext/.gitignore
delete mode 100644 lib/Google/vendor/google/crc32/ext/config.m4
delete mode 100644 lib/Google/vendor/google/crc32/ext/hash_crc32c.c
delete mode 100755 lib/Google/vendor/google/crc32/ext/install_crc32c.sh
delete mode 100644 lib/Google/vendor/google/crc32/ext/php_crc32c.c
delete mode 100644 lib/Google/vendor/google/crc32/ext/php_crc32c.h
delete mode 100644 lib/Google/vendor/google/crc32/ext/tests/001_loaded.phpt
delete mode 100644 lib/Google/vendor/google/crc32/ext/tests/002_basic.phpt
delete mode 100644 lib/Google/vendor/google/crc32/ext/tests/003_extend.phpt
delete mode 100644 lib/Google/vendor/google/crc32/ext/tests/004_error.phpt
delete mode 100644 lib/Google/vendor/google/crc32/ext/tests/005_hash.phpt
delete mode 100644 lib/Google/vendor/google/crc32/ext/tests/006_serialize.phpt
delete mode 100644 lib/Google/vendor/google/crc32/src/Builtin.php
delete mode 100644 lib/Google/vendor/google/crc32/src/CRC32.php
delete mode 100644 lib/Google/vendor/google/crc32/src/CRCInterface.php
delete mode 100644 lib/Google/vendor/google/crc32/src/CRCTrait.php
delete mode 100644 lib/Google/vendor/google/crc32/src/Google.php
delete mode 100644 lib/Google/vendor/google/crc32/src/PHP.php
delete mode 100644 lib/Google/vendor/google/crc32/src/PHPSlicedBy4.php
delete mode 100644 lib/Google/vendor/google/crc32/src/Table.php
delete mode 100644 lib/Google/vendor/google/crc32/tests/BuiltinTest.php
delete mode 100644 lib/Google/vendor/google/crc32/tests/CRC32Test.php
delete mode 100644 lib/Google/vendor/google/crc32/tests/DataIterator.php
delete mode 100644 lib/Google/vendor/google/crc32/tests/GoogleTest.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/.editorconfig
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/.gitattributes
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/.github/.editorconfig
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/.github/FUNDING.yml
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/.github/stale.yml
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/.github/workflows/checks.yml
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/.github/workflows/ci.yml
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/.github/workflows/static.yml
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/.gitignore
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/.php-cs-fixer.dist.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/.travis.yml
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/Makefile
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/phpstan-baseline.neon
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/phpstan.neon.dist
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/phpunit.xml.dist
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/psalm.xml
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/src/functions.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/src/functions_include.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/AggregateExceptionTest.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/CoroutineTest.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/CreateTest.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/EachPromiseTest.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/EachTest.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/FulfilledPromiseTest.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/IsTest.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/NotPromiseInstance.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/PromiseTest.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/PropertyHelper.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/RejectionExceptionTest.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/TaskQueueTest.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/Thennable.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/Thing1.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/Thing2.php
delete mode 100644 lib/Google/vendor/guzzlehttp/promises/tests/UtilsTest.php
rename lib/Google/vendor/monolog/monolog/src/Monolog/Handler/{ElasticSearchHandler.php => ElasticsearchHandler.php} (100%)
rename lib/Google/vendor/ramsey/collection/src/Exception/{CollectionException.php => InvalidSortOrderException.php} (70%)
rename lib/Google/vendor/ramsey/collection/src/Exception/{InvalidPropertyOrMethod.php => ValueExtractionException.php} (62%)
delete mode 100644 lib/Google/vendor/ramsey/collection/src/Sort.php
create mode 100644 lib/Google/vendor/symfony/deprecation-contracts/.gitignore
rename {vendor/symfony/deprecation-contracts => lib/Google/vendor/symfony/polyfill-php81}/LICENSE (95%)
create mode 100644 lib/Google/vendor/symfony/polyfill-php81/Php81.php
create mode 100644 lib/Google/vendor/symfony/polyfill-php81/README.md
create mode 100644 lib/Google/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php
rename vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php => lib/Google/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php (59%)
create mode 100644 lib/Google/vendor/symfony/polyfill-php81/bootstrap.php
rename {vendor/symfony/polyfill-php73 => lib/Google/vendor/symfony/polyfill-php81}/composer.json (80%)
rename lib/classes/{compatibility/dynamic-image-support.php => class-dynamic-image-support.php} (57%)
create mode 100644 lib/classes/class-google-app-engine.php
delete mode 100644 lib/classes/compatibility/google-app-engine.php
delete mode 100644 lib/classes/compatibility/imagify.php
delete mode 100644 lib/classes/compatibility/js/shortpixel.js
delete mode 100644 lib/classes/compatibility/shortpixel.php
delete mode 100644 lib/classes/compatibility/siteorigin-css.php
delete mode 100644 lib/classes/compatibility/siteorigin-widget-bundle.php
delete mode 100644 lib/classes/compatibility/vidorev.php
delete mode 100644 lib/classes/compatibility/woo-extra-product-options.php
delete mode 100644 lib/classes/compatibility/woocommerce.php
delete mode 100644 lib/classes/compatibility/wp-retina-2x.php
delete mode 100644 lib/classes/compatibility/wp-smush.php
delete mode 100644 lib/classes/compatibility/wpbakery-page-builder.php
delete mode 100644 lib/classes/compatibility/wpforms.php
delete mode 100755 vendor/bin/mozart
delete mode 100644 vendor/coenjacobs/mozart/.github/FUNDING.yml
delete mode 100644 vendor/coenjacobs/mozart/.github/workflows/analysis.yml
delete mode 100644 vendor/coenjacobs/mozart/.github/workflows/docker-latest.yml
delete mode 100644 vendor/coenjacobs/mozart/.github/workflows/main.yml
delete mode 100644 vendor/coenjacobs/mozart/.github/workflows/release.yml
delete mode 100644 vendor/coenjacobs/mozart/.gitignore
delete mode 100644 vendor/coenjacobs/mozart/Dockerfile
delete mode 100644 vendor/coenjacobs/mozart/LICENSE
delete mode 100644 vendor/coenjacobs/mozart/README.md
delete mode 100755 vendor/coenjacobs/mozart/bin/mozart
delete mode 100644 vendor/coenjacobs/mozart/composer.json
delete mode 100644 vendor/coenjacobs/mozart/phpcs.xml
delete mode 100644 vendor/coenjacobs/mozart/phpunit.xml
delete mode 100644 vendor/coenjacobs/mozart/psalm.xml
delete mode 100644 vendor/coenjacobs/mozart/src/Composer/Autoload/Autoloader.php
delete mode 100644 vendor/coenjacobs/mozart/src/Composer/Autoload/Classmap.php
delete mode 100644 vendor/coenjacobs/mozart/src/Composer/Autoload/NamespaceAutoloader.php
delete mode 100644 vendor/coenjacobs/mozart/src/Composer/Autoload/Psr0.php
delete mode 100644 vendor/coenjacobs/mozart/src/Composer/Autoload/Psr4.php
delete mode 100644 vendor/coenjacobs/mozart/src/Composer/Package.php
delete mode 100644 vendor/coenjacobs/mozart/src/Console/Application.php
delete mode 100644 vendor/coenjacobs/mozart/src/Console/Commands/Compose.php
delete mode 100644 vendor/coenjacobs/mozart/src/Mover.php
delete mode 100644 vendor/coenjacobs/mozart/src/Replace/BaseReplacer.php
delete mode 100644 vendor/coenjacobs/mozart/src/Replace/ClassmapReplacer.php
delete mode 100644 vendor/coenjacobs/mozart/src/Replace/NamespaceReplacer.php
delete mode 100644 vendor/coenjacobs/mozart/src/Replace/Replacer.php
delete mode 100644 vendor/coenjacobs/mozart/src/Replacer.php
delete mode 100644 vendor/coenjacobs/mozart/tests/Console/Commands/ComposeTest.php
delete mode 100644 vendor/coenjacobs/mozart/tests/MoverTest.php
delete mode 100644 vendor/coenjacobs/mozart/tests/issue89-composer.json
delete mode 100644 vendor/coenjacobs/mozart/tests/replacers/ClassMapReplacerTest.php
delete mode 100644 vendor/coenjacobs/mozart/tests/replacers/ClassmapReplacerIntegrationTest.php
delete mode 100644 vendor/coenjacobs/mozart/tests/replacers/NamespaceReplacerIntegrationTest.php
delete mode 100644 vendor/coenjacobs/mozart/tests/replacers/NamespaceReplacerTest.php
delete mode 100644 vendor/composer/autoload_files.php
delete mode 100644 vendor/deliciousbrains/wp-background-processing/.circleci/config.yml
delete mode 100644 vendor/deliciousbrains/wp-background-processing/.gitignore
delete mode 100644 vendor/deliciousbrains/wp-background-processing/.phpcs.xml
delete mode 100644 vendor/deliciousbrains/wp-background-processing/Makefile
delete mode 100644 vendor/deliciousbrains/wp-background-processing/README.md
delete mode 100755 vendor/deliciousbrains/wp-background-processing/bin/install-wp-tests.sh
delete mode 100644 vendor/deliciousbrains/wp-background-processing/classes/wp-async-request.php
delete mode 100644 vendor/deliciousbrains/wp-background-processing/classes/wp-background-process.php
delete mode 100644 vendor/deliciousbrains/wp-background-processing/composer.json
delete mode 100644 vendor/deliciousbrains/wp-background-processing/composer.lock
delete mode 100644 vendor/deliciousbrains/wp-background-processing/license.txt
delete mode 100644 vendor/deliciousbrains/wp-background-processing/phpunit.xml
delete mode 100644 vendor/deliciousbrains/wp-background-processing/tests/Test_Setup.php
delete mode 100644 vendor/deliciousbrains/wp-background-processing/tests/Test_WP_Background_Process.php
delete mode 100644 vendor/deliciousbrains/wp-background-processing/tests/bootstrap.php
delete mode 100644 vendor/deliciousbrains/wp-background-processing/wp-background-processing.php
create mode 100644 vendor/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php
delete mode 100644 vendor/league/flysystem/CODE_OF_CONDUCT.md
delete mode 100644 vendor/league/flysystem/LICENSE
delete mode 100644 vendor/league/flysystem/SECURITY.md
delete mode 100644 vendor/league/flysystem/composer.json
delete mode 100644 vendor/league/flysystem/deprecations.md
delete mode 100644 vendor/league/flysystem/src/Adapter/AbstractAdapter.php
delete mode 100644 vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php
delete mode 100644 vendor/league/flysystem/src/Adapter/CanOverwriteFiles.php
delete mode 100644 vendor/league/flysystem/src/Adapter/Ftp.php
delete mode 100644 vendor/league/flysystem/src/Adapter/Ftpd.php
delete mode 100644 vendor/league/flysystem/src/Adapter/Local.php
delete mode 100644 vendor/league/flysystem/src/Adapter/NullAdapter.php
delete mode 100644 vendor/league/flysystem/src/Adapter/Polyfill/NotSupportingVisibilityTrait.php
delete mode 100644 vendor/league/flysystem/src/Adapter/Polyfill/StreamedCopyTrait.php
delete mode 100644 vendor/league/flysystem/src/Adapter/Polyfill/StreamedReadingTrait.php
delete mode 100644 vendor/league/flysystem/src/Adapter/Polyfill/StreamedTrait.php
delete mode 100644 vendor/league/flysystem/src/Adapter/Polyfill/StreamedWritingTrait.php
delete mode 100644 vendor/league/flysystem/src/Adapter/SynologyFtp.php
delete mode 100644 vendor/league/flysystem/src/AdapterInterface.php
delete mode 100644 vendor/league/flysystem/src/Config.php
delete mode 100644 vendor/league/flysystem/src/ConfigAwareTrait.php
delete mode 100644 vendor/league/flysystem/src/ConnectionErrorException.php
delete mode 100644 vendor/league/flysystem/src/ConnectionRuntimeException.php
delete mode 100644 vendor/league/flysystem/src/CorruptedPathDetected.php
delete mode 100644 vendor/league/flysystem/src/Directory.php
delete mode 100644 vendor/league/flysystem/src/Exception.php
delete mode 100644 vendor/league/flysystem/src/File.php
delete mode 100644 vendor/league/flysystem/src/FileExistsException.php
delete mode 100644 vendor/league/flysystem/src/FileNotFoundException.php
delete mode 100644 vendor/league/flysystem/src/Filesystem.php
delete mode 100644 vendor/league/flysystem/src/FilesystemException.php
delete mode 100644 vendor/league/flysystem/src/FilesystemInterface.php
delete mode 100644 vendor/league/flysystem/src/FilesystemNotFoundException.php
delete mode 100644 vendor/league/flysystem/src/Handler.php
delete mode 100644 vendor/league/flysystem/src/InvalidRootException.php
delete mode 100644 vendor/league/flysystem/src/MountManager.php
delete mode 100644 vendor/league/flysystem/src/NotSupportedException.php
delete mode 100644 vendor/league/flysystem/src/Plugin/AbstractPlugin.php
delete mode 100644 vendor/league/flysystem/src/Plugin/EmptyDir.php
delete mode 100644 vendor/league/flysystem/src/Plugin/ForcedCopy.php
delete mode 100644 vendor/league/flysystem/src/Plugin/ForcedRename.php
delete mode 100644 vendor/league/flysystem/src/Plugin/GetWithMetadata.php
delete mode 100644 vendor/league/flysystem/src/Plugin/ListFiles.php
delete mode 100644 vendor/league/flysystem/src/Plugin/ListPaths.php
delete mode 100644 vendor/league/flysystem/src/Plugin/ListWith.php
delete mode 100644 vendor/league/flysystem/src/Plugin/PluggableTrait.php
delete mode 100644 vendor/league/flysystem/src/Plugin/PluginNotFoundException.php
delete mode 100644 vendor/league/flysystem/src/PluginInterface.php
delete mode 100644 vendor/league/flysystem/src/ReadInterface.php
delete mode 100644 vendor/league/flysystem/src/RootViolationException.php
delete mode 100644 vendor/league/flysystem/src/SafeStorage.php
delete mode 100644 vendor/league/flysystem/src/UnreadableFileException.php
delete mode 100644 vendor/league/flysystem/src/Util.php
delete mode 100644 vendor/league/flysystem/src/Util/ContentListingFormatter.php
delete mode 100644 vendor/league/flysystem/src/Util/MimeType.php
delete mode 100644 vendor/league/flysystem/src/Util/StreamHasher.php
delete mode 100644 vendor/league/mime-type-detection/CHANGELOG.md
delete mode 100644 vendor/league/mime-type-detection/LICENSE
delete mode 100644 vendor/league/mime-type-detection/composer.json
delete mode 100644 vendor/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php
delete mode 100644 vendor/league/mime-type-detection/src/ExtensionMimeTypeDetector.php
delete mode 100644 vendor/league/mime-type-detection/src/ExtensionToMimeTypeMap.php
delete mode 100644 vendor/league/mime-type-detection/src/FinfoMimeTypeDetector.php
delete mode 100644 vendor/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php
delete mode 100644 vendor/league/mime-type-detection/src/MimeTypeDetector.php
delete mode 100644 vendor/league/mime-type-detection/src/OverridingExtensionToMimeTypeMap.php
delete mode 100644 vendor/psr/container/.gitignore
delete mode 100644 vendor/psr/container/LICENSE
delete mode 100644 vendor/psr/container/README.md
delete mode 100644 vendor/psr/container/composer.json
delete mode 100644 vendor/psr/container/src/ContainerExceptionInterface.php
delete mode 100644 vendor/psr/container/src/ContainerInterface.php
delete mode 100644 vendor/psr/container/src/NotFoundExceptionInterface.php
delete mode 100644 vendor/symfony/console/Application.php
delete mode 100644 vendor/symfony/console/Attribute/AsCommand.php
delete mode 100644 vendor/symfony/console/CHANGELOG.md
delete mode 100644 vendor/symfony/console/CI/GithubActionReporter.php
delete mode 100644 vendor/symfony/console/Color.php
delete mode 100644 vendor/symfony/console/Command/Command.php
delete mode 100644 vendor/symfony/console/Command/CompleteCommand.php
delete mode 100644 vendor/symfony/console/Command/DumpCompletionCommand.php
delete mode 100644 vendor/symfony/console/Command/HelpCommand.php
delete mode 100644 vendor/symfony/console/Command/LazyCommand.php
delete mode 100644 vendor/symfony/console/Command/ListCommand.php
delete mode 100644 vendor/symfony/console/Command/LockableTrait.php
delete mode 100644 vendor/symfony/console/Command/SignalableCommandInterface.php
delete mode 100644 vendor/symfony/console/CommandLoader/CommandLoaderInterface.php
delete mode 100644 vendor/symfony/console/CommandLoader/ContainerCommandLoader.php
delete mode 100644 vendor/symfony/console/CommandLoader/FactoryCommandLoader.php
delete mode 100644 vendor/symfony/console/Completion/CompletionInput.php
delete mode 100644 vendor/symfony/console/Completion/CompletionSuggestions.php
delete mode 100644 vendor/symfony/console/Completion/Output/BashCompletionOutput.php
delete mode 100644 vendor/symfony/console/Completion/Output/CompletionOutputInterface.php
delete mode 100644 vendor/symfony/console/Completion/Suggestion.php
delete mode 100644 vendor/symfony/console/ConsoleEvents.php
delete mode 100644 vendor/symfony/console/Cursor.php
delete mode 100644 vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php
delete mode 100644 vendor/symfony/console/Descriptor/ApplicationDescription.php
delete mode 100644 vendor/symfony/console/Descriptor/Descriptor.php
delete mode 100644 vendor/symfony/console/Descriptor/DescriptorInterface.php
delete mode 100644 vendor/symfony/console/Descriptor/JsonDescriptor.php
delete mode 100644 vendor/symfony/console/Descriptor/MarkdownDescriptor.php
delete mode 100644 vendor/symfony/console/Descriptor/TextDescriptor.php
delete mode 100644 vendor/symfony/console/Descriptor/XmlDescriptor.php
delete mode 100644 vendor/symfony/console/Event/ConsoleCommandEvent.php
delete mode 100644 vendor/symfony/console/Event/ConsoleErrorEvent.php
delete mode 100644 vendor/symfony/console/Event/ConsoleEvent.php
delete mode 100644 vendor/symfony/console/Event/ConsoleSignalEvent.php
delete mode 100644 vendor/symfony/console/Event/ConsoleTerminateEvent.php
delete mode 100644 vendor/symfony/console/EventListener/ErrorListener.php
delete mode 100644 vendor/symfony/console/Exception/CommandNotFoundException.php
delete mode 100644 vendor/symfony/console/Exception/ExceptionInterface.php
delete mode 100644 vendor/symfony/console/Exception/InvalidArgumentException.php
delete mode 100644 vendor/symfony/console/Exception/InvalidOptionException.php
delete mode 100644 vendor/symfony/console/Exception/LogicException.php
delete mode 100644 vendor/symfony/console/Exception/MissingInputException.php
delete mode 100644 vendor/symfony/console/Exception/NamespaceNotFoundException.php
delete mode 100644 vendor/symfony/console/Exception/RuntimeException.php
delete mode 100644 vendor/symfony/console/Formatter/NullOutputFormatter.php
delete mode 100644 vendor/symfony/console/Formatter/NullOutputFormatterStyle.php
delete mode 100644 vendor/symfony/console/Formatter/OutputFormatter.php
delete mode 100644 vendor/symfony/console/Formatter/OutputFormatterInterface.php
delete mode 100644 vendor/symfony/console/Formatter/OutputFormatterStyle.php
delete mode 100644 vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php
delete mode 100644 vendor/symfony/console/Formatter/OutputFormatterStyleStack.php
delete mode 100644 vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php
delete mode 100644 vendor/symfony/console/Helper/DebugFormatterHelper.php
delete mode 100644 vendor/symfony/console/Helper/DescriptorHelper.php
delete mode 100644 vendor/symfony/console/Helper/Dumper.php
delete mode 100644 vendor/symfony/console/Helper/FormatterHelper.php
delete mode 100644 vendor/symfony/console/Helper/Helper.php
delete mode 100644 vendor/symfony/console/Helper/HelperInterface.php
delete mode 100644 vendor/symfony/console/Helper/HelperSet.php
delete mode 100644 vendor/symfony/console/Helper/InputAwareHelper.php
delete mode 100644 vendor/symfony/console/Helper/ProcessHelper.php
delete mode 100644 vendor/symfony/console/Helper/ProgressBar.php
delete mode 100644 vendor/symfony/console/Helper/ProgressIndicator.php
delete mode 100644 vendor/symfony/console/Helper/QuestionHelper.php
delete mode 100644 vendor/symfony/console/Helper/SymfonyQuestionHelper.php
delete mode 100644 vendor/symfony/console/Helper/Table.php
delete mode 100644 vendor/symfony/console/Helper/TableCell.php
delete mode 100644 vendor/symfony/console/Helper/TableCellStyle.php
delete mode 100644 vendor/symfony/console/Helper/TableRows.php
delete mode 100644 vendor/symfony/console/Helper/TableSeparator.php
delete mode 100644 vendor/symfony/console/Helper/TableStyle.php
delete mode 100644 vendor/symfony/console/Input/ArgvInput.php
delete mode 100644 vendor/symfony/console/Input/ArrayInput.php
delete mode 100644 vendor/symfony/console/Input/Input.php
delete mode 100644 vendor/symfony/console/Input/InputArgument.php
delete mode 100644 vendor/symfony/console/Input/InputAwareInterface.php
delete mode 100644 vendor/symfony/console/Input/InputDefinition.php
delete mode 100644 vendor/symfony/console/Input/InputInterface.php
delete mode 100644 vendor/symfony/console/Input/InputOption.php
delete mode 100644 vendor/symfony/console/Input/StreamableInputInterface.php
delete mode 100644 vendor/symfony/console/Input/StringInput.php
delete mode 100644 vendor/symfony/console/LICENSE
delete mode 100644 vendor/symfony/console/Logger/ConsoleLogger.php
delete mode 100644 vendor/symfony/console/Output/BufferedOutput.php
delete mode 100644 vendor/symfony/console/Output/ConsoleOutput.php
delete mode 100644 vendor/symfony/console/Output/ConsoleOutputInterface.php
delete mode 100644 vendor/symfony/console/Output/ConsoleSectionOutput.php
delete mode 100644 vendor/symfony/console/Output/NullOutput.php
delete mode 100644 vendor/symfony/console/Output/Output.php
delete mode 100644 vendor/symfony/console/Output/OutputInterface.php
delete mode 100644 vendor/symfony/console/Output/StreamOutput.php
delete mode 100644 vendor/symfony/console/Output/TrimmedBufferOutput.php
delete mode 100644 vendor/symfony/console/Question/ChoiceQuestion.php
delete mode 100644 vendor/symfony/console/Question/ConfirmationQuestion.php
delete mode 100644 vendor/symfony/console/Question/Question.php
delete mode 100644 vendor/symfony/console/README.md
delete mode 100644 vendor/symfony/console/Resources/bin/hiddeninput.exe
delete mode 100644 vendor/symfony/console/Resources/completion.bash
delete mode 100644 vendor/symfony/console/SignalRegistry/SignalRegistry.php
delete mode 100644 vendor/symfony/console/SingleCommandApplication.php
delete mode 100644 vendor/symfony/console/Style/OutputStyle.php
delete mode 100644 vendor/symfony/console/Style/StyleInterface.php
delete mode 100644 vendor/symfony/console/Style/SymfonyStyle.php
delete mode 100644 vendor/symfony/console/Terminal.php
delete mode 100644 vendor/symfony/console/Tester/ApplicationTester.php
delete mode 100644 vendor/symfony/console/Tester/CommandCompletionTester.php
delete mode 100644 vendor/symfony/console/Tester/CommandTester.php
delete mode 100644 vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php
delete mode 100644 vendor/symfony/console/Tester/TesterTrait.php
delete mode 100644 vendor/symfony/console/composer.json
delete mode 100644 vendor/symfony/deprecation-contracts/CHANGELOG.md
delete mode 100644 vendor/symfony/deprecation-contracts/README.md
delete mode 100644 vendor/symfony/deprecation-contracts/composer.json
delete mode 100644 vendor/symfony/deprecation-contracts/function.php
delete mode 100644 vendor/symfony/finder/CHANGELOG.md
delete mode 100644 vendor/symfony/finder/Comparator/Comparator.php
delete mode 100644 vendor/symfony/finder/Comparator/DateComparator.php
delete mode 100644 vendor/symfony/finder/Comparator/NumberComparator.php
delete mode 100644 vendor/symfony/finder/Exception/AccessDeniedException.php
delete mode 100644 vendor/symfony/finder/Exception/DirectoryNotFoundException.php
delete mode 100644 vendor/symfony/finder/Finder.php
delete mode 100644 vendor/symfony/finder/Gitignore.php
delete mode 100644 vendor/symfony/finder/Glob.php
delete mode 100644 vendor/symfony/finder/Iterator/CustomFilterIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/DateRangeFilterIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/FileTypeFilterIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/FilecontentFilterIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/FilenameFilterIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/LazyIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/PathFilterIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/SortableIterator.php
delete mode 100644 vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php
delete mode 100644 vendor/symfony/finder/LICENSE
delete mode 100644 vendor/symfony/finder/README.md
delete mode 100644 vendor/symfony/finder/SplFileInfo.php
delete mode 100644 vendor/symfony/finder/composer.json
delete mode 100644 vendor/symfony/polyfill-ctype/Ctype.php
delete mode 100644 vendor/symfony/polyfill-ctype/LICENSE
delete mode 100644 vendor/symfony/polyfill-ctype/README.md
delete mode 100644 vendor/symfony/polyfill-ctype/bootstrap.php
delete mode 100644 vendor/symfony/polyfill-ctype/bootstrap80.php
delete mode 100644 vendor/symfony/polyfill-ctype/composer.json
delete mode 100644 vendor/symfony/polyfill-intl-grapheme/Grapheme.php
delete mode 100644 vendor/symfony/polyfill-intl-grapheme/LICENSE
delete mode 100644 vendor/symfony/polyfill-intl-grapheme/README.md
delete mode 100644 vendor/symfony/polyfill-intl-grapheme/bootstrap.php
delete mode 100644 vendor/symfony/polyfill-intl-grapheme/bootstrap80.php
delete mode 100644 vendor/symfony/polyfill-intl-grapheme/composer.json
delete mode 100644 vendor/symfony/polyfill-intl-normalizer/LICENSE
delete mode 100644 vendor/symfony/polyfill-intl-normalizer/Normalizer.php
delete mode 100644 vendor/symfony/polyfill-intl-normalizer/README.md
delete mode 100644 vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php
delete mode 100644 vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalComposition.php
delete mode 100644 vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php
delete mode 100644 vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php
delete mode 100644 vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php
delete mode 100644 vendor/symfony/polyfill-intl-normalizer/bootstrap.php
delete mode 100644 vendor/symfony/polyfill-intl-normalizer/bootstrap80.php
delete mode 100644 vendor/symfony/polyfill-intl-normalizer/composer.json
delete mode 100644 vendor/symfony/polyfill-mbstring/LICENSE
delete mode 100644 vendor/symfony/polyfill-mbstring/Mbstring.php
delete mode 100644 vendor/symfony/polyfill-mbstring/README.md
delete mode 100644 vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
delete mode 100644 vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php
delete mode 100644 vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php
delete mode 100644 vendor/symfony/polyfill-mbstring/bootstrap.php
delete mode 100644 vendor/symfony/polyfill-mbstring/bootstrap80.php
delete mode 100644 vendor/symfony/polyfill-mbstring/composer.json
delete mode 100644 vendor/symfony/polyfill-php73/LICENSE
delete mode 100644 vendor/symfony/polyfill-php73/Php73.php
delete mode 100644 vendor/symfony/polyfill-php73/README.md
delete mode 100644 vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php
delete mode 100644 vendor/symfony/polyfill-php73/bootstrap.php
delete mode 100644 vendor/symfony/polyfill-php80/LICENSE
delete mode 100644 vendor/symfony/polyfill-php80/Php80.php
delete mode 100644 vendor/symfony/polyfill-php80/PhpToken.php
delete mode 100644 vendor/symfony/polyfill-php80/README.md
delete mode 100644 vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php
delete mode 100644 vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php
delete mode 100644 vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php
delete mode 100644 vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php
delete mode 100644 vendor/symfony/polyfill-php80/bootstrap.php
delete mode 100644 vendor/symfony/polyfill-php80/composer.json
delete mode 100644 vendor/symfony/service-contracts/Attribute/Required.php
delete mode 100644 vendor/symfony/service-contracts/Attribute/SubscribedService.php
delete mode 100644 vendor/symfony/service-contracts/CHANGELOG.md
delete mode 100644 vendor/symfony/service-contracts/LICENSE
delete mode 100644 vendor/symfony/service-contracts/README.md
delete mode 100644 vendor/symfony/service-contracts/ResetInterface.php
delete mode 100644 vendor/symfony/service-contracts/ServiceLocatorTrait.php
delete mode 100644 vendor/symfony/service-contracts/ServiceProviderInterface.php
delete mode 100644 vendor/symfony/service-contracts/ServiceSubscriberInterface.php
delete mode 100644 vendor/symfony/service-contracts/ServiceSubscriberTrait.php
delete mode 100644 vendor/symfony/service-contracts/Test/ServiceLocatorTest.php
delete mode 100644 vendor/symfony/service-contracts/Test/ServiceLocatorTestCase.php
delete mode 100644 vendor/symfony/service-contracts/composer.json
delete mode 100644 vendor/symfony/string/AbstractString.php
delete mode 100644 vendor/symfony/string/AbstractUnicodeString.php
delete mode 100644 vendor/symfony/string/ByteString.php
delete mode 100644 vendor/symfony/string/CHANGELOG.md
delete mode 100644 vendor/symfony/string/CodePointString.php
delete mode 100644 vendor/symfony/string/Exception/ExceptionInterface.php
delete mode 100644 vendor/symfony/string/Exception/InvalidArgumentException.php
delete mode 100644 vendor/symfony/string/Exception/RuntimeException.php
delete mode 100644 vendor/symfony/string/Inflector/EnglishInflector.php
delete mode 100644 vendor/symfony/string/Inflector/FrenchInflector.php
delete mode 100644 vendor/symfony/string/Inflector/InflectorInterface.php
delete mode 100644 vendor/symfony/string/LICENSE
delete mode 100644 vendor/symfony/string/LazyString.php
delete mode 100644 vendor/symfony/string/README.md
delete mode 100644 vendor/symfony/string/Resources/data/wcswidth_table_wide.php
delete mode 100644 vendor/symfony/string/Resources/data/wcswidth_table_zero.php
delete mode 100644 vendor/symfony/string/Resources/functions.php
delete mode 100644 vendor/symfony/string/Slugger/AsciiSlugger.php
delete mode 100644 vendor/symfony/string/Slugger/SluggerInterface.php
delete mode 100644 vendor/symfony/string/UnicodeString.php
delete mode 100644 vendor/symfony/string/composer.json
rename vendor/udx/lib-ud-api-client/lib/classes/{class-license-checker.php => class-update-checker.php} (92%)
create mode 100644 vendor/udx/lib-wp-bootstrap/lib/classes/class-tgm-bulk-installer.php
create mode 100644 vendor/udx/lib-wp-bootstrap/lib/classes/class-tgm-list-table.php
create mode 100644 vendor/udx/lib-wp-bootstrap/lib/classes/class-tgm-plugin-activation.php
create mode 100644 vendor/wpmetabox/meta-box/.distignore
delete mode 100644 vendor/wpmetabox/meta-box/README.md
delete mode 100644 vendor/wpmetabox/meta-box/composer.json
delete mode 100644 vendor/wpmetabox/meta-box/css/media-modal.css
create mode 100644 vendor/wpmetabox/meta-box/css/modal.css
create mode 100644 vendor/wpmetabox/meta-box/css/osm-frontend.css
delete mode 100644 vendor/wpmetabox/meta-box/css/taxonomy.css
delete mode 100644 vendor/wpmetabox/meta-box/gulpfile.js
create mode 100644 vendor/wpmetabox/meta-box/inc/about/sections/review.php
delete mode 100644 vendor/wpmetabox/meta-box/inc/update/checker.php
create mode 100644 vendor/wpmetabox/meta-box/js/modal.js
create mode 100644 vendor/wpmetabox/meta-box/js/post.js
create mode 100644 vendor/wpmetabox/meta-box/js/user.js
delete mode 100644 vendor/wpmetabox/meta-box/js/validation.min.js
delete mode 100644 vendor/wpmetabox/meta-box/js/validation/additional-methods.js
delete mode 100644 vendor/wpmetabox/meta-box/js/validation/jquery.validate.js
delete mode 100644 vendor/wpmetabox/meta-box/js/validation/validation.js
delete mode 100644 vendor/wpmetabox/meta-box/package.json
create mode 100644 vendor/wpmetabox/meta-box/src/Block/Register.php
create mode 100644 vendor/wpmetabox/meta-box/src/Bricks/Register.php
create mode 100644 vendor/wpmetabox/meta-box/src/Elementor/Register.php
create mode 100644 vendor/wpmetabox/meta-box/src/Oxygen/Register.php
create mode 100644 vendor/wpmetabox/meta-box/src/Support/Arr.php
create mode 100644 vendor/wpmetabox/meta-box/src/Support/Data.php
create mode 100644 vendor/wpmetabox/meta-box/src/Updater/Checker.php
rename vendor/wpmetabox/meta-box/{inc/update/notification.php => src/Updater/Notification.php} (74%)
rename vendor/wpmetabox/meta-box/{inc/update/option.php => src/Updater/Option.php} (60%)
rename vendor/wpmetabox/meta-box/{inc/update/settings.php => src/Updater/Settings.php} (74%)
delete mode 100644 vendor/wpmetabox/meta-box/tests/001-helper.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/002-wysiwyg-clone.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/003-wpml.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/004-same-ids.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/005-rwmb-the-value.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/006-oembed-clone-remove-preview.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/007-large-embed.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/008-input-types.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/009-datetime.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/010-clone-style.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/011-choices.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/012-multiple-localize-scripts.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/013-clone-default.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/014-clone-taxonomy-advanced.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/015-save-field-value.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/016-file-upload-custom-folder.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/017-shortcode.php
delete mode 100644 vendor/wpmetabox/meta-box/tests/018-label-description-required.php
diff --git a/changelog.txt b/changelog.txt
index 143612745..cdb03fc0d 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,6 +1,12 @@
== Changelog ==
= 4.0.0 =
+* FIX - Stateless mode Incompatible with Media Uploader in Media Library Grid mode [#675](https://github.com/udx/wp-stateless/issues/675).
+* FIX - Prevent duplicating messages in Admin Panel.
+* COMPATIBILITY - Dynamic Image Support is now part of the core.
+* COMPATIBILITY - Google App Engine is now part of the core. Automatically enables **Stateless** mode when Google App Engine detected. Can be disabled using `WP_STATELESS_COMPATIBILITY_GAE` constant.
* COMPATIBILITY - Removed compatibility with "Advanced Custom Fields: Image Crop Add-on", because plugin is deprecated.
+* COMPATIBILITY - Removed compatibility with "VidoRev" plugin.
+* COMPATIBILITY - Removed compatibility with "WP Retina 2x" plugin.
* COMPATIBILITY - BuddyBoss Platform compatibility moved to a separate plugin [WP-Stateless - BuddyBoss Platform Addon](https://github.com/udx/wp-stateless-buddyboss-addon).
* COMPATIBILITY - BuddyPress compatibility moved to a separate plugin [WP-Stateless - BuddyPress Addon](https://github.com/udx/wp-stateless-buddypress-addon).
* COMPATIBILITY - Easy Digital Downloads compatibility moved to a separate plugin [WP-Stateless - Easy Digital Downloads Addon](https://github.com/udx/wp-stateless-easy-digital-downloads-addon).
@@ -14,6 +20,20 @@
* COMPATIBILITY - Simple Local Avatar compatibility moved to a separate plugin [WP-Stateless - Simple Local Avatars Addon](https://github.com/udx/wp-stateless-simple-local-avatars-addon).
* COMPATIBILITY - SiteOrigin CSS compatibility moved to a separate plugin [WP-Stateless - SiteOrigin CSS Addon](https://github.com/udx/wp-stateless-siteorigin-css-addon).
* COMPATIBILITY - SiteOrigin Widgets Bundle compatibility moved to a separate plugin [WP-Stateless - SiteOrigin Widgets Bundle Addon](https://github.com/udx/wp-stateless-siteorigin-widgets-bundle-addon).
+* COMPATIBILITY - WPBakery Page Builder compatibility moved to a separate plugin [WP-Stateless - WPBakery Page Builder Addon](https://github.com/udx/wp-stateless-wpbakery-page-builder-addon).
+* COMPATIBILITY - WooCommerce compatibility moved to a separate plugin [WP-Stateless - WooCommerce Addon](https://github.com/udx/wp-stateless-woocommerce-addon).
+* COMPATIBILITY - WooCommerce Extra Product Options compatibility moved to a separate plugin [WP-Stateless - WooCommerce Extra Product Options Addon](https://github.com/udx/wp-stateless-woo-extra-product-options-addon).
+* COMPATIBILITY - Contact Form by WPForms compatibility moved to a separate plugin [WP-Stateless - Contact Form by WPForms Addon](https://github.com/udx/wp-stateless-wp-forms-lite-addon).
+* COMPATIBILITY - Smush compatibility moved to a separate plugin [WP-Stateless - Smush Addon](https://github.com/udx/wp-stateless-wp-smushit-addon).
+* COMPATIBILITY - ShortPixel Image Optimizer compatibility moved to a separate plugin [WP-Stateless - ShortPixel Image Optimizer Addon](https://github.com/udx/wp-stateless-shortpixel-addon).
+* COMPATIBILITY - EWWW Image Optimizer compatibility moved to a separate plugin [WP-Stateless - EWWW Image Optimizer Addon](https://github.com/udx/wp-stateless-ewww-addon).
+* COMPATIBILITY - Imagify compatibility moved to a separate plugin [WP-Stateless - Imagify Addon](https://github.com/udx/wp-stateless-imagify-addon).
+* COMPATIBILITY - The Events Calendar compatibility moved to a separate plugin [WP-Stateless - The Events Calendar Addon](https://github.com/udx/wp-stateless-the-events-calendar-addon).
+* COMPATIBILITY - any compatibility is enabled by default after installing the addon.
+* ENHANCEMENT - Updated Client library for Google APIs to version 2.15.1.
+* ENHANCEMENT - Updated Meta Box library to version 5.8.2.
+* ENHANCEMENT - Updated Meta Box Tabs to version 1.1.17.
+* ENHANCEMENT - Updated JWT library.
= 3.2.5 =
* FIX - Folder setting does not allow custom structure [#608](https://github.com/udx/wp-stateless/issues/608).
diff --git a/changes.md b/changes.md
index 24ea68dd9..767973ad3 100644
--- a/changes.md
+++ b/changes.md
@@ -1,6 +1,11 @@
#### 4.0.0
-
+* FIX - Stateless mode Incompatible with Media Uploader in Media Library Grid mode [#675](https://github.com/udx/wp-stateless/issues/675).
+* FIX - Prevent duplicating messages in Admin Panel.
+* COMPATIBILITY - Dynamic Image Support is now part of the core.
+* COMPATIBILITY - Google App Engine is now part of the core. Automatically enables **Stateless** mode when Google App Engine detected. Can be disabled using `WP_STATELESS_COMPATIBILITY_GAE` constant.
* COMPATIBILITY - Removed compatibility with "Advanced Custom Fields: Image Crop Add-on", because plugin is deprecated.
+* COMPATIBILITY - Removed compatibility with "VidoRev" plugin.
+* COMPATIBILITY - Removed compatibility with "WP Retina 2x" plugin.
* COMPATIBILITY - BuddyBoss Platform compatibility moved to a separate plugin [WP-Stateless - BuddyBoss Platform Addon](https://github.com/udx/wp-stateless-buddyboss-addon).
* COMPATIBILITY - BuddyPress compatibility moved to a separate plugin [WP-Stateless - BuddyPress Addon](https://github.com/udx/wp-stateless-buddypress-addon).
* COMPATIBILITY - Easy Digital Downloads compatibility moved to a separate plugin [WP-Stateless - Easy Digital Downloads Addon](https://github.com/udx/wp-stateless-easy-digital-downloads-addon).
@@ -14,6 +19,21 @@
* COMPATIBILITY - Simple Local Avatar compatibility moved to a separate plugin [WP-Stateless - Simple Local Avatars Addon](https://github.com/udx/wp-stateless-simple-local-avatars-addon).
* COMPATIBILITY - SiteOrigin CSS compatibility moved to a separate plugin [WP-Stateless - SiteOrigin CSS Addon](https://github.com/udx/wp-stateless-siteorigin-css-addon).
* COMPATIBILITY - SiteOrigin Widgets Bundle compatibility moved to a separate plugin [WP-Stateless - SiteOrigin Widgets Bundle Addon](https://github.com/udx/wp-stateless-siteorigin-widgets-bundle-addon).
+* COMPATIBILITY - SiteOrigin Widgets Bundle compatibility moved to a separate plugin [WP-Stateless - SiteOrigin Widgets Bundle Addon](https://github.com/udx/wp-stateless-siteorigin-widgets-bundle-addon).
+* COMPATIBILITY - WPBakery Page Builder compatibility moved to a separate plugin [WP-Stateless - WPBakery Page Builder Addon](https://github.com/udx/wp-stateless-wpbakery-page-builder-addon).
+* COMPATIBILITY - WooCommerce compatibility moved to a separate plugin [WP-Stateless - WooCommerce Addon](https://github.com/udx/wp-stateless-woocommerce-addon).
+* COMPATIBILITY - WooCommerce Extra Product Options compatibility moved to a separate plugin [WP-Stateless - WooCommerce Extra Product Options Addon](https://github.com/udx/wp-stateless-woo-extra-product-options-addon).
+* COMPATIBILITY - Contact Form by WPForms compatibility moved to a separate plugin [WP-Stateless - Contact Form by WPForms Addon](https://github.com/udx/wp-stateless-wp-forms-lite-addon).
+* COMPATIBILITY - Smush compatibility moved to a separate plugin [WP-Stateless - Smush Addon](https://github.com/udx/wp-stateless-wp-smushit-addon).
+* COMPATIBILITY - ShortPixel Image Optimizer compatibility moved to a separate plugin [WP-Stateless - ShortPixel Image Optimizer Addon](https://github.com/udx/wp-stateless-shortpixel-addon).
+* COMPATIBILITY - EWWW Image Optimizer compatibility moved to a separate plugin [WP-Stateless - EWWW Image Optimizer Addon](https://github.com/udx/wp-stateless-ewww-addon).
+* COMPATIBILITY - Imagify compatibility moved to a separate plugin [WP-Stateless - Imagify Addon](https://github.com/udx/wp-stateless-imagify-addon).
+* COMPATIBILITY - The Events Calendar compatibility moved to a separate plugin [WP-Stateless - The Events Calendar Addon](https://github.com/udx/wp-stateless-the-events-calendar-addon).
+* COMPATIBILITY - any compatibility is enabled by default after installing the addon.
+* ENHANCEMENT - Updated Client library for Google APIs to version 2.15.1.
+* ENHANCEMENT - Updated Meta Box library to version 5.8.2.
+* ENHANCEMENT - Updated Meta Box Tabs to version 1.1.17.
+* ENHANCEMENT - Updated JWT library.
#### 3.2.5
* FIX - Folder setting does not allow custom structure [#608](https://github.com/udx/wp-stateless/issues/608).
diff --git a/composer.json b/composer.json
index 345c7ab8a..e805684c9 100644
--- a/composer.json
+++ b/composer.json
@@ -28,7 +28,7 @@
"udx/lib-ud-api-client": "~1.2",
"ccampbell/chromephp": "^4.1",
"firebase/php-jwt": "^6.1.2",
- "wpmetabox/meta-box": "5.6.3"
+ "wpmetabox/meta-box": "^5.6.3"
},
"autoload": {
"classmap": [
diff --git a/composer.lock b/composer.lock
index c94e9e3a9..267945b37 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "e12415dd225dd16878a4f85007e8db5e",
+ "content-hash": "1763bfd3d53f8f11612d0a9cb9b037da",
"packages": [
{
"name": "ccampbell/chromephp",
@@ -47,6 +47,10 @@
"log",
"logging"
],
+ "support": {
+ "issues": "https://github.com/ccampbell/chromephp/issues",
+ "source": "https://github.com/ccampbell/chromephp/tree/4.1.0"
+ },
"time": "2013-06-26T03:44:33+00:00"
},
{
@@ -180,6 +184,10 @@
"zend",
"zikula"
],
+ "support": {
+ "issues": "https://github.com/composer/installers/issues",
+ "source": "https://github.com/composer/installers/tree/v1.12.0"
+ },
"funding": [
{
"url": "https://packagist.com",
@@ -198,16 +206,16 @@
},
{
"name": "firebase/php-jwt",
- "version": "v6.6.0",
+ "version": "v6.9.0",
"source": {
"type": "git",
"url": "https://github.com/firebase/php-jwt.git",
- "reference": "5a9cf79b4a2eb347230384648cc7b0d68cd97faa"
+ "reference": "f03270e63eaccf3019ef0f32849c497385774e11"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/firebase/php-jwt/zipball/5a9cf79b4a2eb347230384648cc7b0d68cd97faa",
- "reference": "5a9cf79b4a2eb347230384648cc7b0d68cd97faa",
+ "url": "https://api.github.com/repos/firebase/php-jwt/zipball/f03270e63eaccf3019ef0f32849c497385774e11",
+ "reference": "f03270e63eaccf3019ef0f32849c497385774e11",
"shasum": ""
},
"require": {
@@ -253,7 +261,11 @@
"jwt",
"php"
],
- "time": "2023-06-13T17:11:06+00:00"
+ "support": {
+ "issues": "https://github.com/firebase/php-jwt/issues",
+ "source": "https://github.com/firebase/php-jwt/tree/v6.9.0"
+ },
+ "time": "2023-10-05T00:24:42+00:00"
},
{
"name": "udx/lib-settings",
@@ -265,8 +277,7 @@
},
"dist": {
"type": "zip",
- "url": "https://github.com/udx/lib-settings/archive/0.3.0.zip",
- "reference": "0.3.0"
+ "url": "https://github.com/udx/lib-settings/archive/0.3.0.zip"
},
"require": {
"udx/lib-utility": "~0.3"
@@ -332,8 +343,7 @@
},
"dist": {
"type": "zip",
- "url": "https://github.com/udx/lib-ud-api-client/archive/1.2.1.zip",
- "reference": "1.2.1"
+ "url": "https://github.com/udx/lib-ud-api-client/archive/1.2.1.zip"
},
"require": {
"php": ">=5.3"
@@ -376,8 +386,7 @@
},
"dist": {
"type": "zip",
- "url": "https://github.com/udx/lib-utility/archive/0.4.0.zip",
- "reference": "0.4.0"
+ "url": "https://github.com/udx/lib-utility/archive/0.4.0.zip"
},
"require-dev": {
"phpunit/phpunit": "4.1.*"
@@ -436,8 +445,7 @@
},
"dist": {
"type": "zip",
- "url": "https://github.com/udx/lib-wp-bootstrap/archive/1.3.0.zip",
- "reference": "1.3.0"
+ "url": "https://github.com/udx/lib-wp-bootstrap/archive/1.3.0.zip"
},
"require": {
"php": ">=5.3",
@@ -463,19 +471,24 @@
},
{
"name": "wpmetabox/meta-box",
- "version": "5.6.3",
+ "version": "5.8.2",
"source": {
"type": "git",
"url": "https://github.com/wpmetabox/meta-box.git",
- "reference": "c2c4a30ed70163dfdfe93f2865e88a7a45c46856"
+ "reference": "de583a74171bdee1b5213232a5bf50f82c6fee14"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/wpmetabox/meta-box/zipball/c2c4a30ed70163dfdfe93f2865e88a7a45c46856",
- "reference": "c2c4a30ed70163dfdfe93f2865e88a7a45c46856",
+ "url": "https://api.github.com/repos/wpmetabox/meta-box/zipball/de583a74171bdee1b5213232a5bf50f82c6fee14",
+ "reference": "de583a74171bdee1b5213232a5bf50f82c6fee14",
"shasum": ""
},
"type": "wordpress-plugin",
+ "autoload": {
+ "psr-4": {
+ "MetaBox\\": "src/"
+ }
+ },
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0"
@@ -499,7 +512,11 @@
"wordpress-plugin",
"wp-admin"
],
- "time": "2022-04-18T03:20:58+00:00"
+ "support": {
+ "issues": "https://github.com/wpmetabox/meta-box/issues",
+ "source": "https://github.com/wpmetabox/meta-box/tree/5.8.2"
+ },
+ "time": "2023-10-13T13:53:33+00:00"
}
],
"packages-dev": [
@@ -549,6 +566,10 @@
}
],
"description": "Composes all dependencies as a package inside a WordPress plugin",
+ "support": {
+ "issues": "https://github.com/coenjacobs/mozart/issues",
+ "source": "https://github.com/coenjacobs/mozart/tree/0.7.1"
+ },
"funding": [
{
"url": "https://github.com/coenjacobs",
@@ -559,16 +580,16 @@
},
{
"name": "deliciousbrains/wp-background-processing",
- "version": "1.1.0",
+ "version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/deliciousbrains/wp-background-processing.git",
- "reference": "d5ef95cecba7f792ddca3e3bd70ebfb90dc4996d"
+ "reference": "ebbed762c42e70e76573ffbd36e591378ba5f2ee"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/deliciousbrains/wp-background-processing/zipball/d5ef95cecba7f792ddca3e3bd70ebfb90dc4996d",
- "reference": "d5ef95cecba7f792ddca3e3bd70ebfb90dc4996d",
+ "url": "https://api.github.com/repos/deliciousbrains/wp-background-processing/zipball/ebbed762c42e70e76573ffbd36e591378ba5f2ee",
+ "reference": "ebbed762c42e70e76573ffbd36e591378ba5f2ee",
"shasum": ""
},
"require": {
@@ -601,7 +622,11 @@
}
],
"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.",
- "time": "2023-04-18T12:32:25+00:00"
+ "support": {
+ "issues": "https://github.com/deliciousbrains/wp-background-processing/issues",
+ "source": "https://github.com/deliciousbrains/wp-background-processing/tree/1.1.1"
+ },
+ "time": "2023-07-18T10:22:06+00:00"
},
{
"name": "league/flysystem",
@@ -685,6 +710,10 @@
"sftp",
"storage"
],
+ "support": {
+ "issues": "https://github.com/thephpleague/flysystem/issues",
+ "source": "https://github.com/thephpleague/flysystem/tree/1.1.10"
+ },
"funding": [
{
"url": "https://offset.earth/frankdejonge",
@@ -695,26 +724,26 @@
},
{
"name": "league/mime-type-detection",
- "version": "1.11.0",
+ "version": "1.14.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/mime-type-detection.git",
- "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
+ "reference": "b6a5854368533df0295c5761a0253656a2e52d9e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
- "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
+ "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/b6a5854368533df0295c5761a0253656a2e52d9e",
+ "reference": "b6a5854368533df0295c5761a0253656a2e52d9e",
"shasum": ""
},
"require": {
"ext-fileinfo": "*",
- "php": "^7.2 || ^8.0"
+ "php": "^7.4 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.2",
"phpstan/phpstan": "^0.12.68",
- "phpunit/phpunit": "^8.5.8 || ^9.3"
+ "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0"
},
"type": "library",
"autoload": {
@@ -733,6 +762,10 @@
}
],
"description": "Mime-type detection for Flysystem",
+ "support": {
+ "issues": "https://github.com/thephpleague/mime-type-detection/issues",
+ "source": "https://github.com/thephpleague/mime-type-detection/tree/1.14.0"
+ },
"funding": [
{
"url": "https://github.com/frankdejonge",
@@ -743,7 +776,7 @@
"type": "tidelift"
}
],
- "time": "2022-04-17T13:12:02+00:00"
+ "time": "2023-10-17T14:13:20+00:00"
},
{
"name": "psr/container",
@@ -792,20 +825,24 @@
"container-interop",
"psr"
],
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/2.0.2"
+ },
"time": "2021-11-05T16:47:00+00:00"
},
{
"name": "symfony/console",
- "version": "v5.4.24",
+ "version": "v5.4.31",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8"
+ "reference": "11ac5f154e0e5c4c77af83ad11ead9165280b92a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8",
- "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8",
+ "url": "https://api.github.com/repos/symfony/console/zipball/11ac5f154e0e5c4c77af83ad11ead9165280b92a",
+ "reference": "11ac5f154e0e5c4c77af83ad11ead9165280b92a",
"shasum": ""
},
"require": {
@@ -874,6 +911,9 @@
"console",
"terminal"
],
+ "support": {
+ "source": "https://github.com/symfony/console/tree/v5.4.31"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -888,29 +928,29 @@
"type": "tidelift"
}
],
- "time": "2023-05-26T05:13:16+00:00"
+ "time": "2023-10-31T07:58:33+00:00"
},
{
"name": "symfony/deprecation-contracts",
- "version": "v3.3.0",
+ "version": "v3.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
- "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf"
+ "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf",
- "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
+ "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
"shasum": ""
},
"require": {
- "php": ">=8.1"
+ "php": ">=8.0.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "3.4-dev"
+ "dev-main": "3.0-dev"
},
"thanks": {
"name": "symfony/contracts",
@@ -938,6 +978,9 @@
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -952,20 +995,20 @@
"type": "tidelift"
}
],
- "time": "2023-05-23T14:45:45+00:00"
+ "time": "2022-01-02T09:55:41+00:00"
},
{
"name": "symfony/finder",
- "version": "v5.4.21",
+ "version": "v5.4.27",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19"
+ "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19",
- "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d",
+ "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d",
"shasum": ""
},
"require": {
@@ -998,6 +1041,9 @@
],
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/finder/tree/v5.4.27"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -1012,20 +1058,20 @@
"type": "tidelift"
}
],
- "time": "2023-02-16T09:33:00+00:00"
+ "time": "2023-07-31T08:02:31+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
+ "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
+ "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
"shasum": ""
},
"require": {
@@ -1040,7 +1086,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -1077,6 +1123,9 @@
"polyfill",
"portable"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -1091,20 +1140,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-intl-grapheme",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "511a08c03c1960e08a883f4cffcacd219b758354"
+ "reference": "875e90aeea2777b6f135677f618529449334a612"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354",
- "reference": "511a08c03c1960e08a883f4cffcacd219b758354",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612",
+ "reference": "875e90aeea2777b6f135677f618529449334a612",
"shasum": ""
},
"require": {
@@ -1116,7 +1165,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -1155,6 +1204,9 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -1169,20 +1221,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
- "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6"
+ "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6",
- "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
+ "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
"shasum": ""
},
"require": {
@@ -1194,7 +1246,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -1236,6 +1288,9 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -1250,20 +1305,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
+ "reference": "42292d99c55abe617799667f454222c54c60e229"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
+ "reference": "42292d99c55abe617799667f454222c54c60e229",
"shasum": ""
},
"require": {
@@ -1278,7 +1333,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -1316,6 +1371,9 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -1330,20 +1388,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-07-28T09:04:16+00:00"
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9"
+ "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
- "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5",
+ "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5",
"shasum": ""
},
"require": {
@@ -1352,7 +1410,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -1392,6 +1450,9 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -1406,20 +1467,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
"shasum": ""
},
"require": {
@@ -1428,7 +1489,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -1472,6 +1533,9 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -1486,33 +1550,36 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/service-contracts",
- "version": "v3.3.0",
+ "version": "v3.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
- "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4"
+ "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4",
- "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d78d39c1599bd1188b8e26bb341da52c3c6d8a66",
+ "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66",
"shasum": ""
},
"require": {
- "php": ">=8.1",
+ "php": ">=8.0.2",
"psr/container": "^2.0"
},
"conflict": {
"ext-psr": "<1.1|>=2"
},
+ "suggest": {
+ "symfony/service-implementation": ""
+ },
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "3.4-dev"
+ "dev-main": "3.0-dev"
},
"thanks": {
"name": "symfony/contracts",
@@ -1522,10 +1589,7 @@
"autoload": {
"psr-4": {
"Symfony\\Contracts\\Service\\": ""
- },
- "exclude-from-classmap": [
- "/Test/"
- ]
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1551,6 +1615,9 @@
"interoperability",
"standards"
],
+ "support": {
+ "source": "https://github.com/symfony/service-contracts/tree/v3.0.2"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -1565,37 +1632,36 @@
"type": "tidelift"
}
],
- "time": "2023-05-23T14:45:45+00:00"
+ "time": "2022-05-30T19:17:58+00:00"
},
{
"name": "symfony/string",
- "version": "v6.3.0",
+ "version": "v6.0.19",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f"
+ "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
- "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
+ "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a",
+ "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a",
"shasum": ""
},
"require": {
- "php": ">=8.1",
+ "php": ">=8.0.2",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-grapheme": "~1.0",
"symfony/polyfill-intl-normalizer": "~1.0",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
- "symfony/translation-contracts": "<2.5"
+ "symfony/translation-contracts": "<2.0"
},
"require-dev": {
"symfony/error-handler": "^5.4|^6.0",
"symfony/http-client": "^5.4|^6.0",
- "symfony/intl": "^6.2",
- "symfony/translation-contracts": "^2.5|^3.0",
+ "symfony/translation-contracts": "^2.0|^3.0",
"symfony/var-exporter": "^5.4|^6.0"
},
"type": "library",
@@ -1634,6 +1700,9 @@
"utf-8",
"utf8"
],
+ "support": {
+ "source": "https://github.com/symfony/string/tree/v6.0.19"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -1648,7 +1717,7 @@
"type": "tidelift"
}
],
- "time": "2023-03-21T21:06:29+00:00"
+ "time": "2023-01-01T08:36:10+00:00"
}
],
"aliases": [],
@@ -1660,5 +1729,5 @@
"php": ">=5.6.20"
},
"platform-dev": [],
- "plugin-api-version": "1.1.0"
+ "plugin-api-version": "2.3.0"
}
diff --git a/lib/Google/CHANGELOG.md b/lib/Google/CHANGELOG.md
index 79305bb5a..b6d29393c 100644
--- a/lib/Google/CHANGELOG.md
+++ b/lib/Google/CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog
+## [2.15.1](https://github.com/googleapis/google-api-php-client/compare/v2.15.0...v2.15.1) (2023-09-12)
+
+
+### Bug Fixes
+
+* Upgrade min phpseclib version ([#2499](https://github.com/googleapis/google-api-php-client/issues/2499)) ([8e7fae2](https://github.com/googleapis/google-api-php-client/commit/8e7fae2b79cfc1b72026347abf6314d91442a018))
+
## [2.15.0](https://github.com/googleapis/google-api-php-client/compare/v2.14.0...v2.15.0) (2023-05-18)
diff --git a/lib/Google/CODE_OF_CONDUCT.md b/lib/Google/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..46b2a08ea
--- /dev/null
+++ b/lib/Google/CODE_OF_CONDUCT.md
@@ -0,0 +1,43 @@
+# Contributor Code of Conduct
+
+As contributors and maintainers of this project,
+and in the interest of fostering an open and welcoming community,
+we pledge to respect all people who contribute through reporting issues,
+posting feature requests, updating documentation,
+submitting pull requests or patches, and other activities.
+
+We are committed to making participation in this project
+a harassment-free experience for everyone,
+regardless of level of experience, gender, gender identity and expression,
+sexual orientation, disability, personal appearance,
+body size, race, ethnicity, age, religion, or nationality.
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery
+* Personal attacks
+* Trolling or insulting/derogatory comments
+* Public or private harassment
+* Publishing other's private information,
+such as physical or electronic
+addresses, without explicit permission
+* Other unethical or unprofessional conduct.
+
+Project maintainers have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct.
+By adopting this Code of Conduct,
+project maintainers commit themselves to fairly and consistently
+applying these principles to every aspect of managing this project.
+Project maintainers who do not follow or enforce the Code of Conduct
+may be permanently removed from the project team.
+
+This code of conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior
+may be reported by opening an issue
+or contacting one or more of the project maintainers.
+
+This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
+available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
diff --git a/lib/Google/README.md b/lib/Google/README.md
index 1beb6c88d..b82f44f14 100644
--- a/lib/Google/README.md
+++ b/lib/Google/README.md
@@ -44,7 +44,7 @@ composer installed.
Once composer is installed, execute the following command in your project root to install this library:
```sh
-composer require google/apiclient:^2.12.1
+composer require google/apiclient:^2.15.0
```
Finally, be sure to include the autoloader:
@@ -65,7 +65,7 @@ you want to keep in `composer.json`:
```json
{
"require": {
- "google/apiclient": "^2.12.1"
+ "google/apiclient": "^2.15.0"
},
"scripts": {
"pre-autoload-dump": "Google\\Task\\Composer::cleanup"
@@ -245,9 +245,10 @@ The classes used to call the API in [google-api-php-client-services](https://git
A JSON request to the [Datastore API](https://developers.google.com/apis-explorer/#p/datastore/v1beta3/datastore.projects.runQuery) would look like this:
-```json
+```
POST https://datastore.googleapis.com/v1beta3/projects/YOUR_PROJECT_ID:runQuery?key=YOUR_API_KEY
-
+```
+```json
{
"query": {
"kind": [{
diff --git a/lib/Google/UPGRADING.md b/lib/Google/UPGRADING.md
new file mode 100644
index 000000000..ef939e943
--- /dev/null
+++ b/lib/Google/UPGRADING.md
@@ -0,0 +1,377 @@
+Google API Client Upgrade Guide
+===============================
+
+2.x to 2.10.0
+-------------
+
+### Namespaces
+
+The Google API Client for PHP now uses namespaces for all classes. Code using
+the legacy classnames will continue to work, but it is advised to upgrade to the
+underspaced names, as the legacy classnames will be deprecated some time in the
+future.
+
+**Before**
+
+```php
+$client = new Google_Client();
+$service = new Google_Service_Books($client);
+```
+
+**After**
+```php
+$client = new Google\Client();
+$service = new Google\Service\Books($client);
+```
+
+### Service class constructors
+
+Service class constructors now accept an optional `Google\Client|array` parameter
+as their first argument, rather than requiring an instance of `Google\Client`.
+
+**Before**
+
+```php
+$client = new Google_Client();
+$client->setApplicationName("Client_Library_Examples");
+$client->setDeveloperKey("YOUR_APP_KEY");
+
+$service = new Google_Service_Books($client);
+```
+
+**After**
+
+```php
+$service = new Google\Service\Books([
+ 'application_name' => "Client_Library_Examples",
+ 'developer_key' => "YOUR_APP_KEY",
+]);
+```
+
+1.0 to 2.0
+----------
+
+The Google API Client for PHP has undergone major internal changes in `2.0`. Please read through
+the list below in order to upgrade to the latest version:
+
+## Installation now uses `Composer`
+
+**Before**
+
+The project was cloned in your project and you would run the autoloader from wherever:
+
+```php
+// the autoload file was included
+require_once 'google-api-php-client/src/Google/autoload.php'; // or wherever autoload.php is located
+// OR classes were added one-by-one
+require_once 'Google/Client.php';
+require_once 'Google/Service/YouTube.php';
+```
+
+**After**
+
+This library now uses [composer](https://getcomposer.org) (We suggest installing
+composer [globally](http://symfony.com/doc/current/cookbook/composer.html)). Add this library by
+running the following in the root of your project:
+
+```
+$ composer require google/apiclient:~2.0
+```
+
+This will install this library and generate an autoload file in `vendor/autoload.php` in the root
+of your project. You can now include this library with the following code:
+
+```php
+require_once 'vendor/autoload.php';
+```
+
+## Access Tokens are passed around as arrays instead of JSON strings
+
+**Before**
+
+```php
+$accessToken = $client->getAccessToken();
+print_r($accessToken);
+// would output:
+// string(153) "{"access_token":"ya29.FAKsaByOPoddfzvKRo_LBpWWCpVTiAm4BjsvBwxtN7IgSNoUfcErBk_VPl4iAiE1ntb_","token_type":"Bearer","expires_in":3593,"created":1445548590}"
+file_put_contents($credentialsPath, $accessToken);
+```
+
+**After**
+
+```php
+$accessToken = $client->getAccessToken();
+print_r($accessToken);
+// will output:
+// array(4) {
+// ["access_token"]=>
+// string(73) "ya29.FAKsaByOPoddfzvKRo_LBpWWCpVTiAm4BjsvBwxtN7IgSNoUfcErBk_VPl4iAiE1ntb_"
+// ["token_type"]=>
+// string(6) "Bearer"
+// ["expires_in"]=>
+// int(3593)
+// ["created"]=>
+// int(1445548590)
+// }
+file_put_contents($credentialsPath, json_encode($accessToken));
+```
+
+## ID Token data is returned as an array
+
+**Before**
+
+```php
+$ticket = $client->verifyIdToken($idToken);
+$data = $ticket->getAttributes();
+$userId = $data['payload']['sub'];
+```
+
+**After**
+
+```php
+$userData = $client->verifyIdToken($idToken);
+$userId = $userData['sub'];
+```
+
+## `Google_Auth_AssertionCredentials` has been removed
+
+For service accounts, we now use `setAuthConfig` or `useApplicationDefaultCredentials`
+
+**Before**
+
+```php
+$client_email = '1234567890-a1b2c3d4e5f6g7h8i@developer.gserviceaccount.com';
+$private_key = file_get_contents('MyProject.p12');
+$scopes = array('https://www.googleapis.com/auth/sqlservice.admin');
+$credentials = new Google_Auth_AssertionCredentials(
+ $client_email,
+ $scopes,
+ $private_key
+);
+```
+
+**After**
+
+```php
+$client->setAuthConfig('/path/to/service-account.json');
+
+// OR use environment variables (recommended)
+
+putenv('GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json');
+$client->useApplicationDefaultCredentials();
+```
+
+> Note: P12s are deprecated in favor of service account JSON, which can be generated in the
+> Credentials section of Google Developer Console.
+
+In order to impersonate a user, call `setSubject` when your service account
+credentials are being used.
+
+**Before**
+
+```php
+$user_to_impersonate = 'user@example.org';
+$credentials = new Google_Auth_AssertionCredentials(
+ $client_email,
+ $scopes,
+ $private_key,
+ 'notasecret', // Default P12 password
+ 'http://oauth.net/grant_type/jwt/1.0/bearer', // Default grant type
+ $user_to_impersonate,
+);
+```
+
+**After**
+
+```php
+$user_to_impersonate = 'user@example.org';
+$client->setSubject($user_to_impersonate);
+```
+
+Additionally, `Google_Client::loadServiceAccountJson` has been removed in favor
+of `Google_Client::setAuthConfig`:
+
+**Before**
+
+```php
+$scopes = [ Google_Service_Books::BOOKS ];
+$client->loadServiceAccountJson('/path/to/service-account.json', $scopes);
+```
+
+**After**
+
+```php
+$scopes = [ Google_Service_Books::BOOKS ];
+$client->setAuthConfig('/path/to/service-account.json');
+$client->setScopes($scopes);
+```
+
+## `Google_Auth_AppIdentity` has been removed
+
+For App Engine authentication, we now use the underlying [`google/auth`][Google Auth] and
+call `useApplicationDefaultCredentials`:
+
+**Before**
+
+```php
+$client->setAuth(new Google_Auth_AppIdentity($client));
+$client->getAuth()
+ ->authenticateForScope('https://www.googleapis.com/auth/sqlservice.admin')
+```
+
+**After**
+
+```php
+$client->useApplicationDefaultCredentials();
+$client->addScope('https://www.googleapis.com/auth/sqlservice.admin');
+```
+
+This will detect when the App Engine environment is present, and use the appropriate credentials.
+
+## `Google_Auth_Abstract` classes have been removed
+
+[`google/auth`][Google Auth] is now used for authentication. As a result, all
+`Google_Auth`-related functionality has been removed. The methods that were a part of
+`Google_Auth_Abstract` have been moved into the `Google_Client` object.
+
+**Before**
+
+```php
+$request = new Google_Http_Request();
+$client->getAuth()->sign($request);
+```
+
+**After**
+
+```php
+// create an authorized HTTP client
+$httpClient = $client->authorize();
+
+// OR add authorization to an existing client
+$httpClient = new GuzzleHttp\Client();
+$httpClient = $client->authorize($httpClient);
+```
+
+**Before**
+
+```php
+$request = new Google_Http_Request();
+$response = $client->getAuth()->authenticatedRequest($request);
+```
+
+**After**
+
+```php
+$httpClient = $client->authorize();
+$request = new GuzzleHttp\Psr7\Request('POST', $url);
+$response = $httpClient->send($request);
+```
+
+> NOTE: `$request` can be any class implementing
+> `Psr\Http\Message\RequestInterface`
+
+In addition, other methods that were callable on `Google_Auth_OAuth2` are now called
+on the `Google_Client` object:
+
+**Before**
+
+```php
+$client->getAuth()->refreshToken($token);
+$client->getAuth()->refreshTokenWithAssertion();
+$client->getAuth()->revokeToken($token);
+$client->getAuth()->isAccessTokenExpired();
+```
+
+**After**
+
+```php
+$client->refreshToken($token);
+$client->refreshTokenWithAssertion();
+$client->revokeToken($token);
+$client->isAccessTokenExpired();
+```
+
+## PHP 5.6 is now the minimum supported PHP version
+
+This was previously `PHP 5.2`. If you still need to use PHP 5.2, please continue to use
+the [v1-master](https://github.com/google/google-api-php-client/tree/v1-master) branch.
+
+## Guzzle and PSR-7 are used for HTTP Requests
+
+The HTTP library Guzzle is used for all HTTP Requests. By default, [`Guzzle 6`][Guzzle 6]
+is used, but this library is also compatible with [`Guzzle 5`][Guzzle 5]. As a result,
+all `Google_IO`-related functionality and `Google_Http`-related functionality has been
+changed or removed.
+
+1. Removed `Google_Http_Request`
+1. Removed `Google_IO_Abstract`, `Google_IO_Exception`, `Google_IO_Curl`, and `Google_IO_Stream`
+1. Removed methods `Google_Client::getIo` and `Google_Client::setIo`
+1. Refactored `Google_Http_Batch` and `Google_Http_MediaFileUpload` for Guzzle
+1. Added `Google_Client::getHttpClient` and `Google_Client::setHttpClient` for getting and
+setting the Guzzle `GuzzleHttp\ClientInterface` object.
+
+> NOTE: `PSR-7`-compatible libraries can now be used with this library.
+
+## Other Changes
+
+ - [`PSR 3`][PSR 3] `LoggerInterface` is now supported, and [Monolog][Monolog] is used for all
+ logging. As a result, all `Google_Logger`-related functionality has been removed:
+ 1. Removed `Google_Logger_Abstract`, `Google_Logger_Exception`, `Google_Logger_File`,
+ `Google_Logger_Null`, and `Google_Logger_Psr`
+ 1. `Google_Client::setLogger` now requires `Psr\Log\LoggerInterface`
+ - [`firebase/jwt`][Firebase JWT] is now used for all JWT signing and verifying. As a result, the
+ following classes have been changed or removed:
+ 1. Removed `Google_Signer_P12`
+ 1. Removed `Google_Verifier_Pem`
+ 1. Removed `Google_Auth_LoginTicket` (see below)
+ - The following classes and methods have been removed in favor of [`google/auth`][Google Auth]:
+ 1. Removed methods `Google_Client::getAuth` and `Google_Client::setAuth`
+ 1. Removed `Google_Auth_Abstract`
+ - `Google_Auth_Abstract::sign` and `Google_Auth_Abstract::authenticatedRequest` have been
+ replaced by `Google_Client::authorize`. See the above examples for more details.
+ 1. Removed `Google_Auth_AppIdentity`. This is now supported in [`google/auth`][Google Auth AppIdentity]
+ and is used automatically when `Google_Client::useApplicationDefaultCredentials` is called.
+ 1. Removed `Google_Auth_AssertionCredentials`. Use `Google_Client::setAuthConfig` instead.
+ 1. Removed `Google_Auth_ComputeEngine`. This is now supported in
+ [`google/auth`][Google Auth GCE], and is used automatically when
+ `Google_Client::useApplicationDefaultCredentials` is called.
+ 1. Removed `Google_Auth_Exception`
+ 1. Removed `Google_Auth_LoginTicket`. Calls to `Google_Client::verifyIdToken` now returns
+ the payload of the ID Token as an array if the verification is successful.
+ 1. Removed `Google_Auth_OAuth2`. This functionality is now supported in [`google/auth`][Google Auth OAuth2] and wrapped in `Google_Client`. These changes will only affect applications calling `Google_Client::getAuth`,
+ as the methods on `Google_Client` have not changed.
+ 1. Removed `Google_Auth_Simple`. This is now supported in [`google/auth`][Google Auth Simple]
+ and is used automatically when `Google_Client::setDeveloperKey` is called.
+ - `Google_Client::sign` has been replaced by `Google_Client::authorize`. This function
+ now takes a `GuzzleHttp\ClientInterface` object and uses the following decision tree for
+ authentication:
+ 1. Uses Application Default Credentials when
+ `Google_Client::useApplicationDefaultCredentials` is called
+ - Looks for `GOOGLE_APPLICATION_CREDENTIALS` environment variable if set
+ - Looks in `~/.config/gcloud/application_default_credentials.json`
+ - Otherwise, uses `GCECredentials`
+ 1. Uses API Key if set (see `Client::setDeveloperKey`)
+ 1. Uses Access Token if set (call `Client::setAccessToken`)
+ 1. Automatically refreshes access tokens if one is set and the access token is expired
+ - Removed `Google_Config`
+ - Removed `Google_Utils`
+ - [`PSR-6`][PSR 6] cache is used for all caching. As a result:
+ 1. Removed `Google_Cache_Abstract`
+ 1. Classes `Google_Cache_Apc`, `Google_Cache_File`, `Google_Cache_Memcache`, and
+ `Google_Cache_Null` now implement `Google\Auth\CacheInterface`.
+ 1. Google Auth provides simple [caching utilities][Google Auth Cache] which
+ are used by default unless you provide alternatives.
+ - Removed `$boundary` constructor argument for `Google_Http_MediaFileUpload`
+
+[PSR 3]: https://www.php-fig.org/psr/psr-3/
+[PSR 6]: https://www.php-fig.org/psr/psr-6/
+[Guzzle 5]: https://github.com/guzzle/guzzle
+[Guzzle 6]: http://docs.guzzlephp.org/en/latest/psr7.html
+[Monolog]: https://github.com/Seldaek/monolog
+[Google Auth]: https://github.com/google/google-auth-library-php
+[Google Auth Cache]: https://github.com/googleapis/google-auth-library-php/tree/master/src/Cache
+[Google Auth GCE]: https://github.com/google/google-auth-library-php/blob/master/src/GCECredentials.php
+[Google Auth OAuth2]: https://github.com/google/google-auth-library-php/blob/master/src/OAuth2.php
+[Google Auth Simple]: https://github.com/google/google-auth-library-php/blob/master/src/Simple.php
+[Google Auth AppIdentity]: https://github.com/google/google-auth-library-php/blob/master/src/AppIdentityCredentials.php
+[Firebase JWT]: https://github.com/firebase/php-jwt
diff --git a/lib/Google/composer.json b/lib/Google/composer.json
index 461fdaae7..c646bcd68 100644
--- a/lib/Google/composer.json
+++ b/lib/Google/composer.json
@@ -8,23 +8,24 @@
"require": {
"php": "^7.4|^8.0",
"google/auth": "^1.28",
- "google/cloud-core": "^1.51.2",
- "google/cloud-storage": "^1.31.2",
"firebase/php-jwt": "~6.0",
"monolog/monolog": "^2.9||^3.0",
- "phpseclib/phpseclib": "^3.0.2",
+ "phpseclib/phpseclib": "^3.0.19",
"guzzlehttp/guzzle": "~6.5||~7.0",
- "guzzlehttp/psr7": "^1.8.4||^2.2.1"
+ "guzzlehttp/psr7": "^1.8.4||^2.2.1",
+ "google/cloud-storage": "^1.34",
+ "google/cloud-core": "^1.52",
+ "google/apiclient-services": "^0.323.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.0",
"symfony/dom-crawler": "~2.1",
"symfony/css-selector": "~2.1",
- "cache/filesystem-adapter": "^1.1",
"phpcompatibility/php-compatibility": "^9.2",
"composer/composer": "^1.10.22",
"phpspec/prophecy-phpunit": "^2.0",
- "phpunit/phpunit": "^9.5"
+ "phpunit/phpunit": "^9.5",
+ "cache/filesystem-adapter": "^1.2"
},
"suggest": {
"cache/filesystem-adapter": "For caching certs and tokens (using Google\\Client::setCache)"
@@ -40,7 +41,13 @@
"src/aliases.php"
]
},
+ "scripts": {
+ "pre-autoload-dump": "Google\\Task\\Composer::cleanup"
+ },
"extra": {
+ "google/apiclient-services": [
+ "Storage"
+ ],
"branch-alias": {
"dev-main": "2.x-dev"
}
diff --git a/lib/Google/composer.lock b/lib/Google/composer.lock
index c80636154..cb62414bb 100644
--- a/lib/Google/composer.lock
+++ b/lib/Google/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "d23c27e8eca497813f44feccf80aae06",
+ "content-hash": "a24978434a3e0a329346faa11f43a9d9",
"packages": [
{
"name": "brick/math",
@@ -49,6 +49,10 @@
"brick",
"math"
],
+ "support": {
+ "issues": "https://github.com/brick/math/issues",
+ "source": "https://github.com/brick/math/tree/0.11.0"
+ },
"funding": [
{
"url": "https://github.com/BenMorel",
@@ -59,16 +63,16 @@
},
{
"name": "firebase/php-jwt",
- "version": "v6.5.0",
+ "version": "v6.9.0",
"source": {
"type": "git",
"url": "https://github.com/firebase/php-jwt.git",
- "reference": "e94e7353302b0c11ec3cfff7180cd0b1743975d2"
+ "reference": "f03270e63eaccf3019ef0f32849c497385774e11"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/firebase/php-jwt/zipball/e94e7353302b0c11ec3cfff7180cd0b1743975d2",
- "reference": "e94e7353302b0c11ec3cfff7180cd0b1743975d2",
+ "url": "https://api.github.com/repos/firebase/php-jwt/zipball/f03270e63eaccf3019ef0f32849c497385774e11",
+ "reference": "f03270e63eaccf3019ef0f32849c497385774e11",
"shasum": ""
},
"require": {
@@ -114,20 +118,68 @@
"jwt",
"php"
],
- "time": "2023-05-12T15:47:07+00:00"
+ "support": {
+ "issues": "https://github.com/firebase/php-jwt/issues",
+ "source": "https://github.com/firebase/php-jwt/tree/v6.9.0"
+ },
+ "time": "2023-10-05T00:24:42+00:00"
+ },
+ {
+ "name": "google/apiclient-services",
+ "version": "v0.323.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/googleapis/google-api-php-client-services.git",
+ "reference": "d5497d30ddfafe7592102ca48bedaf222a4ca7a6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/d5497d30ddfafe7592102ca48bedaf222a4ca7a6",
+ "reference": "d5497d30ddfafe7592102ca48bedaf222a4ca7a6",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4||^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7||^8.5.13"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "autoload.php"
+ ],
+ "psr-4": {
+ "Google\\Service\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "description": "Client library for Google APIs",
+ "homepage": "http://developers.google.com/api-client-library/php",
+ "keywords": [
+ "google"
+ ],
+ "support": {
+ "issues": "https://github.com/googleapis/google-api-php-client-services/issues",
+ "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.323.0"
+ },
+ "time": "2023-11-06T01:08:38+00:00"
},
{
"name": "google/auth",
- "version": "v1.28.0",
+ "version": "v1.32.1",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-auth-library-php.git",
- "reference": "07f7f6305f1b7df32b2acf6e101c1225c839c7ac"
+ "reference": "999e9ce8b9d17914f04e1718271a0a46da4de2f3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/07f7f6305f1b7df32b2acf6e101c1225c839c7ac",
- "reference": "07f7f6305f1b7df32b2acf6e101c1225c839c7ac",
+ "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/999e9ce8b9d17914f04e1718271a0a46da4de2f3",
+ "reference": "999e9ce8b9d17914f04e1718271a0a46da4de2f3",
"shasum": ""
},
"require": {
@@ -139,8 +191,8 @@
"psr/http-message": "^1.1||^2.0"
},
"require-dev": {
- "guzzlehttp/promises": "^1.3",
- "kelvinmo/simplejwt": "0.7.0",
+ "guzzlehttp/promises": "^2.0",
+ "kelvinmo/simplejwt": "0.7.1",
"phpseclib/phpseclib": "^3.0",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.0.0",
@@ -167,36 +219,41 @@
"google",
"oauth2"
],
- "time": "2023-05-11T21:58:18+00:00"
+ "support": {
+ "docs": "https://googleapis.github.io/google-auth-library-php/main/",
+ "issues": "https://github.com/googleapis/google-auth-library-php/issues",
+ "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.32.1"
+ },
+ "time": "2023-10-17T21:13:22+00:00"
},
{
"name": "google/cloud-core",
- "version": "v1.51.2",
+ "version": "v1.52.8",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-cloud-php-core.git",
- "reference": "85dc48d62143f4bbfaa34c24da95003371de7b79"
+ "reference": "2ebcaa410f7e92dca5677dd9cc4ec1f9f315e83c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/85dc48d62143f4bbfaa34c24da95003371de7b79",
- "reference": "85dc48d62143f4bbfaa34c24da95003371de7b79",
+ "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/2ebcaa410f7e92dca5677dd9cc4ec1f9f315e83c",
+ "reference": "2ebcaa410f7e92dca5677dd9cc4ec1f9f315e83c",
"shasum": ""
},
"require": {
"google/auth": "^1.18",
- "guzzlehttp/guzzle": "^5.3|^6.5.7|^7.4.4",
- "guzzlehttp/promises": "^1.3",
+ "guzzlehttp/guzzle": "^6.5.8|^7.4.4",
+ "guzzlehttp/promises": "^1.4||^2.0",
"guzzlehttp/psr7": "^1.7|^2.0",
"monolog/monolog": "^1.1|^2.0|^3.0",
"php": ">=7.4",
- "psr/http-message": "^1.0",
+ "psr/http-message": "^1.0|^2.0",
"rize/uri-template": "~0.3"
},
"require-dev": {
"erusev/parsedown": "^1.6",
"google/cloud-common-protos": "^0.4",
- "google/gax": "^1.9",
+ "google/gax": "^1.24.0",
"opis/closure": "^3",
"phpdocumentor/reflection": "^5.0",
"phpspec/prophecy-phpunit": "^2.0",
@@ -229,25 +286,27 @@
"Apache-2.0"
],
"description": "Google Cloud PHP shared dependency, providing functionality useful to all components.",
- "time": "2023-05-05T23:01:42+00:00"
+ "support": {
+ "source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.52.8"
+ },
+ "time": "2023-11-02T19:15:44+00:00"
},
{
"name": "google/cloud-storage",
- "version": "v1.31.2",
+ "version": "v1.34.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-cloud-php-storage.git",
- "reference": "7fe96d56856cda550b21779bb95a066b264852da"
+ "reference": "4589dd3c8f4171db4ce3eb335fc7d894661ca0e9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-cloud-php-storage/zipball/7fe96d56856cda550b21779bb95a066b264852da",
- "reference": "7fe96d56856cda550b21779bb95a066b264852da",
+ "url": "https://api.github.com/repos/googleapis/google-cloud-php-storage/zipball/4589dd3c8f4171db4ce3eb335fc7d894661ca0e9",
+ "reference": "4589dd3c8f4171db4ce3eb335fc7d894661ca0e9",
"shasum": ""
},
"require": {
- "google/cloud-core": "^1.51.1",
- "google/crc32": "^0.2.0",
+ "google/cloud-core": "^1.52.7",
"php": ">=7.4",
"ramsey/uuid": "^4.2.3"
},
@@ -283,67 +342,29 @@
"Apache-2.0"
],
"description": "Cloud Storage Client for PHP",
- "time": "2023-05-05T23:01:42+00:00"
- },
- {
- "name": "google/crc32",
- "version": "v0.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/google/php-crc32.git",
- "reference": "948f7945d803dcc1a375152c72f63144c2dadf23"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/google/php-crc32/zipball/948f7945d803dcc1a375152c72f63144c2dadf23",
- "reference": "948f7945d803dcc1a375152c72f63144c2dadf23",
- "shasum": ""
- },
- "require": {
- "php": ">=7.4"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "v3.15",
- "phpunit/phpunit": "^9"
+ "support": {
+ "source": "https://github.com/googleapis/google-cloud-php-storage/tree/v1.34.0"
},
- "type": "library",
- "autoload": {
- "psr-4": {
- "Google\\CRC32\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "Andrew Brampton",
- "email": "bramp@google.com"
- }
- ],
- "description": "Various CRC32 implementations",
- "homepage": "https://github.com/google/php-crc32",
- "time": "2023-04-16T22:44:57+00:00"
+ "time": "2023-11-02T19:15:44+00:00"
},
{
"name": "guzzlehttp/guzzle",
- "version": "7.7.0",
+ "version": "7.8.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5"
+ "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5",
- "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9",
+ "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9",
"shasum": ""
},
"require": {
"ext-json": "*",
- "guzzlehttp/promises": "^1.5.3 || ^2.0",
- "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
+ "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
+ "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
"php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0"
@@ -432,6 +453,10 @@
"rest",
"web service"
],
+ "support": {
+ "issues": "https://github.com/guzzle/guzzle/issues",
+ "source": "https://github.com/guzzle/guzzle/tree/7.8.0"
+ },
"funding": [
{
"url": "https://github.com/GrahamCampbell",
@@ -446,33 +471,37 @@
"type": "tidelift"
}
],
- "time": "2023-05-21T14:04:53+00:00"
+ "time": "2023-08-27T10:20:53+00:00"
},
{
"name": "guzzlehttp/promises",
- "version": "1.5.3",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e"
+ "reference": "111166291a0f8130081195ac4556a5587d7f1b5d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e",
- "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d",
+ "reference": "111166291a0f8130081195ac4556a5587d7f1b5d",
"shasum": ""
},
"require": {
- "php": ">=5.5"
+ "php": "^7.2.5 || ^8.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "^4.4 || ^5.1"
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23"
},
"type": "library",
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
"autoload": {
- "files": [
- "src/functions_include.php"
- ],
"psr-4": {
"GuzzleHttp\\Promise\\": "src/"
}
@@ -507,6 +536,10 @@
"keywords": [
"promise"
],
+ "support": {
+ "issues": "https://github.com/guzzle/promises/issues",
+ "source": "https://github.com/guzzle/promises/tree/2.0.1"
+ },
"funding": [
{
"url": "https://github.com/GrahamCampbell",
@@ -521,20 +554,20 @@
"type": "tidelift"
}
],
- "time": "2023-05-21T12:31:43+00:00"
+ "time": "2023-08-03T15:11:55+00:00"
},
{
"name": "guzzlehttp/psr7",
- "version": "2.5.0",
+ "version": "2.6.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "b635f279edd83fc275f822a1188157ffea568ff6"
+ "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6",
- "reference": "b635f279edd83fc275f822a1188157ffea568ff6",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727",
+ "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727",
"shasum": ""
},
"require": {
@@ -619,6 +652,10 @@
"uri",
"url"
],
+ "support": {
+ "issues": "https://github.com/guzzle/psr7/issues",
+ "source": "https://github.com/guzzle/psr7/tree/2.6.1"
+ },
"funding": [
{
"url": "https://github.com/GrahamCampbell",
@@ -633,20 +670,20 @@
"type": "tidelift"
}
],
- "time": "2023-04-17T16:11:26+00:00"
+ "time": "2023-08-27T10:13:57+00:00"
},
{
"name": "monolog/monolog",
- "version": "2.9.1",
+ "version": "2.9.2",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
- "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1"
+ "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
- "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/437cb3628f4cf6042cc10ae97fc2b8472e48ca1f",
+ "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f",
"shasum": ""
},
"require": {
@@ -721,6 +758,10 @@
"logging",
"psr-3"
],
+ "support": {
+ "issues": "https://github.com/Seldaek/monolog/issues",
+ "source": "https://github.com/Seldaek/monolog/tree/2.9.2"
+ },
"funding": [
{
"url": "https://github.com/Seldaek",
@@ -731,7 +772,7 @@
"type": "tidelift"
}
],
- "time": "2023-02-06T13:44:46+00:00"
+ "time": "2023-10-27T15:25:26+00:00"
},
{
"name": "paragonie/constant_time_encoding",
@@ -793,6 +834,11 @@
"hex2bin",
"rfc4648"
],
+ "support": {
+ "email": "info@paragonie.com",
+ "issues": "https://github.com/paragonie/constant_time_encoding/issues",
+ "source": "https://github.com/paragonie/constant_time_encoding"
+ },
"time": "2022-06-14T06:56:20+00:00"
},
{
@@ -838,20 +884,25 @@
"pseudorandom",
"random"
],
+ "support": {
+ "email": "info@paragonie.com",
+ "issues": "https://github.com/paragonie/random_compat/issues",
+ "source": "https://github.com/paragonie/random_compat"
+ },
"time": "2020-10-15T08:29:30+00:00"
},
{
"name": "phpseclib/phpseclib",
- "version": "3.0.19",
+ "version": "3.0.33",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
- "reference": "cc181005cf548bfd8a4896383bb825d859259f95"
+ "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cc181005cf548bfd8a4896383bb825d859259f95",
- "reference": "cc181005cf548bfd8a4896383bb825d859259f95",
+ "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/33fa69b2514a61138dd48e7a49f99445711e0ad0",
+ "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0",
"shasum": ""
},
"require": {
@@ -930,6 +981,10 @@
"x.509",
"x509"
],
+ "support": {
+ "issues": "https://github.com/phpseclib/phpseclib/issues",
+ "source": "https://github.com/phpseclib/phpseclib/tree/3.0.33"
+ },
"funding": [
{
"url": "https://github.com/terrafrost",
@@ -944,7 +999,7 @@
"type": "tidelift"
}
],
- "time": "2023-03-05T17:13:09+00:00"
+ "time": "2023-10-21T14:00:39+00:00"
},
{
"name": "psr/cache",
@@ -990,20 +1045,23 @@
"psr",
"psr-6"
],
+ "support": {
+ "source": "https://github.com/php-fig/cache/tree/2.0.0"
+ },
"time": "2021-02-03T23:23:37+00:00"
},
{
"name": "psr/http-client",
- "version": "1.0.2",
+ "version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-client.git",
- "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31"
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31",
- "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31",
+ "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
"shasum": ""
},
"require": {
@@ -1039,7 +1097,10 @@
"psr",
"psr-18"
],
- "time": "2023-04-10T20:12:12+00:00"
+ "support": {
+ "source": "https://github.com/php-fig/http-client"
+ },
+ "time": "2023-09-23T14:17:50+00:00"
},
{
"name": "psr/http-factory",
@@ -1091,20 +1152,23 @@
"request",
"response"
],
+ "support": {
+ "source": "https://github.com/php-fig/http-factory/tree/1.0.2"
+ },
"time": "2023-04-10T20:10:41+00:00"
},
{
"name": "psr/http-message",
- "version": "1.1",
+ "version": "2.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
- "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
+ "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
- "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
+ "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
"shasum": ""
},
"require": {
@@ -1113,7 +1177,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -1128,7 +1192,7 @@
"authors": [
{
"name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
@@ -1141,7 +1205,10 @@
"request",
"response"
],
- "time": "2023-04-04T09:50:52+00:00"
+ "support": {
+ "source": "https://github.com/php-fig/http-message/tree/2.0"
+ },
+ "time": "2023-04-04T09:54:51+00:00"
},
{
"name": "psr/log",
@@ -1188,6 +1255,9 @@
"psr",
"psr-3"
],
+ "support": {
+ "source": "https://github.com/php-fig/log/tree/1.1.4"
+ },
"time": "2021-05-03T11:20:27+00:00"
},
{
@@ -1228,24 +1298,29 @@
}
],
"description": "A polyfill for getallheaders.",
+ "support": {
+ "issues": "https://github.com/ralouphie/getallheaders/issues",
+ "source": "https://github.com/ralouphie/getallheaders/tree/develop"
+ },
"time": "2019-03-08T08:55:37+00:00"
},
{
"name": "ramsey/collection",
- "version": "2.0.0",
+ "version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/ramsey/collection.git",
- "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5"
+ "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
- "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
+ "url": "https://api.github.com/repos/ramsey/collection/zipball/ad7475d1c9e70b190ecffc58f2d989416af339b4",
+ "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4",
"shasum": ""
},
"require": {
- "php": "^8.1"
+ "php": "^7.4 || ^8.0",
+ "symfony/polyfill-php81": "^1.23"
},
"require-dev": {
"captainhook/plugin-composer": "^5.3",
@@ -1303,6 +1378,10 @@
"queue",
"set"
],
+ "support": {
+ "issues": "https://github.com/ramsey/collection/issues",
+ "source": "https://github.com/ramsey/collection/tree/1.3.0"
+ },
"funding": [
{
"url": "https://github.com/ramsey",
@@ -1313,7 +1392,7 @@
"type": "tidelift"
}
],
- "time": "2022-12-31T21:50:55+00:00"
+ "time": "2022-12-27T19:12:24+00:00"
},
{
"name": "ramsey/uuid",
@@ -1391,6 +1470,10 @@
"identifier",
"uuid"
],
+ "support": {
+ "issues": "https://github.com/ramsey/uuid/issues",
+ "source": "https://github.com/ramsey/uuid/tree/4.7.4"
+ },
"funding": [
{
"url": "https://github.com/ramsey",
@@ -1445,6 +1528,10 @@
"template",
"uri"
],
+ "support": {
+ "issues": "https://github.com/rize/UriTemplate/issues",
+ "source": "https://github.com/rize/UriTemplate/tree/0.3.5"
+ },
"funding": [
{
"url": "https://www.paypal.me/rezigned",
@@ -1463,25 +1550,25 @@
},
{
"name": "symfony/deprecation-contracts",
- "version": "v3.2.1",
+ "version": "v3.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
- "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e"
+ "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e",
- "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
+ "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
"shasum": ""
},
"require": {
- "php": ">=8.1"
+ "php": ">=8.0.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "3.3-dev"
+ "dev-main": "3.0-dev"
},
"thanks": {
"name": "symfony/contracts",
@@ -1509,6 +1596,9 @@
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -1523,7 +1613,86 @@
"type": "tidelift"
}
],
- "time": "2023-03-01T10:25:55+00:00"
+ "time": "2022-01-02T09:55:41+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php81",
+ "version": "v1.28.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php81.git",
+ "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b",
+ "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php81\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-01-26T09:26:14+00:00"
}
],
"packages-dev": [
@@ -1586,6 +1755,9 @@
"psr-6",
"tag"
],
+ "support": {
+ "source": "https://github.com/php-cache/adapter-common/tree/1.3.0"
+ },
"time": "2022-01-15T15:47:19+00:00"
},
{
@@ -1655,6 +1827,9 @@
"psr-6",
"tag"
],
+ "support": {
+ "source": "https://github.com/php-cache/filesystem-adapter/tree/1.2.0"
+ },
"time": "2022-01-15T15:47:19+00:00"
},
{
@@ -1710,20 +1885,24 @@
"psr6",
"tag"
],
+ "support": {
+ "issues": "https://github.com/php-cache/tag-interop/issues",
+ "source": "https://github.com/php-cache/tag-interop/tree/1.1.0"
+ },
"time": "2021-12-31T10:03:23+00:00"
},
{
"name": "composer/ca-bundle",
- "version": "1.3.5",
+ "version": "1.3.7",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
- "reference": "74780ccf8c19d6acb8d65c5f39cd72110e132bbd"
+ "reference": "76e46335014860eec1aa5a724799a00a2e47cc85"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/ca-bundle/zipball/74780ccf8c19d6acb8d65c5f39cd72110e132bbd",
- "reference": "74780ccf8c19d6acb8d65c5f39cd72110e132bbd",
+ "url": "https://api.github.com/repos/composer/ca-bundle/zipball/76e46335014860eec1aa5a724799a00a2e47cc85",
+ "reference": "76e46335014860eec1aa5a724799a00a2e47cc85",
"shasum": ""
},
"require": {
@@ -1767,6 +1946,11 @@
"ssl",
"tls"
],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/ca-bundle/issues",
+ "source": "https://github.com/composer/ca-bundle/tree/1.3.7"
+ },
"funding": [
{
"url": "https://packagist.com",
@@ -1781,20 +1965,20 @@
"type": "tidelift"
}
],
- "time": "2023-01-11T08:27:00+00:00"
+ "time": "2023-08-30T09:31:38+00:00"
},
{
"name": "composer/composer",
- "version": "1.10.26",
+ "version": "1.10.27",
"source": {
"type": "git",
"url": "https://github.com/composer/composer.git",
- "reference": "3e196135eacf9e519a6b00986bc6fe6aff977997"
+ "reference": "f8f49191eec76f039b466aa1f161406fe43aff50"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/composer/zipball/3e196135eacf9e519a6b00986bc6fe6aff977997",
- "reference": "3e196135eacf9e519a6b00986bc6fe6aff977997",
+ "url": "https://api.github.com/repos/composer/composer/zipball/f8f49191eec76f039b466aa1f161406fe43aff50",
+ "reference": "f8f49191eec76f039b466aa1f161406fe43aff50",
"shasum": ""
},
"require": {
@@ -1861,6 +2045,11 @@
"dependency",
"package"
],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/composer/issues",
+ "source": "https://github.com/composer/composer/tree/1.10.27"
+ },
"funding": [
{
"url": "https://packagist.com",
@@ -1875,7 +2064,7 @@
"type": "tidelift"
}
],
- "time": "2022-04-13T14:39:56+00:00"
+ "time": "2023-09-29T08:50:23+00:00"
},
{
"name": "composer/semver",
@@ -1936,6 +2125,11 @@
"validation",
"versioning"
],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/semver/issues",
+ "source": "https://github.com/composer/semver/tree/1.7.2"
+ },
"funding": [
{
"url": "https://packagist.com",
@@ -2011,6 +2205,11 @@
"spdx",
"validator"
],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/spdx-licenses/issues",
+ "source": "https://github.com/composer/spdx-licenses/tree/1.5.7"
+ },
"funding": [
{
"url": "https://packagist.com",
@@ -2070,6 +2269,11 @@
"Xdebug",
"performance"
],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/xdebug-handler/issues",
+ "source": "https://github.com/composer/xdebug-handler/tree/1.4.6"
+ },
"funding": [
{
"url": "https://packagist.com",
@@ -2088,25 +2292,29 @@
},
{
"name": "doctrine/deprecations",
- "version": "v1.0.0",
+ "version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/deprecations.git",
- "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de"
+ "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de",
- "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de",
+ "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
+ "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
"shasum": ""
},
"require": {
- "php": "^7.1|^8.0"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^9",
- "phpunit/phpunit": "^7.5|^8.5|^9.5",
- "psr/log": "^1|^2|^3"
+ "phpstan/phpstan": "1.4.10 || 1.10.15",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
+ "psalm/plugin-phpunit": "0.18.4",
+ "psr/log": "^1 || ^2 || ^3",
+ "vimeo/psalm": "4.30.0 || 5.12.0"
},
"suggest": {
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
@@ -2123,34 +2331,38 @@
],
"description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.",
"homepage": "https://www.doctrine-project.org/",
- "time": "2022-05-02T15:47:09+00:00"
+ "support": {
+ "issues": "https://github.com/doctrine/deprecations/issues",
+ "source": "https://github.com/doctrine/deprecations/tree/1.1.2"
+ },
+ "time": "2023-09-27T20:04:15+00:00"
},
{
"name": "doctrine/instantiator",
- "version": "2.0.0",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
+ "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
- "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
+ "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
"shasum": ""
},
"require": {
- "php": "^8.1"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
- "doctrine/coding-standard": "^11",
+ "doctrine/coding-standard": "^9 || ^11",
"ext-pdo": "*",
"ext-phar": "*",
- "phpbench/phpbench": "^1.2",
- "phpstan/phpstan": "^1.9.4",
- "phpstan/phpstan-phpunit": "^1.3",
- "phpunit/phpunit": "^9.5.27",
- "vimeo/psalm": "^5.4"
+ "phpbench/phpbench": "^0.16 || ^1",
+ "phpstan/phpstan": "^1.4",
+ "phpstan/phpstan-phpunit": "^1",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
+ "vimeo/psalm": "^4.30 || ^5.4"
},
"type": "library",
"autoload": {
@@ -2175,6 +2387,10 @@
"constructor",
"instantiate"
],
+ "support": {
+ "issues": "https://github.com/doctrine/instantiator/issues",
+ "source": "https://github.com/doctrine/instantiator/tree/1.5.0"
+ },
"funding": [
{
"url": "https://www.doctrine-project.org/sponsorship.html",
@@ -2189,20 +2405,20 @@
"type": "tidelift"
}
],
- "time": "2022-12-30T00:23:10+00:00"
+ "time": "2022-12-30T00:15:36+00:00"
},
{
"name": "justinrainbow/json-schema",
- "version": "5.2.12",
+ "version": "v5.2.13",
"source": {
"type": "git",
"url": "https://github.com/justinrainbow/json-schema.git",
- "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60"
+ "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60",
- "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60",
+ "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793",
+ "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793",
"shasum": ""
},
"require": {
@@ -2255,7 +2471,11 @@
"json",
"schema"
],
- "time": "2022-04-13T08:02:27+00:00"
+ "support": {
+ "issues": "https://github.com/justinrainbow/json-schema/issues",
+ "source": "https://github.com/justinrainbow/json-schema/tree/v5.2.13"
+ },
+ "time": "2023-09-26T02:20:38+00:00"
},
{
"name": "league/flysystem",
@@ -2339,6 +2559,10 @@
"sftp",
"storage"
],
+ "support": {
+ "issues": "https://github.com/thephpleague/flysystem/issues",
+ "source": "https://github.com/thephpleague/flysystem/tree/1.1.10"
+ },
"funding": [
{
"url": "https://offset.earth/frankdejonge",
@@ -2349,26 +2573,26 @@
},
{
"name": "league/mime-type-detection",
- "version": "1.11.0",
+ "version": "1.14.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/mime-type-detection.git",
- "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
+ "reference": "b6a5854368533df0295c5761a0253656a2e52d9e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
- "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
+ "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/b6a5854368533df0295c5761a0253656a2e52d9e",
+ "reference": "b6a5854368533df0295c5761a0253656a2e52d9e",
"shasum": ""
},
"require": {
"ext-fileinfo": "*",
- "php": "^7.2 || ^8.0"
+ "php": "^7.4 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.2",
"phpstan/phpstan": "^0.12.68",
- "phpunit/phpunit": "^8.5.8 || ^9.3"
+ "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0"
},
"type": "library",
"autoload": {
@@ -2387,6 +2611,10 @@
}
],
"description": "Mime-type detection for Flysystem",
+ "support": {
+ "issues": "https://github.com/thephpleague/mime-type-detection/issues",
+ "source": "https://github.com/thephpleague/mime-type-detection/tree/1.14.0"
+ },
"funding": [
{
"url": "https://github.com/frankdejonge",
@@ -2397,7 +2625,7 @@
"type": "tidelift"
}
],
- "time": "2022-04-17T13:12:02+00:00"
+ "time": "2023-10-17T14:13:20+00:00"
},
{
"name": "myclabs/deep-copy",
@@ -2446,6 +2674,10 @@
"object",
"object graph"
],
+ "support": {
+ "issues": "https://github.com/myclabs/DeepCopy/issues",
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1"
+ },
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
@@ -2456,16 +2688,16 @@
},
{
"name": "nikic/php-parser",
- "version": "v4.15.5",
+ "version": "v4.17.1",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e"
+ "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e",
- "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
+ "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
"shasum": ""
},
"require": {
@@ -2504,7 +2736,11 @@
"parser",
"php"
],
- "time": "2023-05-19T20:20:00+00:00"
+ "support": {
+ "issues": "https://github.com/nikic/PHP-Parser/issues",
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1"
+ },
+ "time": "2023-08-13T19:53:39+00:00"
},
{
"name": "phar-io/manifest",
@@ -2560,6 +2796,10 @@
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
+ "support": {
+ "issues": "https://github.com/phar-io/manifest/issues",
+ "source": "https://github.com/phar-io/manifest/tree/2.0.3"
+ },
"time": "2021-07-20T11:28:43+00:00"
},
{
@@ -2607,6 +2847,10 @@
}
],
"description": "Library for handling version information and constraints",
+ "support": {
+ "issues": "https://github.com/phar-io/version/issues",
+ "source": "https://github.com/phar-io/version/tree/3.2.1"
+ },
"time": "2022-02-21T01:04:05+00:00"
},
{
@@ -2665,6 +2909,10 @@
"phpcs",
"standards"
],
+ "support": {
+ "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues",
+ "source": "https://github.com/PHPCompatibility/PHPCompatibility"
+ },
"time": "2019-12-27T09:44:58+00:00"
},
{
@@ -2714,6 +2962,10 @@
"reflection",
"static analysis"
],
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
+ },
"time": "2020-06-27T09:03:43+00:00"
},
{
@@ -2767,20 +3019,24 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
+ },
"time": "2021-10-19T17:43:47+00:00"
},
{
"name": "phpdocumentor/type-resolver",
- "version": "1.7.1",
+ "version": "1.7.3",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "dfc078e8af9c99210337325ff5aa152872c98714"
+ "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/dfc078e8af9c99210337325ff5aa152872c98714",
- "reference": "dfc078e8af9c99210337325ff5aa152872c98714",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419",
+ "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419",
"shasum": ""
},
"require": {
@@ -2821,7 +3077,11 @@
}
],
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
- "time": "2023-03-27T19:02:04+00:00"
+ "support": {
+ "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3"
+ },
+ "time": "2023-08-12T11:01:26+00:00"
},
{
"name": "phpspec/prophecy",
@@ -2885,6 +3145,10 @@
"spy",
"stub"
],
+ "support": {
+ "issues": "https://github.com/phpspec/prophecy/issues",
+ "source": "https://github.com/phpspec/prophecy/tree/v1.17.0"
+ },
"time": "2023-02-02T15:41:36+00:00"
},
{
@@ -2933,26 +3197,31 @@
"phpunit",
"prophecy"
],
+ "support": {
+ "issues": "https://github.com/phpspec/prophecy-phpunit/issues",
+ "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.0.2"
+ },
"time": "2023-04-18T11:58:05+00:00"
},
{
"name": "phpstan/phpdoc-parser",
- "version": "1.21.0",
+ "version": "1.24.2",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
- "reference": "6df62b08faef4f899772bc7c3bbabb93d2b7a21c"
+ "reference": "bcad8d995980440892759db0c32acae7c8e79442"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6df62b08faef4f899772bc7c3bbabb93d2b7a21c",
- "reference": "6df62b08faef4f899772bc7c3bbabb93d2b7a21c",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442",
+ "reference": "bcad8d995980440892759db0c32acae7c8e79442",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"require-dev": {
+ "doctrine/annotations": "^2.0",
"nikic/php-parser": "^4.15",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/extension-installer": "^1.0",
@@ -2975,20 +3244,24 @@
"MIT"
],
"description": "PHPDoc parser with support for nullable, intersection and generic types",
- "time": "2023-05-17T13:13:44+00:00"
+ "support": {
+ "issues": "https://github.com/phpstan/phpdoc-parser/issues",
+ "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2"
+ },
+ "time": "2023-09-26T12:28:12+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.26",
+ "version": "9.2.29",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1"
+ "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
- "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76",
+ "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76",
"shasum": ""
},
"require": {
@@ -3042,13 +3315,18 @@
"testing",
"xunit"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+ "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
- "time": "2023-03-06T12:58:08+00:00"
+ "time": "2023-09-19T04:57:46+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -3098,6 +3376,10 @@
"filesystem",
"iterator"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -3157,6 +3439,10 @@
"keywords": [
"process"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-invoker/issues",
+ "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -3212,6 +3498,10 @@
"keywords": [
"template"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -3267,6 +3557,10 @@
"keywords": [
"timer"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-timer/issues",
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -3277,16 +3571,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "9.6.8",
+ "version": "9.6.13",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e"
+ "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/17d621b3aff84d0c8b62539e269e87d8d5baa76e",
- "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be",
+ "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be",
"shasum": ""
},
"require": {
@@ -3301,7 +3595,7 @@
"phar-io/manifest": "^2.0.3",
"phar-io/version": "^3.0.2",
"php": ">=7.3",
- "phpunit/php-code-coverage": "^9.2.13",
+ "phpunit/php-code-coverage": "^9.2.28",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-invoker": "^3.1.1",
"phpunit/php-text-template": "^2.0.3",
@@ -3357,6 +3651,11 @@
"testing",
"xunit"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+ "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13"
+ },
"funding": [
{
"url": "https://phpunit.de/sponsors.html",
@@ -3371,7 +3670,7 @@
"type": "tidelift"
}
],
- "time": "2023-05-11T05:14:45+00:00"
+ "time": "2023-09-19T05:39:22+00:00"
},
{
"name": "psr/container",
@@ -3420,6 +3719,10 @@
"container-interop",
"psr"
],
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/2.0.2"
+ },
"time": "2021-11-05T16:47:00+00:00"
},
{
@@ -3468,6 +3771,9 @@
"psr-16",
"simple-cache"
],
+ "support": {
+ "source": "https://github.com/php-fig/simple-cache/tree/master"
+ },
"time": "2017-10-23T01:57:42+00:00"
},
{
@@ -3514,6 +3820,10 @@
],
"description": "Library for parsing CLI options",
"homepage": "https://github.com/sebastianbergmann/cli-parser",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/cli-parser/issues",
+ "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -3566,6 +3876,10 @@
],
"description": "Collection of value objects that represent the PHP code units",
"homepage": "https://github.com/sebastianbergmann/code-unit",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -3617,6 +3931,10 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -3687,6 +4005,10 @@
"compare",
"equality"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/comparator/issues",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -3740,6 +4062,10 @@
],
"description": "Library for calculating the complexity of PHP code units",
"homepage": "https://github.com/sebastianbergmann/complexity",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/complexity/issues",
+ "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -3802,6 +4128,10 @@
"unidiff",
"unified diff"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/diff/issues",
+ "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -3861,6 +4191,10 @@
"environment",
"hhvm"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/environment/issues",
+ "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -3934,6 +4268,10 @@
"export",
"exporter"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/exporter/issues",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -3944,16 +4282,16 @@
},
{
"name": "sebastian/global-state",
- "version": "5.0.5",
+ "version": "5.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
+ "reference": "bde739e7565280bda77be70044ac1047bc007e34"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
- "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34",
+ "reference": "bde739e7565280bda77be70044ac1047bc007e34",
"shasum": ""
},
"require": {
@@ -3994,13 +4332,17 @@
"keywords": [
"global state"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/global-state/issues",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
- "time": "2022-02-14T08:28:10+00:00"
+ "time": "2023-08-02T09:26:13+00:00"
},
{
"name": "sebastian/lines-of-code",
@@ -4047,6 +4389,10 @@
],
"description": "Library for counting the lines of code in PHP source code",
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
+ "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -4100,6 +4446,10 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -4151,6 +4501,10 @@
],
"description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-reflector/issues",
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -4210,6 +4564,10 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "https://github.com/sebastianbergmann/recursion-context",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -4261,6 +4619,10 @@
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/resource-operations/issues",
+ "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -4313,6 +4675,10 @@
],
"description": "Collection of value objects that represent the types of the PHP type system",
"homepage": "https://github.com/sebastianbergmann/type",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/type/issues",
+ "source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -4362,6 +4728,10 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/version/issues",
+ "source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
+ },
"funding": [
{
"url": "https://github.com/sebastianbergmann",
@@ -4418,6 +4788,10 @@
"parser",
"validator"
],
+ "support": {
+ "issues": "https://github.com/Seldaek/jsonlint/issues",
+ "source": "https://github.com/Seldaek/jsonlint/tree/1.10.0"
+ },
"funding": [
{
"url": "https://github.com/Seldaek",
@@ -4472,6 +4846,10 @@
"keywords": [
"phar"
],
+ "support": {
+ "issues": "https://github.com/Seldaek/phar-utils/issues",
+ "source": "https://github.com/Seldaek/phar-utils/tree/1.2.1"
+ },
"time": "2022-08-31T10:31:18+00:00"
},
{
@@ -4524,20 +4902,25 @@
"standards",
"static analysis"
],
+ "support": {
+ "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
+ "source": "https://github.com/squizlabs/PHP_CodeSniffer",
+ "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
+ },
"time": "2023-02-22T23:07:41+00:00"
},
{
"name": "symfony/console",
- "version": "v5.4.23",
+ "version": "v5.4.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c"
+ "reference": "f4f71842f24c2023b91237c72a365306f3c58827"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/90f21e27d0d88ce38720556dd164d4a1e4c3934c",
- "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c",
+ "url": "https://api.github.com/repos/symfony/console/zipball/f4f71842f24c2023b91237c72a365306f3c58827",
+ "reference": "f4f71842f24c2023b91237c72a365306f3c58827",
"shasum": ""
},
"require": {
@@ -4606,6 +4989,9 @@
"console",
"terminal"
],
+ "support": {
+ "source": "https://github.com/symfony/console/tree/v5.4.28"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -4620,7 +5006,7 @@
"type": "tidelift"
}
],
- "time": "2023-04-24T18:47:29+00:00"
+ "time": "2023-08-07T06:12:30+00:00"
},
{
"name": "symfony/css-selector",
@@ -4673,6 +5059,9 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/css-selector/tree/v2.8.52"
+ },
"time": "2018-11-11T11:18:13+00:00"
},
{
@@ -4730,20 +5119,23 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/dom-crawler/tree/v2.8.50"
+ },
"time": "2018-11-24T22:30:19+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v5.4.23",
+ "version": "v5.4.25",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5"
+ "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5",
- "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364",
+ "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364",
"shasum": ""
},
"require": {
@@ -4777,6 +5169,9 @@
],
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/filesystem/tree/v5.4.25"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -4791,20 +5186,20 @@
"type": "tidelift"
}
],
- "time": "2023-03-02T11:38:35+00:00"
+ "time": "2023-05-31T13:04:02+00:00"
},
{
"name": "symfony/finder",
- "version": "v5.4.21",
+ "version": "v5.4.27",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19"
+ "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19",
- "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d",
+ "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d",
"shasum": ""
},
"require": {
@@ -4837,6 +5232,9 @@
],
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/finder/tree/v5.4.27"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -4851,20 +5249,20 @@
"type": "tidelift"
}
],
- "time": "2023-02-16T09:33:00+00:00"
+ "time": "2023-07-31T08:02:31+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
+ "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
+ "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
"shasum": ""
},
"require": {
@@ -4879,7 +5277,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -4916,6 +5314,9 @@
"polyfill",
"portable"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -4930,20 +5331,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-intl-grapheme",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "511a08c03c1960e08a883f4cffcacd219b758354"
+ "reference": "875e90aeea2777b6f135677f618529449334a612"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354",
- "reference": "511a08c03c1960e08a883f4cffcacd219b758354",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612",
+ "reference": "875e90aeea2777b6f135677f618529449334a612",
"shasum": ""
},
"require": {
@@ -4955,7 +5356,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -4994,6 +5395,9 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -5008,20 +5412,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
- "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6"
+ "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6",
- "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
+ "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
"shasum": ""
},
"require": {
@@ -5033,7 +5437,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -5075,6 +5479,9 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -5089,20 +5496,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
+ "reference": "42292d99c55abe617799667f454222c54c60e229"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
+ "reference": "42292d99c55abe617799667f454222c54c60e229",
"shasum": ""
},
"require": {
@@ -5117,7 +5524,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -5155,6 +5562,9 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -5169,20 +5579,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-07-28T09:04:16+00:00"
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9"
+ "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
- "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5",
+ "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5",
"shasum": ""
},
"require": {
@@ -5191,7 +5601,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -5231,6 +5641,9 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -5245,20 +5658,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
"shasum": ""
},
"require": {
@@ -5267,7 +5680,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -5311,6 +5724,9 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -5325,20 +5741,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/process",
- "version": "v5.4.23",
+ "version": "v5.4.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "4b842fc4b61609e0a155a114082bd94e31e98287"
+ "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/4b842fc4b61609e0a155a114082bd94e31e98287",
- "reference": "4b842fc4b61609e0a155a114082bd94e31e98287",
+ "url": "https://api.github.com/repos/symfony/process/zipball/45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b",
+ "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b",
"shasum": ""
},
"require": {
@@ -5370,6 +5786,9 @@
],
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/process/tree/v5.4.28"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -5384,24 +5803,24 @@
"type": "tidelift"
}
],
- "time": "2023-04-18T13:50:24+00:00"
+ "time": "2023-08-07T10:36:04+00:00"
},
{
"name": "symfony/service-contracts",
- "version": "v3.2.1",
+ "version": "v3.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
- "reference": "a8c9cedf55f314f3a186041d19537303766df09a"
+ "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a",
- "reference": "a8c9cedf55f314f3a186041d19537303766df09a",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d78d39c1599bd1188b8e26bb341da52c3c6d8a66",
+ "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66",
"shasum": ""
},
"require": {
- "php": ">=8.1",
+ "php": ">=8.0.2",
"psr/container": "^2.0"
},
"conflict": {
@@ -5413,7 +5832,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "3.3-dev"
+ "dev-main": "3.0-dev"
},
"thanks": {
"name": "symfony/contracts",
@@ -5423,10 +5842,7 @@
"autoload": {
"psr-4": {
"Symfony\\Contracts\\Service\\": ""
- },
- "exclude-from-classmap": [
- "/Test/"
- ]
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -5452,6 +5868,9 @@
"interoperability",
"standards"
],
+ "support": {
+ "source": "https://github.com/symfony/service-contracts/tree/v3.0.2"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -5466,24 +5885,24 @@
"type": "tidelift"
}
],
- "time": "2023-03-01T10:32:47+00:00"
+ "time": "2022-05-30T19:17:58+00:00"
},
{
"name": "symfony/string",
- "version": "v6.2.8",
+ "version": "v6.0.19",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef"
+ "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef",
- "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef",
+ "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a",
+ "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a",
"shasum": ""
},
"require": {
- "php": ">=8.1",
+ "php": ">=8.0.2",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-grapheme": "~1.0",
"symfony/polyfill-intl-normalizer": "~1.0",
@@ -5495,7 +5914,6 @@
"require-dev": {
"symfony/error-handler": "^5.4|^6.0",
"symfony/http-client": "^5.4|^6.0",
- "symfony/intl": "^6.2",
"symfony/translation-contracts": "^2.0|^3.0",
"symfony/var-exporter": "^5.4|^6.0"
},
@@ -5535,6 +5953,9 @@
"utf-8",
"utf8"
],
+ "support": {
+ "source": "https://github.com/symfony/string/tree/v6.0.19"
+ },
"funding": [
{
"url": "https://symfony.com/sponsor",
@@ -5549,7 +5970,7 @@
"type": "tidelift"
}
],
- "time": "2023-03-20T16:06:02+00:00"
+ "time": "2023-01-01T08:36:10+00:00"
},
{
"name": "theseer/tokenizer",
@@ -5589,6 +6010,10 @@
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
+ "support": {
+ "issues": "https://github.com/theseer/tokenizer/issues",
+ "source": "https://github.com/theseer/tokenizer/tree/1.2.1"
+ },
"funding": [
{
"url": "https://github.com/theseer",
@@ -5649,6 +6074,10 @@
"check",
"validate"
],
+ "support": {
+ "issues": "https://github.com/webmozarts/assert/issues",
+ "source": "https://github.com/webmozarts/assert/tree/1.11.0"
+ },
"time": "2022-06-03T18:03:27+00:00"
}
],
@@ -5661,5 +6090,5 @@
"php": "^7.4|^8.0"
},
"platform-dev": [],
- "plugin-api-version": "1.1.0"
+ "plugin-api-version": "2.3.0"
}
diff --git a/lib/Google/phpstan.neon.dist b/lib/Google/phpstan.neon.dist
new file mode 100644
index 000000000..dcef11342
--- /dev/null
+++ b/lib/Google/phpstan.neon.dist
@@ -0,0 +1,5 @@
+parameters:
+ treatPhpDocTypesAsCertain: false
+ level: 5
+ paths:
+ - src
diff --git a/lib/Google/vendor/autoload.php b/lib/Google/vendor/autoload.php
index b499e6fe8..67e940915 100644
--- a/lib/Google/vendor/autoload.php
+++ b/lib/Google/vendor/autoload.php
@@ -2,6 +2,24 @@
// autoload.php @generated by Composer
+if (PHP_VERSION_ID < 50600) {
+ if (!headers_sent()) {
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+ $err = '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;
+ if (!ini_get('display_errors')) {
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+ fwrite(STDERR, $err);
+ } elseif (!headers_sent()) {
+ echo $err;
+ }
+ }
+ trigger_error(
+ $err,
+ E_USER_ERROR
+ );
+}
+
require_once __DIR__ . '/composer/autoload_real.php';
-return ComposerAutoloaderInit8a18562d3013519ef85187fe20fc0499::getLoader();
+return ComposerAutoloaderInit2cd6126242849aa869f10969652c4467::getLoader();
diff --git a/lib/Google/vendor/bin/google-cloud-batch b/lib/Google/vendor/bin/google-cloud-batch
deleted file mode 120000
index e4c01822d..000000000
--- a/lib/Google/vendor/bin/google-cloud-batch
+++ /dev/null
@@ -1 +0,0 @@
-../google/cloud-core/bin/google-cloud-batch
\ No newline at end of file
diff --git a/lib/Google/vendor/bin/google-cloud-batch b/lib/Google/vendor/bin/google-cloud-batch
new file mode 100755
index 000000000..04b357fa1
--- /dev/null
+++ b/lib/Google/vendor/bin/google-cloud-batch
@@ -0,0 +1,119 @@
+#!/usr/bin/env php
+realpath = realpath($opened_path) ?: $opened_path;
+ $opened_path = $this->realpath;
+ $this->handle = fopen($this->realpath, $mode);
+ $this->position = 0;
+
+ return (bool) $this->handle;
+ }
+
+ public function stream_read($count)
+ {
+ $data = fread($this->handle, $count);
+
+ if ($this->position === 0) {
+ $data = preg_replace('{^#!.*\r?\n}', '', $data);
+ }
+
+ $this->position += strlen($data);
+
+ return $data;
+ }
+
+ public function stream_cast($castAs)
+ {
+ return $this->handle;
+ }
+
+ public function stream_close()
+ {
+ fclose($this->handle);
+ }
+
+ public function stream_lock($operation)
+ {
+ return $operation ? flock($this->handle, $operation) : true;
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ if (0 === fseek($this->handle, $offset, $whence)) {
+ $this->position = ftell($this->handle);
+ return true;
+ }
+
+ return false;
+ }
+
+ public function stream_tell()
+ {
+ return $this->position;
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->handle);
+ }
+
+ public function stream_stat()
+ {
+ return array();
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ return true;
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $path = substr($path, 17);
+ if (file_exists($path)) {
+ return stat($path);
+ }
+
+ return false;
+ }
+ }
+ }
+
+ if (
+ (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
+ || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
+ ) {
+ return include("phpvfscomposer://" . __DIR__ . '/..'.'/google/cloud-core/bin/google-cloud-batch');
+ }
+}
+
+return include __DIR__ . '/..'.'/google/cloud-core/bin/google-cloud-batch';
diff --git a/lib/Google/vendor/composer/ClassLoader.php b/lib/Google/vendor/composer/ClassLoader.php
index 03b9bb9c4..7824d8f7e 100644
--- a/lib/Google/vendor/composer/ClassLoader.php
+++ b/lib/Google/vendor/composer/ClassLoader.php
@@ -37,26 +37,81 @@
*
* @author Fabien Potencier
* @author Jordi Boggiano
- * @see http://www.php-fig.org/psr/psr-0/
- * @see http://www.php-fig.org/psr/psr-4/
+ * @see https://www.php-fig.org/psr/psr-0/
+ * @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
+ /** @var \Closure(string):void */
+ private static $includeFile;
+
+ /** @var string|null */
+ private $vendorDir;
+
// PSR-4
+ /**
+ * @var array>
+ */
private $prefixLengthsPsr4 = array();
+ /**
+ * @var array>
+ */
private $prefixDirsPsr4 = array();
+ /**
+ * @var list
+ */
private $fallbackDirsPsr4 = array();
// PSR-0
+ /**
+ * List of PSR-0 prefixes
+ *
+ * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
+ *
+ * @var array>>
+ */
private $prefixesPsr0 = array();
+ /**
+ * @var list
+ */
private $fallbackDirsPsr0 = array();
+ /** @var bool */
private $useIncludePath = false;
+
+ /**
+ * @var array
+ */
private $classMap = array();
+
+ /** @var bool */
private $classMapAuthoritative = false;
+
+ /**
+ * @var array
+ */
private $missingClasses = array();
+
+ /** @var string|null */
private $apcuPrefix;
+ /**
+ * @var array
+ */
+ private static $registeredLoaders = array();
+
+ /**
+ * @param string|null $vendorDir
+ */
+ public function __construct($vendorDir = null)
+ {
+ $this->vendorDir = $vendorDir;
+ self::initializeIncludeClosure();
+ }
+
+ /**
+ * @return array>
+ */
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
@@ -66,28 +121,42 @@ public function getPrefixes()
return array();
}
+ /**
+ * @return array>
+ */
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
+ /**
+ * @return list
+ */
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
+ /**
+ * @return list
+ */
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
+ /**
+ * @return array Array of classname => path
+ */
public function getClassMap()
{
return $this->classMap;
}
/**
- * @param array $classMap Class to filename map
+ * @param array $classMap Class to filename map
+ *
+ * @return void
*/
public function addClassMap(array $classMap)
{
@@ -102,22 +171,25 @@ public function addClassMap(array $classMap)
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
- * @param string $prefix The prefix
- * @param array|string $paths The PSR-0 root directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix
+ * @param list|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @return void
*/
public function add($prefix, $paths, $prepend = false)
{
+ $paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
- (array) $paths,
+ $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
- (array) $paths
+ $paths
);
}
@@ -126,19 +198,19 @@ public function add($prefix, $paths, $prepend = false)
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+ $this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
- (array) $paths,
+ $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
- (array) $paths
+ $paths
);
}
}
@@ -147,25 +219,28 @@ public function add($prefix, $paths, $prepend = false)
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
+ *
+ * @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
+ $paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
- (array) $paths,
+ $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
- (array) $paths
+ $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@@ -175,18 +250,18 @@ public function addPsr4($prefix, $paths, $prepend = false)
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ $this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
- (array) $paths,
+ $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
- (array) $paths
+ $paths
);
}
}
@@ -195,8 +270,10 @@ public function addPsr4($prefix, $paths, $prepend = false)
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
- * @param string $prefix The prefix
- * @param array|string $paths The PSR-0 base directories
+ * @param string $prefix The prefix
+ * @param list|string $paths The PSR-0 base directories
+ *
+ * @return void
*/
public function set($prefix, $paths)
{
@@ -211,10 +288,12 @@ public function set($prefix, $paths)
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
+ *
+ * @return void
*/
public function setPsr4($prefix, $paths)
{
@@ -234,6 +313,8 @@ public function setPsr4($prefix, $paths)
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
+ *
+ * @return void
*/
public function setUseIncludePath($useIncludePath)
{
@@ -256,6 +337,8 @@ public function getUseIncludePath()
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
+ *
+ * @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
@@ -276,6 +359,8 @@ public function isClassMapAuthoritative()
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
+ *
+ * @return void
*/
public function setApcuPrefix($apcuPrefix)
{
@@ -296,33 +381,55 @@ public function getApcuPrefix()
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
+ *
+ * @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+
+ if (null === $this->vendorDir) {
+ return;
+ }
+
+ if ($prepend) {
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
+ } else {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ self::$registeredLoaders[$this->vendorDir] = $this;
+ }
}
/**
* Unregisters this instance as an autoloader.
+ *
+ * @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
+
+ if (null !== $this->vendorDir) {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ }
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
- * @return bool|null True if loaded, null otherwise
+ * @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
- includeFile($file);
+ $includeFile = self::$includeFile;
+ $includeFile($file);
return true;
}
+
+ return null;
}
/**
@@ -367,6 +474,21 @@ public function findFile($class)
return $file;
}
+ /**
+ * Returns the currently registered loaders keyed by their corresponding vendor directories.
+ *
+ * @return array
+ */
+ public static function getRegisteredLoaders()
+ {
+ return self::$registeredLoaders;
+ }
+
+ /**
+ * @param string $class
+ * @param string $ext
+ * @return string|false
+ */
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
@@ -432,14 +554,26 @@ private function findFileWithExtension($class, $ext)
return false;
}
-}
-/**
- * Scope isolated include.
- *
- * Prevents access to $this/self from included files.
- */
-function includeFile($file)
-{
- include $file;
+ /**
+ * @return void
+ */
+ private static function initializeIncludeClosure()
+ {
+ if (self::$includeFile !== null) {
+ return;
+ }
+
+ /**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ *
+ * @param string $file
+ * @return void
+ */
+ self::$includeFile = \Closure::bind(static function($file) {
+ include $file;
+ }, null, null);
+ }
}
diff --git a/lib/Google/vendor/composer/InstalledVersions.php b/lib/Google/vendor/composer/InstalledVersions.php
new file mode 100644
index 000000000..51e734a77
--- /dev/null
+++ b/lib/Google/vendor/composer/InstalledVersions.php
@@ -0,0 +1,359 @@
+
+ * Jordi Boggiano
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer;
+
+use Composer\Autoload\ClassLoader;
+use Composer\Semver\VersionParser;
+
+/**
+ * This class is copied in every Composer installed project and available to all
+ *
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
+ *
+ * To require its presence, you can require `composer-runtime-api ^2.0`
+ *
+ * @final
+ */
+class InstalledVersions
+{
+ /**
+ * @var mixed[]|null
+ * @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}|array{}|null
+ */
+ private static $installed;
+
+ /**
+ * @var bool|null
+ */
+ private static $canGetVendors;
+
+ /**
+ * @var array[]
+ * @psalm-var array}>
+ */
+ private static $installedByVendor = array();
+
+ /**
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
+ *
+ * @return string[]
+ * @psalm-return list
+ */
+ public static function getInstalledPackages()
+ {
+ $packages = array();
+ foreach (self::getInstalled() as $installed) {
+ $packages[] = array_keys($installed['versions']);
+ }
+
+ if (1 === \count($packages)) {
+ return $packages[0];
+ }
+
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
+ }
+
+ /**
+ * Returns a list of all package names with a specific type e.g. 'library'
+ *
+ * @param string $type
+ * @return string[]
+ * @psalm-return list
+ */
+ public static function getInstalledPackagesByType($type)
+ {
+ $packagesByType = array();
+
+ foreach (self::getInstalled() as $installed) {
+ foreach ($installed['versions'] as $name => $package) {
+ if (isset($package['type']) && $package['type'] === $type) {
+ $packagesByType[] = $name;
+ }
+ }
+ }
+
+ return $packagesByType;
+ }
+
+ /**
+ * Checks whether the given package is installed
+ *
+ * This also returns true if the package name is provided or replaced by another package
+ *
+ * @param string $packageName
+ * @param bool $includeDevRequirements
+ * @return bool
+ */
+ public static function isInstalled($packageName, $includeDevRequirements = true)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (isset($installed['versions'][$packageName])) {
+ return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether the given package satisfies a version constraint
+ *
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
+ *
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
+ *
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
+ * @param string $packageName
+ * @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
+ * @return bool
+ */
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
+ {
+ $constraint = $parser->parseConstraints((string) $constraint);
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
+
+ return $provided->matches($constraint);
+ }
+
+ /**
+ * Returns a version constraint representing all the range(s) which are installed for a given package
+ *
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
+ * whether a given version of a package is installed, and not just whether it exists
+ *
+ * @param string $packageName
+ * @return string Version constraint usable with composer/semver
+ */
+ public static function getVersionRanges($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ $ranges = array();
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
+ }
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
+ }
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
+ }
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
+ }
+
+ return implode(' || ', $ranges);
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @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
+ */
+ public static function getVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @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
+ */
+ public static function getPrettyVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['pretty_version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
+ */
+ public static function getReference($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['reference'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['reference'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @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.
+ */
+ public static function getInstallPath($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @return array
+ * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
+ */
+ public static function getRootPackage()
+ {
+ $installed = self::getInstalled();
+
+ return $installed[0]['root'];
+ }
+
+ /**
+ * Returns the raw installed.php data for custom implementations
+ *
+ * @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.
+ * @return array[]
+ * @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}
+ */
+ public static function getRawData()
+ {
+ @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);
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = include __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ return self::$installed;
+ }
+
+ /**
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
+ *
+ * @return array[]
+ * @psalm-return list}>
+ */
+ public static function getAllRawData()
+ {
+ return self::getInstalled();
+ }
+
+ /**
+ * Lets you reload the static array from another file
+ *
+ * This is only useful for complex integrations in which a project needs to use
+ * this class but then also needs to execute another project's autoloader in process,
+ * and wants to ensure both projects have access to their version of installed.php.
+ *
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
+ * the data it needs from this class, then call reload() with
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
+ * the project in which it runs can then also use this class safely, without
+ * interference between PHPUnit's dependencies and the project's dependencies.
+ *
+ * @param array[] $data A vendor/composer/installed.php data set
+ * @return void
+ *
+ * @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} $data
+ */
+ public static function reload($data)
+ {
+ self::$installed = $data;
+ self::$installedByVendor = array();
+ }
+
+ /**
+ * @return array[]
+ * @psalm-return list}>
+ */
+ private static function getInstalled()
+ {
+ if (null === self::$canGetVendors) {
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
+ }
+
+ $installed = array();
+
+ if (self::$canGetVendors) {
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
+ if (isset(self::$installedByVendor[$vendorDir])) {
+ $installed[] = self::$installedByVendor[$vendorDir];
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
+ /** @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} $required */
+ $required = require $vendorDir.'/composer/installed.php';
+ $installed[] = self::$installedByVendor[$vendorDir] = $required;
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
+ self::$installed = $installed[count($installed) - 1];
+ }
+ }
+ }
+ }
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ /** @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} $required */
+ $required = require __DIR__ . '/installed.php';
+ self::$installed = $required;
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ if (self::$installed !== array()) {
+ $installed[] = self::$installed;
+ }
+
+ return $installed;
+ }
+}
diff --git a/lib/Google/vendor/composer/autoload_classmap.php b/lib/Google/vendor/composer/autoload_classmap.php
index 8441ab833..2bda8e960 100644
--- a/lib/Google/vendor/composer/autoload_classmap.php
+++ b/lib/Google/vendor/composer/autoload_classmap.php
@@ -2,10 +2,12 @@
// autoload_classmap.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
+ 'CURLStringFile' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php',
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Google_AccessToken_Revoke' => $baseDir . '/src/aliases.php',
'Google_AccessToken_Verify' => $baseDir . '/src/aliases.php',
'Google_AuthHandler_AuthHandlerFactory' => $baseDir . '/src/aliases.php',
@@ -26,4 +28,5 @@
'Google_Task_Retryable' => $baseDir . '/src/aliases.php',
'Google_Task_Runner' => $baseDir . '/src/aliases.php',
'Google_Utils_UriTemplate' => $baseDir . '/src/aliases.php',
+ 'ReturnTypeWillChange' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
);
diff --git a/lib/Google/vendor/composer/autoload_files.php b/lib/Google/vendor/composer/autoload_files.php
index 2f65642f5..1b96f7179 100644
--- a/lib/Google/vendor/composer/autoload_files.php
+++ b/lib/Google/vendor/composer/autoload_files.php
@@ -2,15 +2,16 @@
// autoload_files.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
- 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
- 'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
+ '23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php',
'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php',
+ '1f87db08236948d07391152dccb70f04' => $vendorDir . '/google/apiclient-services/autoload.php',
+ 'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
'a8d3953fd9959404dd22d3dfcd0a79f0' => $baseDir . '/src/aliases.php',
);
diff --git a/lib/Google/vendor/composer/autoload_namespaces.php b/lib/Google/vendor/composer/autoload_namespaces.php
index b7fc0125d..15a2ff3ad 100644
--- a/lib/Google/vendor/composer/autoload_namespaces.php
+++ b/lib/Google/vendor/composer/autoload_namespaces.php
@@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
diff --git a/lib/Google/vendor/composer/autoload_psr4.php b/lib/Google/vendor/composer/autoload_psr4.php
index de2fe3828..8f8c57ddb 100644
--- a/lib/Google/vendor/composer/autoload_psr4.php
+++ b/lib/Google/vendor/composer/autoload_psr4.php
@@ -2,11 +2,12 @@
// autoload_psr4.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'phpseclib3\\' => array($vendorDir . '/phpseclib/phpseclib/phpseclib'),
+ 'Symfony\\Polyfill\\Php81\\' => array($vendorDir . '/symfony/polyfill-php81'),
'Rize\\' => array($vendorDir . '/rize/uri-template/src/Rize'),
'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'),
'Ramsey\\Collection\\' => array($vendorDir . '/ramsey/collection/src'),
@@ -19,9 +20,9 @@
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
+ 'Google\\Service\\' => array($vendorDir . '/google/apiclient-services/src'),
'Google\\Cloud\\Storage\\' => array($vendorDir . '/google/cloud-storage/src'),
'Google\\Cloud\\Core\\' => array($vendorDir . '/google/cloud-core/src'),
- 'Google\\CRC32\\' => array($vendorDir . '/google/crc32/src'),
'Google\\Auth\\' => array($vendorDir . '/google/auth/src'),
'Google\\' => array($baseDir . '/src'),
'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
diff --git a/lib/Google/vendor/composer/autoload_real.php b/lib/Google/vendor/composer/autoload_real.php
index b4f8cfd17..a9a344d5e 100644
--- a/lib/Google/vendor/composer/autoload_real.php
+++ b/lib/Google/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
-class ComposerAutoloaderInit8a18562d3013519ef85187fe20fc0499
+class ComposerAutoloaderInit2cd6126242849aa869f10969652c4467
{
private static $loader;
@@ -22,52 +22,29 @@ public static function getLoader()
return self::$loader;
}
- spl_autoload_register(array('ComposerAutoloaderInit8a18562d3013519ef85187fe20fc0499', 'loadClassLoader'), true, true);
- self::$loader = $loader = new \Composer\Autoload\ClassLoader();
- spl_autoload_unregister(array('ComposerAutoloaderInit8a18562d3013519ef85187fe20fc0499', 'loadClassLoader'));
+ require __DIR__ . '/platform_check.php';
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
- if ($useStaticLoader) {
- require_once __DIR__ . '/autoload_static.php';
+ spl_autoload_register(array('ComposerAutoloaderInit2cd6126242849aa869f10969652c4467', 'loadClassLoader'), true, true);
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
+ spl_autoload_unregister(array('ComposerAutoloaderInit2cd6126242849aa869f10969652c4467', 'loadClassLoader'));
- call_user_func(\Composer\Autoload\ComposerStaticInit8a18562d3013519ef85187fe20fc0499::getInitializer($loader));
- } else {
- $map = require __DIR__ . '/autoload_namespaces.php';
- foreach ($map as $namespace => $path) {
- $loader->set($namespace, $path);
- }
-
- $map = require __DIR__ . '/autoload_psr4.php';
- foreach ($map as $namespace => $path) {
- $loader->setPsr4($namespace, $path);
- }
-
- $classMap = require __DIR__ . '/autoload_classmap.php';
- if ($classMap) {
- $loader->addClassMap($classMap);
- }
- }
+ require __DIR__ . '/autoload_static.php';
+ call_user_func(\Composer\Autoload\ComposerStaticInit2cd6126242849aa869f10969652c4467::getInitializer($loader));
$loader->register(true);
- if ($useStaticLoader) {
- $includeFiles = Composer\Autoload\ComposerStaticInit8a18562d3013519ef85187fe20fc0499::$files;
- } else {
- $includeFiles = require __DIR__ . '/autoload_files.php';
- }
- foreach ($includeFiles as $fileIdentifier => $file) {
- composerRequire8a18562d3013519ef85187fe20fc0499($fileIdentifier, $file);
+ $filesToLoad = \Composer\Autoload\ComposerStaticInit2cd6126242849aa869f10969652c4467::$files;
+ $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
+
+ require $file;
+ }
+ }, null, null);
+ foreach ($filesToLoad as $fileIdentifier => $file) {
+ $requireFile($fileIdentifier, $file);
}
return $loader;
}
}
-
-function composerRequire8a18562d3013519ef85187fe20fc0499($fileIdentifier, $file)
-{
- if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
- require $file;
-
- $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
- }
-}
diff --git a/lib/Google/vendor/composer/autoload_static.php b/lib/Google/vendor/composer/autoload_static.php
index 5f30bbe99..05dbabeaa 100644
--- a/lib/Google/vendor/composer/autoload_static.php
+++ b/lib/Google/vendor/composer/autoload_static.php
@@ -4,15 +4,16 @@
namespace Composer\Autoload;
-class ComposerStaticInit8a18562d3013519ef85187fe20fc0499
+class ComposerStaticInit2cd6126242849aa869f10969652c4467
{
public static $files = array (
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
- 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
- 'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
+ '23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php',
'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php',
+ '1f87db08236948d07391152dccb70f04' => __DIR__ . '/..' . '/google/apiclient-services/autoload.php',
+ 'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
'a8d3953fd9959404dd22d3dfcd0a79f0' => __DIR__ . '/../..' . '/src/aliases.php',
);
@@ -21,6 +22,10 @@ class ComposerStaticInit8a18562d3013519ef85187fe20fc0499
array (
'phpseclib3\\' => 11,
),
+ 'S' =>
+ array (
+ 'Symfony\\Polyfill\\Php81\\' => 23,
+ ),
'R' =>
array (
'Rize\\' => 5,
@@ -44,9 +49,9 @@ class ComposerStaticInit8a18562d3013519ef85187fe20fc0499
'GuzzleHttp\\Psr7\\' => 16,
'GuzzleHttp\\Promise\\' => 19,
'GuzzleHttp\\' => 11,
+ 'Google\\Service\\' => 15,
'Google\\Cloud\\Storage\\' => 21,
'Google\\Cloud\\Core\\' => 18,
- 'Google\\CRC32\\' => 13,
'Google\\Auth\\' => 12,
'Google\\' => 7,
),
@@ -65,6 +70,10 @@ class ComposerStaticInit8a18562d3013519ef85187fe20fc0499
array (
0 => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib',
),
+ 'Symfony\\Polyfill\\Php81\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php81',
+ ),
'Rize\\' =>
array (
0 => __DIR__ . '/..' . '/rize/uri-template/src/Rize',
@@ -114,6 +123,10 @@ class ComposerStaticInit8a18562d3013519ef85187fe20fc0499
array (
0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
),
+ 'Google\\Service\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/google/apiclient-services/src',
+ ),
'Google\\Cloud\\Storage\\' =>
array (
0 => __DIR__ . '/..' . '/google/cloud-storage/src',
@@ -122,10 +135,6 @@ class ComposerStaticInit8a18562d3013519ef85187fe20fc0499
array (
0 => __DIR__ . '/..' . '/google/cloud-core/src',
),
- 'Google\\CRC32\\' =>
- array (
- 0 => __DIR__ . '/..' . '/google/crc32/src',
- ),
'Google\\Auth\\' =>
array (
0 => __DIR__ . '/..' . '/google/auth/src',
@@ -145,6 +154,8 @@ class ComposerStaticInit8a18562d3013519ef85187fe20fc0499
);
public static $classMap = array (
+ 'CURLStringFile' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php',
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Google_AccessToken_Revoke' => __DIR__ . '/../..' . '/src/aliases.php',
'Google_AccessToken_Verify' => __DIR__ . '/../..' . '/src/aliases.php',
'Google_AuthHandler_AuthHandlerFactory' => __DIR__ . '/../..' . '/src/aliases.php',
@@ -165,14 +176,15 @@ class ComposerStaticInit8a18562d3013519ef85187fe20fc0499
'Google_Task_Retryable' => __DIR__ . '/../..' . '/src/aliases.php',
'Google_Task_Runner' => __DIR__ . '/../..' . '/src/aliases.php',
'Google_Utils_UriTemplate' => __DIR__ . '/../..' . '/src/aliases.php',
+ 'ReturnTypeWillChange' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
- $loader->prefixLengthsPsr4 = ComposerStaticInit8a18562d3013519ef85187fe20fc0499::$prefixLengthsPsr4;
- $loader->prefixDirsPsr4 = ComposerStaticInit8a18562d3013519ef85187fe20fc0499::$prefixDirsPsr4;
- $loader->classMap = ComposerStaticInit8a18562d3013519ef85187fe20fc0499::$classMap;
+ $loader->prefixLengthsPsr4 = ComposerStaticInit2cd6126242849aa869f10969652c4467::$prefixLengthsPsr4;
+ $loader->prefixDirsPsr4 = ComposerStaticInit2cd6126242849aa869f10969652c4467::$prefixDirsPsr4;
+ $loader->classMap = ComposerStaticInit2cd6126242849aa869f10969652c4467::$classMap;
}, null, ClassLoader::class);
}
diff --git a/lib/Google/vendor/composer/installed.json b/lib/Google/vendor/composer/installed.json
index 11af9a3cc..acfd6408e 100644
--- a/lib/Google/vendor/composer/installed.json
+++ b/lib/Google/vendor/composer/installed.json
@@ -1,1567 +1,1766 @@
-[
- {
- "name": "brick/math",
- "version": "0.11.0",
- "version_normalized": "0.11.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/brick/math.git",
- "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478",
- "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478",
- "shasum": ""
- },
- "require": {
- "php": "^8.0"
- },
- "require-dev": {
- "php-coveralls/php-coveralls": "^2.2",
- "phpunit/phpunit": "^9.0",
- "vimeo/psalm": "5.0.0"
- },
- "time": "2023-01-15T23:15:59+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Brick\\Math\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "Arbitrary-precision arithmetic library",
- "keywords": [
- "Arbitrary-precision",
- "BigInteger",
- "BigRational",
- "arithmetic",
- "bigdecimal",
- "bignum",
- "brick",
- "math"
- ],
- "funding": [
- {
- "url": "https://github.com/BenMorel",
- "type": "github"
- }
- ]
- },
- {
- "name": "firebase/php-jwt",
- "version": "v6.5.0",
- "version_normalized": "6.5.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/firebase/php-jwt.git",
- "reference": "e94e7353302b0c11ec3cfff7180cd0b1743975d2"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/firebase/php-jwt/zipball/e94e7353302b0c11ec3cfff7180cd0b1743975d2",
- "reference": "e94e7353302b0c11ec3cfff7180cd0b1743975d2",
- "shasum": ""
- },
- "require": {
- "php": "^7.4||^8.0"
- },
- "require-dev": {
- "guzzlehttp/guzzle": "^6.5||^7.4",
- "phpspec/prophecy-phpunit": "^2.0",
- "phpunit/phpunit": "^9.5",
- "psr/cache": "^1.0||^2.0",
- "psr/http-client": "^1.0",
- "psr/http-factory": "^1.0"
- },
- "suggest": {
- "ext-sodium": "Support EdDSA (Ed25519) signatures",
- "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
- },
- "time": "2023-05-12T15:47:07+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Firebase\\JWT\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Neuman Vong",
- "email": "neuman+pear@twilio.com",
- "role": "Developer"
- },
- {
- "name": "Anant Narayanan",
- "email": "anant@php.net",
- "role": "Developer"
- }
- ],
- "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
- "homepage": "https://github.com/firebase/php-jwt",
- "keywords": [
- "jwt",
- "php"
- ]
- },
- {
- "name": "google/auth",
- "version": "v1.28.0",
- "version_normalized": "1.28.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/googleapis/google-auth-library-php.git",
- "reference": "07f7f6305f1b7df32b2acf6e101c1225c839c7ac"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/07f7f6305f1b7df32b2acf6e101c1225c839c7ac",
- "reference": "07f7f6305f1b7df32b2acf6e101c1225c839c7ac",
- "shasum": ""
- },
- "require": {
- "firebase/php-jwt": "^6.0",
- "guzzlehttp/guzzle": "^6.2.1|^7.0",
- "guzzlehttp/psr7": "^2.4.5",
- "php": "^7.4||^8.0",
- "psr/cache": "^1.0||^2.0||^3.0",
- "psr/http-message": "^1.1||^2.0"
- },
- "require-dev": {
- "guzzlehttp/promises": "^1.3",
- "kelvinmo/simplejwt": "0.7.0",
- "phpseclib/phpseclib": "^3.0",
- "phpspec/prophecy-phpunit": "^2.0",
- "phpunit/phpunit": "^9.0.0",
- "sebastian/comparator": ">=1.2.3",
- "squizlabs/php_codesniffer": "^3.5"
- },
- "suggest": {
- "phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2."
- },
- "time": "2023-05-11T21:58:18+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Google\\Auth\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "description": "Google Auth Library for PHP",
- "homepage": "http://github.com/google/google-auth-library-php",
- "keywords": [
- "Authentication",
- "google",
- "oauth2"
- ]
- },
- {
- "name": "google/cloud-core",
- "version": "v1.51.2",
- "version_normalized": "1.51.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/googleapis/google-cloud-php-core.git",
- "reference": "85dc48d62143f4bbfaa34c24da95003371de7b79"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/85dc48d62143f4bbfaa34c24da95003371de7b79",
- "reference": "85dc48d62143f4bbfaa34c24da95003371de7b79",
- "shasum": ""
- },
- "require": {
- "google/auth": "^1.18",
- "guzzlehttp/guzzle": "^5.3|^6.5.7|^7.4.4",
- "guzzlehttp/promises": "^1.3",
- "guzzlehttp/psr7": "^1.7|^2.0",
- "monolog/monolog": "^1.1|^2.0|^3.0",
- "php": ">=7.4",
- "psr/http-message": "^1.0",
- "rize/uri-template": "~0.3"
- },
- "require-dev": {
- "erusev/parsedown": "^1.6",
- "google/cloud-common-protos": "^0.4",
- "google/gax": "^1.9",
- "opis/closure": "^3",
- "phpdocumentor/reflection": "^5.0",
- "phpspec/prophecy-phpunit": "^2.0",
- "phpunit/phpunit": "^9.0",
- "squizlabs/php_codesniffer": "2.*"
- },
- "suggest": {
- "opis/closure": "May be used to serialize closures to process jobs in the batch daemon. Please require version ^3.",
- "symfony/lock": "Required for the Spanner cached based session pool. Please require the following commit: 3.3.x-dev#1ba6ac9"
- },
- "time": "2023-05-05T23:01:42+00:00",
- "bin": [
- "bin/google-cloud-batch"
- ],
- "type": "library",
- "extra": {
- "component": {
- "id": "cloud-core",
- "target": "googleapis/google-cloud-php-core.git",
- "path": "Core",
- "entry": "src/ServiceBuilder.php"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Google\\Cloud\\Core\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "description": "Google Cloud PHP shared dependency, providing functionality useful to all components."
- },
- {
- "name": "google/cloud-storage",
- "version": "v1.31.2",
- "version_normalized": "1.31.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/googleapis/google-cloud-php-storage.git",
- "reference": "7fe96d56856cda550b21779bb95a066b264852da"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-cloud-php-storage/zipball/7fe96d56856cda550b21779bb95a066b264852da",
- "reference": "7fe96d56856cda550b21779bb95a066b264852da",
- "shasum": ""
- },
- "require": {
- "google/cloud-core": "^1.51.1",
- "google/crc32": "^0.2.0",
- "php": ">=7.4",
- "ramsey/uuid": "^4.2.3"
- },
- "require-dev": {
- "erusev/parsedown": "^1.6",
- "google/cloud-pubsub": "^1.0",
- "phpdocumentor/reflection": "^5.0",
- "phpseclib/phpseclib": "^2.0||^3.0",
- "phpspec/prophecy-phpunit": "^2.0",
- "phpunit/phpunit": "^9.0",
- "squizlabs/php_codesniffer": "2.*"
- },
- "suggest": {
- "google/cloud-pubsub": "May be used to register a topic to receive bucket notifications.",
- "phpseclib/phpseclib": "May be used in place of OpenSSL for creating signed Cloud Storage URLs. Please require version ^2."
- },
- "time": "2023-05-05T23:01:42+00:00",
- "type": "library",
- "extra": {
- "component": {
- "id": "cloud-storage",
- "target": "googleapis/google-cloud-php-storage.git",
- "path": "Storage",
- "entry": "src/StorageClient.php"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Google\\Cloud\\Storage\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "description": "Cloud Storage Client for PHP"
- },
- {
- "name": "google/crc32",
- "version": "v0.2.0",
- "version_normalized": "0.2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/google/php-crc32.git",
- "reference": "948f7945d803dcc1a375152c72f63144c2dadf23"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/google/php-crc32/zipball/948f7945d803dcc1a375152c72f63144c2dadf23",
- "reference": "948f7945d803dcc1a375152c72f63144c2dadf23",
- "shasum": ""
- },
- "require": {
- "php": ">=7.4"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "v3.15",
- "phpunit/phpunit": "^9"
- },
- "time": "2023-04-16T22:44:57+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Google\\CRC32\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "Andrew Brampton",
- "email": "bramp@google.com"
- }
- ],
- "description": "Various CRC32 implementations",
- "homepage": "https://github.com/google/php-crc32"
- },
- {
- "name": "guzzlehttp/guzzle",
- "version": "7.7.0",
- "version_normalized": "7.7.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/guzzle/guzzle.git",
- "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5",
- "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5",
- "shasum": ""
- },
- "require": {
- "ext-json": "*",
- "guzzlehttp/promises": "^1.5.3 || ^2.0",
- "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
- "php": "^7.2.5 || ^8.0",
- "psr/http-client": "^1.0",
- "symfony/deprecation-contracts": "^2.2 || ^3.0"
- },
- "provide": {
- "psr/http-client-implementation": "1.0"
- },
- "require-dev": {
- "bamarni/composer-bin-plugin": "^1.8.1",
- "ext-curl": "*",
- "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
- "php-http/message-factory": "^1.1",
- "phpunit/phpunit": "^8.5.29 || ^9.5.23",
- "psr/log": "^1.1 || ^2.0 || ^3.0"
- },
- "suggest": {
- "ext-curl": "Required for CURL handler support",
- "ext-intl": "Required for Internationalized Domain Name (IDN) support",
- "psr/log": "Required for using the Log middleware"
- },
- "time": "2023-05-21T14:04:53+00:00",
- "type": "library",
- "extra": {
- "bamarni-bin": {
- "bin-links": true,
- "forward-command": false
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "src/functions_include.php"
- ],
- "psr-4": {
- "GuzzleHttp\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Graham Campbell",
- "email": "hello@gjcampbell.co.uk",
- "homepage": "https://github.com/GrahamCampbell"
- },
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- },
- {
- "name": "Jeremy Lindblom",
- "email": "jeremeamia@gmail.com",
- "homepage": "https://github.com/jeremeamia"
- },
- {
- "name": "George Mponos",
- "email": "gmponos@gmail.com",
- "homepage": "https://github.com/gmponos"
- },
- {
- "name": "Tobias Nyholm",
- "email": "tobias.nyholm@gmail.com",
- "homepage": "https://github.com/Nyholm"
- },
- {
- "name": "Márk Sági-Kazár",
- "email": "mark.sagikazar@gmail.com",
- "homepage": "https://github.com/sagikazarmark"
- },
- {
- "name": "Tobias Schultze",
- "email": "webmaster@tubo-world.de",
- "homepage": "https://github.com/Tobion"
- }
- ],
- "description": "Guzzle is a PHP HTTP client library",
- "keywords": [
- "client",
- "curl",
- "framework",
- "http",
- "http client",
- "psr-18",
- "psr-7",
- "rest",
- "web service"
- ],
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://github.com/Nyholm",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "guzzlehttp/promises",
- "version": "1.5.3",
- "version_normalized": "1.5.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/guzzle/promises.git",
- "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e",
- "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e",
- "shasum": ""
- },
- "require": {
- "php": ">=5.5"
- },
- "require-dev": {
- "symfony/phpunit-bridge": "^4.4 || ^5.1"
- },
- "time": "2023-05-21T12:31:43+00:00",
- "type": "library",
- "installation-source": "source",
- "autoload": {
- "files": [
- "src/functions_include.php"
- ],
- "psr-4": {
- "GuzzleHttp\\Promise\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Graham Campbell",
- "email": "hello@gjcampbell.co.uk",
- "homepage": "https://github.com/GrahamCampbell"
- },
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- },
- {
- "name": "Tobias Nyholm",
- "email": "tobias.nyholm@gmail.com",
- "homepage": "https://github.com/Nyholm"
- },
- {
- "name": "Tobias Schultze",
- "email": "webmaster@tubo-world.de",
- "homepage": "https://github.com/Tobion"
- }
- ],
- "description": "Guzzle promises library",
- "keywords": [
- "promise"
- ],
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://github.com/Nyholm",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "guzzlehttp/psr7",
- "version": "2.5.0",
- "version_normalized": "2.5.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/guzzle/psr7.git",
- "reference": "b635f279edd83fc275f822a1188157ffea568ff6"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6",
- "reference": "b635f279edd83fc275f822a1188157ffea568ff6",
- "shasum": ""
- },
- "require": {
- "php": "^7.2.5 || ^8.0",
- "psr/http-factory": "^1.0",
- "psr/http-message": "^1.1 || ^2.0",
- "ralouphie/getallheaders": "^3.0"
- },
- "provide": {
- "psr/http-factory-implementation": "1.0",
- "psr/http-message-implementation": "1.0"
- },
- "require-dev": {
- "bamarni/composer-bin-plugin": "^1.8.1",
- "http-interop/http-factory-tests": "^0.9",
- "phpunit/phpunit": "^8.5.29 || ^9.5.23"
- },
- "suggest": {
- "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
- },
- "time": "2023-04-17T16:11:26+00:00",
- "type": "library",
- "extra": {
- "bamarni-bin": {
- "bin-links": true,
- "forward-command": false
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "GuzzleHttp\\Psr7\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Graham Campbell",
- "email": "hello@gjcampbell.co.uk",
- "homepage": "https://github.com/GrahamCampbell"
- },
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- },
- {
- "name": "George Mponos",
- "email": "gmponos@gmail.com",
- "homepage": "https://github.com/gmponos"
- },
- {
- "name": "Tobias Nyholm",
- "email": "tobias.nyholm@gmail.com",
- "homepage": "https://github.com/Nyholm"
- },
- {
- "name": "Márk Sági-Kazár",
- "email": "mark.sagikazar@gmail.com",
- "homepage": "https://github.com/sagikazarmark"
- },
- {
- "name": "Tobias Schultze",
- "email": "webmaster@tubo-world.de",
- "homepage": "https://github.com/Tobion"
- },
- {
- "name": "Márk Sági-Kazár",
- "email": "mark.sagikazar@gmail.com",
- "homepage": "https://sagikazarmark.hu"
- }
- ],
- "description": "PSR-7 message implementation that also provides common utility methods",
- "keywords": [
- "http",
- "message",
- "psr-7",
- "request",
- "response",
- "stream",
- "uri",
- "url"
- ],
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://github.com/Nyholm",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "monolog/monolog",
- "version": "2.9.1",
- "version_normalized": "2.9.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/Seldaek/monolog.git",
- "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
- "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2",
- "psr/log": "^1.0.1 || ^2.0 || ^3.0"
- },
- "provide": {
- "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0"
- },
- "require-dev": {
- "aws/aws-sdk-php": "^2.4.9 || ^3.0",
- "doctrine/couchdb": "~1.0@dev",
- "elasticsearch/elasticsearch": "^7 || ^8",
- "ext-json": "*",
- "graylog2/gelf-php": "^1.4.2 || ^2@dev",
- "guzzlehttp/guzzle": "^7.4",
- "guzzlehttp/psr7": "^2.2",
- "mongodb/mongodb": "^1.8",
- "php-amqplib/php-amqplib": "~2.4 || ^3",
- "phpspec/prophecy": "^1.15",
- "phpstan/phpstan": "^0.12.91",
- "phpunit/phpunit": "^8.5.14",
- "predis/predis": "^1.1 || ^2.0",
- "rollbar/rollbar": "^1.3 || ^2 || ^3",
- "ruflin/elastica": "^7",
- "swiftmailer/swiftmailer": "^5.3|^6.0",
- "symfony/mailer": "^5.4 || ^6",
- "symfony/mime": "^5.4 || ^6"
- },
- "suggest": {
- "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
- "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
- "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
- "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
- "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
- "ext-mbstring": "Allow to work properly with unicode symbols",
- "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
- "ext-openssl": "Required to send log messages using SSL",
- "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
- "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
- "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
- "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
- "rollbar/rollbar": "Allow sending log messages to Rollbar",
- "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
- },
- "time": "2023-02-06T13:44:46+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "2.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Monolog\\": "src/Monolog"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jordi Boggiano",
- "email": "j.boggiano@seld.be",
- "homepage": "https://seld.be"
- }
- ],
- "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
- "homepage": "https://github.com/Seldaek/monolog",
- "keywords": [
- "log",
- "logging",
- "psr-3"
- ],
- "funding": [
- {
- "url": "https://github.com/Seldaek",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "paragonie/constant_time_encoding",
- "version": "v2.6.3",
- "version_normalized": "2.6.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/paragonie/constant_time_encoding.git",
- "reference": "58c3f47f650c94ec05a151692652a868995d2938"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938",
- "reference": "58c3f47f650c94ec05a151692652a868995d2938",
- "shasum": ""
- },
- "require": {
- "php": "^7|^8"
- },
- "require-dev": {
- "phpunit/phpunit": "^6|^7|^8|^9",
- "vimeo/psalm": "^1|^2|^3|^4"
- },
- "time": "2022-06-14T06:56:20+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "ParagonIE\\ConstantTime\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Paragon Initiative Enterprises",
- "email": "security@paragonie.com",
- "homepage": "https://paragonie.com",
- "role": "Maintainer"
- },
- {
- "name": "Steve 'Sc00bz' Thomas",
- "email": "steve@tobtu.com",
- "homepage": "https://www.tobtu.com",
- "role": "Original Developer"
- }
- ],
- "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)",
- "keywords": [
- "base16",
- "base32",
- "base32_decode",
- "base32_encode",
- "base64",
- "base64_decode",
- "base64_encode",
- "bin2hex",
- "encoding",
- "hex",
- "hex2bin",
- "rfc4648"
- ]
- },
- {
- "name": "paragonie/random_compat",
- "version": "v9.99.100",
- "version_normalized": "9.99.100.0",
- "source": {
- "type": "git",
- "url": "https://github.com/paragonie/random_compat.git",
- "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a",
- "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a",
- "shasum": ""
- },
- "require": {
- "php": ">= 7"
- },
- "require-dev": {
- "phpunit/phpunit": "4.*|5.*",
- "vimeo/psalm": "^1"
- },
- "suggest": {
- "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
- },
- "time": "2020-10-15T08:29:30+00:00",
- "type": "library",
- "installation-source": "dist",
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Paragon Initiative Enterprises",
- "email": "security@paragonie.com",
- "homepage": "https://paragonie.com"
- }
- ],
- "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
- "keywords": [
- "csprng",
- "polyfill",
- "pseudorandom",
- "random"
- ]
- },
- {
- "name": "phpseclib/phpseclib",
- "version": "3.0.19",
- "version_normalized": "3.0.19.0",
- "source": {
- "type": "git",
- "url": "https://github.com/phpseclib/phpseclib.git",
- "reference": "cc181005cf548bfd8a4896383bb825d859259f95"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cc181005cf548bfd8a4896383bb825d859259f95",
- "reference": "cc181005cf548bfd8a4896383bb825d859259f95",
- "shasum": ""
- },
- "require": {
- "paragonie/constant_time_encoding": "^1|^2",
- "paragonie/random_compat": "^1.4|^2.0|^9.99.99",
- "php": ">=5.6.1"
- },
- "require-dev": {
- "phpunit/phpunit": "*"
- },
- "suggest": {
- "ext-dom": "Install the DOM extension to load XML formatted public keys.",
- "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
- "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
- "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
- "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
- },
- "time": "2023-03-05T17:13:09+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "files": [
- "phpseclib/bootstrap.php"
- ],
- "psr-4": {
- "phpseclib3\\": "phpseclib/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jim Wigginton",
- "email": "terrafrost@php.net",
- "role": "Lead Developer"
- },
- {
- "name": "Patrick Monnerat",
- "email": "pm@datasphere.ch",
- "role": "Developer"
- },
- {
- "name": "Andreas Fischer",
- "email": "bantu@phpbb.com",
- "role": "Developer"
- },
- {
- "name": "Hans-Jürgen Petrich",
- "email": "petrich@tronic-media.com",
- "role": "Developer"
- },
- {
- "name": "Graham Campbell",
- "email": "graham@alt-three.com",
- "role": "Developer"
- }
- ],
- "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
- "homepage": "http://phpseclib.sourceforge.net",
- "keywords": [
- "BigInteger",
- "aes",
- "asn.1",
- "asn1",
- "blowfish",
- "crypto",
- "cryptography",
- "encryption",
- "rsa",
- "security",
- "sftp",
- "signature",
- "signing",
- "ssh",
- "twofish",
- "x.509",
- "x509"
- ],
- "funding": [
- {
- "url": "https://github.com/terrafrost",
- "type": "github"
- },
- {
- "url": "https://www.patreon.com/phpseclib",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "psr/cache",
- "version": "2.0.0",
- "version_normalized": "2.0.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/cache.git",
- "reference": "213f9dbc5b9bfbc4f8db86d2838dc968752ce13b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/cache/zipball/213f9dbc5b9bfbc4f8db86d2838dc968752ce13b",
- "reference": "213f9dbc5b9bfbc4f8db86d2838dc968752ce13b",
- "shasum": ""
- },
- "require": {
- "php": ">=8.0.0"
- },
- "time": "2021-02-03T23:23:37+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "installation-source": "source",
- "autoload": {
- "psr-4": {
- "Psr\\Cache\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common interface for caching libraries",
- "keywords": [
- "cache",
- "psr",
- "psr-6"
- ]
- },
- {
- "name": "psr/http-client",
- "version": "1.0.2",
- "version_normalized": "1.0.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-client.git",
- "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31",
- "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31",
- "shasum": ""
- },
- "require": {
- "php": "^7.0 || ^8.0",
- "psr/http-message": "^1.0 || ^2.0"
- },
- "time": "2023-04-10T20:12:12+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Psr\\Http\\Client\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common interface for HTTP clients",
- "homepage": "https://github.com/php-fig/http-client",
- "keywords": [
- "http",
- "http-client",
- "psr",
- "psr-18"
- ]
- },
- {
- "name": "psr/http-factory",
- "version": "1.0.2",
- "version_normalized": "1.0.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-factory.git",
- "reference": "e616d01114759c4c489f93b099585439f795fe35"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
- "reference": "e616d01114759c4c489f93b099585439f795fe35",
- "shasum": ""
- },
- "require": {
- "php": ">=7.0.0",
- "psr/http-message": "^1.0 || ^2.0"
- },
- "time": "2023-04-10T20:10:41+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Psr\\Http\\Message\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common interfaces for PSR-7 HTTP message factories",
- "keywords": [
- "factory",
- "http",
- "message",
- "psr",
- "psr-17",
- "psr-7",
- "request",
- "response"
- ]
- },
- {
- "name": "psr/http-message",
- "version": "1.1",
- "version_normalized": "1.1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-message.git",
- "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
- "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
- "shasum": ""
- },
- "require": {
- "php": "^7.2 || ^8.0"
- },
- "time": "2023-04-04T09:50:52+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Psr\\Http\\Message\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Common interface for HTTP messages",
- "homepage": "https://github.com/php-fig/http-message",
- "keywords": [
- "http",
- "http-message",
- "psr",
- "psr-7",
- "request",
- "response"
- ]
- },
- {
- "name": "psr/log",
- "version": "1.1.4",
- "version_normalized": "1.1.4.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/log.git",
- "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
- "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "time": "2021-05-03T11:20:27+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Psr\\Log\\": "Psr/Log/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common interface for logging libraries",
- "homepage": "https://github.com/php-fig/log",
- "keywords": [
- "log",
- "psr",
- "psr-3"
- ]
- },
- {
- "name": "ralouphie/getallheaders",
- "version": "3.0.3",
- "version_normalized": "3.0.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/ralouphie/getallheaders.git",
- "reference": "120b605dfeb996808c31b6477290a714d356e822"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
- "reference": "120b605dfeb996808c31b6477290a714d356e822",
- "shasum": ""
- },
- "require": {
- "php": ">=5.6"
- },
- "require-dev": {
- "php-coveralls/php-coveralls": "^2.1",
- "phpunit/phpunit": "^5 || ^6.5"
- },
- "time": "2019-03-08T08:55:37+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "files": [
- "src/getallheaders.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Ralph Khattar",
- "email": "ralph.khattar@gmail.com"
- }
- ],
- "description": "A polyfill for getallheaders."
- },
- {
- "name": "ramsey/collection",
- "version": "2.0.0",
- "version_normalized": "2.0.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/ramsey/collection.git",
- "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
- "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
- "shasum": ""
- },
- "require": {
- "php": "^8.1"
- },
- "require-dev": {
- "captainhook/plugin-composer": "^5.3",
- "ergebnis/composer-normalize": "^2.28.3",
- "fakerphp/faker": "^1.21",
- "hamcrest/hamcrest-php": "^2.0",
- "jangregor/phpstan-prophecy": "^1.0",
- "mockery/mockery": "^1.5",
- "php-parallel-lint/php-console-highlighter": "^1.0",
- "php-parallel-lint/php-parallel-lint": "^1.3",
- "phpcsstandards/phpcsutils": "^1.0.0-rc1",
- "phpspec/prophecy-phpunit": "^2.0",
- "phpstan/extension-installer": "^1.2",
- "phpstan/phpstan": "^1.9",
- "phpstan/phpstan-mockery": "^1.1",
- "phpstan/phpstan-phpunit": "^1.3",
- "phpunit/phpunit": "^9.5",
- "psalm/plugin-mockery": "^1.1",
- "psalm/plugin-phpunit": "^0.18.4",
- "ramsey/coding-standard": "^2.0.3",
- "ramsey/conventional-commits": "^1.3",
- "vimeo/psalm": "^5.4"
- },
- "time": "2022-12-31T21:50:55+00:00",
- "type": "library",
- "extra": {
- "captainhook": {
- "force-install": true
- },
- "ramsey/conventional-commits": {
- "configFile": "conventional-commits.json"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Ramsey\\Collection\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Ben Ramsey",
- "email": "ben@benramsey.com",
- "homepage": "https://benramsey.com"
- }
- ],
- "description": "A PHP library for representing and manipulating collections.",
- "keywords": [
- "array",
- "collection",
- "hash",
- "map",
- "queue",
- "set"
- ],
- "funding": [
- {
- "url": "https://github.com/ramsey",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/ramsey/collection",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "ramsey/uuid",
- "version": "4.7.4",
- "version_normalized": "4.7.4.0",
- "source": {
- "type": "git",
- "url": "https://github.com/ramsey/uuid.git",
- "reference": "60a4c63ab724854332900504274f6150ff26d286"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286",
- "reference": "60a4c63ab724854332900504274f6150ff26d286",
- "shasum": ""
- },
- "require": {
- "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11",
- "ext-json": "*",
- "php": "^8.0",
- "ramsey/collection": "^1.2 || ^2.0"
- },
- "replace": {
- "rhumsaa/uuid": "self.version"
- },
- "require-dev": {
- "captainhook/captainhook": "^5.10",
- "captainhook/plugin-composer": "^5.3",
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
- "doctrine/annotations": "^1.8",
- "ergebnis/composer-normalize": "^2.15",
- "mockery/mockery": "^1.3",
- "paragonie/random-lib": "^2",
- "php-mock/php-mock": "^2.2",
- "php-mock/php-mock-mockery": "^1.3",
- "php-parallel-lint/php-parallel-lint": "^1.1",
- "phpbench/phpbench": "^1.0",
- "phpstan/extension-installer": "^1.1",
- "phpstan/phpstan": "^1.8",
- "phpstan/phpstan-mockery": "^1.1",
- "phpstan/phpstan-phpunit": "^1.1",
- "phpunit/phpunit": "^8.5 || ^9",
- "ramsey/composer-repl": "^1.4",
- "slevomat/coding-standard": "^8.4",
- "squizlabs/php_codesniffer": "^3.5",
- "vimeo/psalm": "^4.9"
- },
- "suggest": {
- "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.",
- "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.",
- "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.",
- "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
- "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type."
- },
- "time": "2023-04-15T23:01:58+00:00",
- "type": "library",
- "extra": {
- "captainhook": {
- "force-install": true
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "src/functions.php"
- ],
- "psr-4": {
- "Ramsey\\Uuid\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).",
- "keywords": [
- "guid",
- "identifier",
- "uuid"
- ],
- "funding": [
- {
- "url": "https://github.com/ramsey",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid",
- "type": "tidelift"
- }
- ]
- },
- {
- "name": "rize/uri-template",
- "version": "0.3.5",
- "version_normalized": "0.3.5.0",
- "source": {
- "type": "git",
- "url": "https://github.com/rize/UriTemplate.git",
- "reference": "5ed4ba8ea34af84485dea815d4b6b620794d1168"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/rize/UriTemplate/zipball/5ed4ba8ea34af84485dea815d4b6b620794d1168",
- "reference": "5ed4ba8ea34af84485dea815d4b6b620794d1168",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.8.36"
- },
- "time": "2022-10-12T17:22:51+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Rize\\": "src/Rize"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Marut K",
- "homepage": "http://twitter.com/rezigned"
- }
- ],
- "description": "PHP URI Template (RFC 6570) supports both expansion & extraction",
- "keywords": [
- "RFC 6570",
- "template",
- "uri"
- ],
- "funding": [
- {
- "url": "https://www.paypal.me/rezigned",
- "type": "custom"
- },
- {
- "url": "https://github.com/rezigned",
- "type": "github"
- },
- {
- "url": "https://opencollective.com/rize-uri-template",
- "type": "open_collective"
- }
- ]
- },
- {
- "name": "symfony/deprecation-contracts",
- "version": "v3.2.1",
- "version_normalized": "3.2.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/deprecation-contracts.git",
- "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e",
- "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e",
- "shasum": ""
- },
- "require": {
- "php": ">=8.1"
- },
- "time": "2023-03-01T10:25:55+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.3-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "function.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "A generic function and convention to trigger deprecation notices",
- "homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ]
- }
-]
+{
+ "packages": [
+ {
+ "name": "brick/math",
+ "version": "0.11.0",
+ "version_normalized": "0.11.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/brick/math.git",
+ "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478",
+ "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^8.0"
+ },
+ "require-dev": {
+ "php-coveralls/php-coveralls": "^2.2",
+ "phpunit/phpunit": "^9.0",
+ "vimeo/psalm": "5.0.0"
+ },
+ "time": "2023-01-15T23:15:59+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Brick\\Math\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Arbitrary-precision arithmetic library",
+ "keywords": [
+ "Arbitrary-precision",
+ "BigInteger",
+ "BigRational",
+ "arithmetic",
+ "bigdecimal",
+ "bignum",
+ "brick",
+ "math"
+ ],
+ "support": {
+ "issues": "https://github.com/brick/math/issues",
+ "source": "https://github.com/brick/math/tree/0.11.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/BenMorel",
+ "type": "github"
+ }
+ ],
+ "install-path": "../brick/math"
+ },
+ {
+ "name": "firebase/php-jwt",
+ "version": "v6.9.0",
+ "version_normalized": "6.9.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/firebase/php-jwt.git",
+ "reference": "f03270e63eaccf3019ef0f32849c497385774e11"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/firebase/php-jwt/zipball/f03270e63eaccf3019ef0f32849c497385774e11",
+ "reference": "f03270e63eaccf3019ef0f32849c497385774e11",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4||^8.0"
+ },
+ "require-dev": {
+ "guzzlehttp/guzzle": "^6.5||^7.4",
+ "phpspec/prophecy-phpunit": "^2.0",
+ "phpunit/phpunit": "^9.5",
+ "psr/cache": "^1.0||^2.0",
+ "psr/http-client": "^1.0",
+ "psr/http-factory": "^1.0"
+ },
+ "suggest": {
+ "ext-sodium": "Support EdDSA (Ed25519) signatures",
+ "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
+ },
+ "time": "2023-10-05T00:24:42+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Firebase\\JWT\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Neuman Vong",
+ "email": "neuman+pear@twilio.com",
+ "role": "Developer"
+ },
+ {
+ "name": "Anant Narayanan",
+ "email": "anant@php.net",
+ "role": "Developer"
+ }
+ ],
+ "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
+ "homepage": "https://github.com/firebase/php-jwt",
+ "keywords": [
+ "jwt",
+ "php"
+ ],
+ "support": {
+ "issues": "https://github.com/firebase/php-jwt/issues",
+ "source": "https://github.com/firebase/php-jwt/tree/v6.9.0"
+ },
+ "install-path": "../firebase/php-jwt"
+ },
+ {
+ "name": "google/apiclient-services",
+ "version": "v0.323.0",
+ "version_normalized": "0.323.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/googleapis/google-api-php-client-services.git",
+ "reference": "d5497d30ddfafe7592102ca48bedaf222a4ca7a6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/d5497d30ddfafe7592102ca48bedaf222a4ca7a6",
+ "reference": "d5497d30ddfafe7592102ca48bedaf222a4ca7a6",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4||^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7||^8.5.13"
+ },
+ "time": "2023-11-06T01:08:38+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "autoload.php"
+ ],
+ "psr-4": {
+ "Google\\Service\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "description": "Client library for Google APIs",
+ "homepage": "http://developers.google.com/api-client-library/php",
+ "keywords": [
+ "google"
+ ],
+ "support": {
+ "issues": "https://github.com/googleapis/google-api-php-client-services/issues",
+ "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.323.0"
+ },
+ "install-path": "../google/apiclient-services"
+ },
+ {
+ "name": "google/auth",
+ "version": "v1.32.1",
+ "version_normalized": "1.32.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/googleapis/google-auth-library-php.git",
+ "reference": "999e9ce8b9d17914f04e1718271a0a46da4de2f3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/999e9ce8b9d17914f04e1718271a0a46da4de2f3",
+ "reference": "999e9ce8b9d17914f04e1718271a0a46da4de2f3",
+ "shasum": ""
+ },
+ "require": {
+ "firebase/php-jwt": "^6.0",
+ "guzzlehttp/guzzle": "^6.2.1|^7.0",
+ "guzzlehttp/psr7": "^2.4.5",
+ "php": "^7.4||^8.0",
+ "psr/cache": "^1.0||^2.0||^3.0",
+ "psr/http-message": "^1.1||^2.0"
+ },
+ "require-dev": {
+ "guzzlehttp/promises": "^2.0",
+ "kelvinmo/simplejwt": "0.7.1",
+ "phpseclib/phpseclib": "^3.0",
+ "phpspec/prophecy-phpunit": "^2.0",
+ "phpunit/phpunit": "^9.0.0",
+ "sebastian/comparator": ">=1.2.3",
+ "squizlabs/php_codesniffer": "^3.5"
+ },
+ "suggest": {
+ "phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2."
+ },
+ "time": "2023-10-17T21:13:22+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Google\\Auth\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "description": "Google Auth Library for PHP",
+ "homepage": "http://github.com/google/google-auth-library-php",
+ "keywords": [
+ "Authentication",
+ "google",
+ "oauth2"
+ ],
+ "support": {
+ "docs": "https://googleapis.github.io/google-auth-library-php/main/",
+ "issues": "https://github.com/googleapis/google-auth-library-php/issues",
+ "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.32.1"
+ },
+ "install-path": "../google/auth"
+ },
+ {
+ "name": "google/cloud-core",
+ "version": "v1.52.8",
+ "version_normalized": "1.52.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/googleapis/google-cloud-php-core.git",
+ "reference": "2ebcaa410f7e92dca5677dd9cc4ec1f9f315e83c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/2ebcaa410f7e92dca5677dd9cc4ec1f9f315e83c",
+ "reference": "2ebcaa410f7e92dca5677dd9cc4ec1f9f315e83c",
+ "shasum": ""
+ },
+ "require": {
+ "google/auth": "^1.18",
+ "guzzlehttp/guzzle": "^6.5.8|^7.4.4",
+ "guzzlehttp/promises": "^1.4||^2.0",
+ "guzzlehttp/psr7": "^1.7|^2.0",
+ "monolog/monolog": "^1.1|^2.0|^3.0",
+ "php": ">=7.4",
+ "psr/http-message": "^1.0|^2.0",
+ "rize/uri-template": "~0.3"
+ },
+ "require-dev": {
+ "erusev/parsedown": "^1.6",
+ "google/cloud-common-protos": "^0.4",
+ "google/gax": "^1.24.0",
+ "opis/closure": "^3",
+ "phpdocumentor/reflection": "^5.0",
+ "phpspec/prophecy-phpunit": "^2.0",
+ "phpunit/phpunit": "^9.0",
+ "squizlabs/php_codesniffer": "2.*"
+ },
+ "suggest": {
+ "opis/closure": "May be used to serialize closures to process jobs in the batch daemon. Please require version ^3.",
+ "symfony/lock": "Required for the Spanner cached based session pool. Please require the following commit: 3.3.x-dev#1ba6ac9"
+ },
+ "time": "2023-11-02T19:15:44+00:00",
+ "bin": [
+ "bin/google-cloud-batch"
+ ],
+ "type": "library",
+ "extra": {
+ "component": {
+ "id": "cloud-core",
+ "target": "googleapis/google-cloud-php-core.git",
+ "path": "Core",
+ "entry": "src/ServiceBuilder.php"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Google\\Cloud\\Core\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "description": "Google Cloud PHP shared dependency, providing functionality useful to all components.",
+ "support": {
+ "source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.52.8"
+ },
+ "install-path": "../google/cloud-core"
+ },
+ {
+ "name": "google/cloud-storage",
+ "version": "v1.34.0",
+ "version_normalized": "1.34.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/googleapis/google-cloud-php-storage.git",
+ "reference": "4589dd3c8f4171db4ce3eb335fc7d894661ca0e9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/googleapis/google-cloud-php-storage/zipball/4589dd3c8f4171db4ce3eb335fc7d894661ca0e9",
+ "reference": "4589dd3c8f4171db4ce3eb335fc7d894661ca0e9",
+ "shasum": ""
+ },
+ "require": {
+ "google/cloud-core": "^1.52.7",
+ "php": ">=7.4",
+ "ramsey/uuid": "^4.2.3"
+ },
+ "require-dev": {
+ "erusev/parsedown": "^1.6",
+ "google/cloud-pubsub": "^1.0",
+ "phpdocumentor/reflection": "^5.0",
+ "phpseclib/phpseclib": "^2.0||^3.0",
+ "phpspec/prophecy-phpunit": "^2.0",
+ "phpunit/phpunit": "^9.0",
+ "squizlabs/php_codesniffer": "2.*"
+ },
+ "suggest": {
+ "google/cloud-pubsub": "May be used to register a topic to receive bucket notifications.",
+ "phpseclib/phpseclib": "May be used in place of OpenSSL for creating signed Cloud Storage URLs. Please require version ^2."
+ },
+ "time": "2023-11-02T19:15:44+00:00",
+ "type": "library",
+ "extra": {
+ "component": {
+ "id": "cloud-storage",
+ "target": "googleapis/google-cloud-php-storage.git",
+ "path": "Storage",
+ "entry": "src/StorageClient.php"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Google\\Cloud\\Storage\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "description": "Cloud Storage Client for PHP",
+ "support": {
+ "source": "https://github.com/googleapis/google-cloud-php-storage/tree/v1.34.0"
+ },
+ "install-path": "../google/cloud-storage"
+ },
+ {
+ "name": "guzzlehttp/guzzle",
+ "version": "7.8.0",
+ "version_normalized": "7.8.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9",
+ "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
+ "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
+ "php": "^7.2.5 || ^8.0",
+ "psr/http-client": "^1.0",
+ "symfony/deprecation-contracts": "^2.2 || ^3.0"
+ },
+ "provide": {
+ "psr/http-client-implementation": "1.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "ext-curl": "*",
+ "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
+ "php-http/message-factory": "^1.1",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23",
+ "psr/log": "^1.1 || ^2.0 || ^3.0"
+ },
+ "suggest": {
+ "ext-curl": "Required for CURL handler support",
+ "ext-intl": "Required for Internationalized Domain Name (IDN) support",
+ "psr/log": "Required for using the Log middleware"
+ },
+ "time": "2023-08-27T10:20:53+00:00",
+ "type": "library",
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "src/functions_include.php"
+ ],
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Jeremy Lindblom",
+ "email": "jeremeamia@gmail.com",
+ "homepage": "https://github.com/jeremeamia"
+ },
+ {
+ "name": "George Mponos",
+ "email": "gmponos@gmail.com",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "description": "Guzzle is a PHP HTTP client library",
+ "keywords": [
+ "client",
+ "curl",
+ "framework",
+ "http",
+ "http client",
+ "psr-18",
+ "psr-7",
+ "rest",
+ "web service"
+ ],
+ "support": {
+ "issues": "https://github.com/guzzle/guzzle/issues",
+ "source": "https://github.com/guzzle/guzzle/tree/7.8.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../guzzlehttp/guzzle"
+ },
+ {
+ "name": "guzzlehttp/promises",
+ "version": "2.0.1",
+ "version_normalized": "2.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/promises.git",
+ "reference": "111166291a0f8130081195ac4556a5587d7f1b5d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d",
+ "reference": "111166291a0f8130081195ac4556a5587d7f1b5d",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2.5 || ^8.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23"
+ },
+ "time": "2023-08-03T15:11:55+00:00",
+ "type": "library",
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Promise\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "description": "Guzzle promises library",
+ "keywords": [
+ "promise"
+ ],
+ "support": {
+ "issues": "https://github.com/guzzle/promises/issues",
+ "source": "https://github.com/guzzle/promises/tree/2.0.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../guzzlehttp/promises"
+ },
+ {
+ "name": "guzzlehttp/psr7",
+ "version": "2.6.1",
+ "version_normalized": "2.6.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727",
+ "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2.5 || ^8.0",
+ "psr/http-factory": "^1.0",
+ "psr/http-message": "^1.1 || ^2.0",
+ "ralouphie/getallheaders": "^3.0"
+ },
+ "provide": {
+ "psr/http-factory-implementation": "1.0",
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "http-interop/http-factory-tests": "^0.9",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23"
+ },
+ "suggest": {
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
+ },
+ "time": "2023-08-27T10:13:57+00:00",
+ "type": "library",
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "hello@gjcampbell.co.uk",
+ "homepage": "https://github.com/GrahamCampbell"
+ },
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "George Mponos",
+ "email": "gmponos@gmail.com",
+ "homepage": "https://github.com/gmponos"
+ },
+ {
+ "name": "Tobias Nyholm",
+ "email": "tobias.nyholm@gmail.com",
+ "homepage": "https://github.com/Nyholm"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://github.com/sagikazarmark"
+ },
+ {
+ "name": "Tobias Schultze",
+ "email": "webmaster@tubo-world.de",
+ "homepage": "https://github.com/Tobion"
+ },
+ {
+ "name": "Márk Sági-Kazár",
+ "email": "mark.sagikazar@gmail.com",
+ "homepage": "https://sagikazarmark.hu"
+ }
+ ],
+ "description": "PSR-7 message implementation that also provides common utility methods",
+ "keywords": [
+ "http",
+ "message",
+ "psr-7",
+ "request",
+ "response",
+ "stream",
+ "uri",
+ "url"
+ ],
+ "support": {
+ "issues": "https://github.com/guzzle/psr7/issues",
+ "source": "https://github.com/guzzle/psr7/tree/2.6.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/Nyholm",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../guzzlehttp/psr7"
+ },
+ {
+ "name": "monolog/monolog",
+ "version": "2.9.2",
+ "version_normalized": "2.9.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Seldaek/monolog.git",
+ "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/437cb3628f4cf6042cc10ae97fc2b8472e48ca1f",
+ "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2",
+ "psr/log": "^1.0.1 || ^2.0 || ^3.0"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0"
+ },
+ "require-dev": {
+ "aws/aws-sdk-php": "^2.4.9 || ^3.0",
+ "doctrine/couchdb": "~1.0@dev",
+ "elasticsearch/elasticsearch": "^7 || ^8",
+ "ext-json": "*",
+ "graylog2/gelf-php": "^1.4.2 || ^2@dev",
+ "guzzlehttp/guzzle": "^7.4",
+ "guzzlehttp/psr7": "^2.2",
+ "mongodb/mongodb": "^1.8",
+ "php-amqplib/php-amqplib": "~2.4 || ^3",
+ "phpspec/prophecy": "^1.15",
+ "phpstan/phpstan": "^0.12.91",
+ "phpunit/phpunit": "^8.5.14",
+ "predis/predis": "^1.1 || ^2.0",
+ "rollbar/rollbar": "^1.3 || ^2 || ^3",
+ "ruflin/elastica": "^7",
+ "swiftmailer/swiftmailer": "^5.3|^6.0",
+ "symfony/mailer": "^5.4 || ^6",
+ "symfony/mime": "^5.4 || ^6"
+ },
+ "suggest": {
+ "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
+ "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
+ "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
+ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
+ "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
+ "ext-mbstring": "Allow to work properly with unicode symbols",
+ "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
+ "ext-openssl": "Required to send log messages using SSL",
+ "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
+ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
+ "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
+ "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
+ "rollbar/rollbar": "Allow sending log messages to Rollbar",
+ "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
+ },
+ "time": "2023-10-27T15:25:26+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Monolog\\": "src/Monolog"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "https://seld.be"
+ }
+ ],
+ "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
+ "homepage": "https://github.com/Seldaek/monolog",
+ "keywords": [
+ "log",
+ "logging",
+ "psr-3"
+ ],
+ "support": {
+ "issues": "https://github.com/Seldaek/monolog/issues",
+ "source": "https://github.com/Seldaek/monolog/tree/2.9.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/Seldaek",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../monolog/monolog"
+ },
+ {
+ "name": "paragonie/constant_time_encoding",
+ "version": "v2.6.3",
+ "version_normalized": "2.6.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/paragonie/constant_time_encoding.git",
+ "reference": "58c3f47f650c94ec05a151692652a868995d2938"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938",
+ "reference": "58c3f47f650c94ec05a151692652a868995d2938",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7|^8"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6|^7|^8|^9",
+ "vimeo/psalm": "^1|^2|^3|^4"
+ },
+ "time": "2022-06-14T06:56:20+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "ParagonIE\\ConstantTime\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Paragon Initiative Enterprises",
+ "email": "security@paragonie.com",
+ "homepage": "https://paragonie.com",
+ "role": "Maintainer"
+ },
+ {
+ "name": "Steve 'Sc00bz' Thomas",
+ "email": "steve@tobtu.com",
+ "homepage": "https://www.tobtu.com",
+ "role": "Original Developer"
+ }
+ ],
+ "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)",
+ "keywords": [
+ "base16",
+ "base32",
+ "base32_decode",
+ "base32_encode",
+ "base64",
+ "base64_decode",
+ "base64_encode",
+ "bin2hex",
+ "encoding",
+ "hex",
+ "hex2bin",
+ "rfc4648"
+ ],
+ "support": {
+ "email": "info@paragonie.com",
+ "issues": "https://github.com/paragonie/constant_time_encoding/issues",
+ "source": "https://github.com/paragonie/constant_time_encoding"
+ },
+ "install-path": "../paragonie/constant_time_encoding"
+ },
+ {
+ "name": "paragonie/random_compat",
+ "version": "v9.99.100",
+ "version_normalized": "9.99.100.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/paragonie/random_compat.git",
+ "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a",
+ "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">= 7"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.*|5.*",
+ "vimeo/psalm": "^1"
+ },
+ "suggest": {
+ "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
+ },
+ "time": "2020-10-15T08:29:30+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Paragon Initiative Enterprises",
+ "email": "security@paragonie.com",
+ "homepage": "https://paragonie.com"
+ }
+ ],
+ "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
+ "keywords": [
+ "csprng",
+ "polyfill",
+ "pseudorandom",
+ "random"
+ ],
+ "support": {
+ "email": "info@paragonie.com",
+ "issues": "https://github.com/paragonie/random_compat/issues",
+ "source": "https://github.com/paragonie/random_compat"
+ },
+ "install-path": "../paragonie/random_compat"
+ },
+ {
+ "name": "phpseclib/phpseclib",
+ "version": "3.0.33",
+ "version_normalized": "3.0.33.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpseclib/phpseclib.git",
+ "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/33fa69b2514a61138dd48e7a49f99445711e0ad0",
+ "reference": "33fa69b2514a61138dd48e7a49f99445711e0ad0",
+ "shasum": ""
+ },
+ "require": {
+ "paragonie/constant_time_encoding": "^1|^2",
+ "paragonie/random_compat": "^1.4|^2.0|^9.99.99",
+ "php": ">=5.6.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "*"
+ },
+ "suggest": {
+ "ext-dom": "Install the DOM extension to load XML formatted public keys.",
+ "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
+ "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
+ "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
+ "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
+ },
+ "time": "2023-10-21T14:00:39+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "phpseclib/bootstrap.php"
+ ],
+ "psr-4": {
+ "phpseclib3\\": "phpseclib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jim Wigginton",
+ "email": "terrafrost@php.net",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Patrick Monnerat",
+ "email": "pm@datasphere.ch",
+ "role": "Developer"
+ },
+ {
+ "name": "Andreas Fischer",
+ "email": "bantu@phpbb.com",
+ "role": "Developer"
+ },
+ {
+ "name": "Hans-Jürgen Petrich",
+ "email": "petrich@tronic-media.com",
+ "role": "Developer"
+ },
+ {
+ "name": "Graham Campbell",
+ "email": "graham@alt-three.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
+ "homepage": "http://phpseclib.sourceforge.net",
+ "keywords": [
+ "BigInteger",
+ "aes",
+ "asn.1",
+ "asn1",
+ "blowfish",
+ "crypto",
+ "cryptography",
+ "encryption",
+ "rsa",
+ "security",
+ "sftp",
+ "signature",
+ "signing",
+ "ssh",
+ "twofish",
+ "x.509",
+ "x509"
+ ],
+ "support": {
+ "issues": "https://github.com/phpseclib/phpseclib/issues",
+ "source": "https://github.com/phpseclib/phpseclib/tree/3.0.33"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/terrafrost",
+ "type": "github"
+ },
+ {
+ "url": "https://www.patreon.com/phpseclib",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../phpseclib/phpseclib"
+ },
+ {
+ "name": "psr/cache",
+ "version": "2.0.0",
+ "version_normalized": "2.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/cache.git",
+ "reference": "213f9dbc5b9bfbc4f8db86d2838dc968752ce13b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/cache/zipball/213f9dbc5b9bfbc4f8db86d2838dc968752ce13b",
+ "reference": "213f9dbc5b9bfbc4f8db86d2838dc968752ce13b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.0.0"
+ },
+ "time": "2021-02-03T23:23:37+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Cache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for caching libraries",
+ "keywords": [
+ "cache",
+ "psr",
+ "psr-6"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/cache/tree/2.0.0"
+ },
+ "install-path": "../psr/cache"
+ },
+ {
+ "name": "psr/http-client",
+ "version": "1.0.3",
+ "version_normalized": "1.0.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-client.git",
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
+ "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0 || ^8.0",
+ "psr/http-message": "^1.0 || ^2.0"
+ },
+ "time": "2023-09-23T14:17:50+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Client\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for HTTP clients",
+ "homepage": "https://github.com/php-fig/http-client",
+ "keywords": [
+ "http",
+ "http-client",
+ "psr",
+ "psr-18"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/http-client"
+ },
+ "install-path": "../psr/http-client"
+ },
+ {
+ "name": "psr/http-factory",
+ "version": "1.0.2",
+ "version_normalized": "1.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-factory.git",
+ "reference": "e616d01114759c4c489f93b099585439f795fe35"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35",
+ "reference": "e616d01114759c4c489f93b099585439f795fe35",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0.0",
+ "psr/http-message": "^1.0 || ^2.0"
+ },
+ "time": "2023-04-10T20:10:41+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Message\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interfaces for PSR-7 HTTP message factories",
+ "keywords": [
+ "factory",
+ "http",
+ "message",
+ "psr",
+ "psr-17",
+ "psr-7",
+ "request",
+ "response"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/http-factory/tree/1.0.2"
+ },
+ "install-path": "../psr/http-factory"
+ },
+ {
+ "name": "psr/http-message",
+ "version": "2.0",
+ "version_normalized": "2.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-message.git",
+ "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
+ "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0"
+ },
+ "time": "2023-04-04T09:54:51+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Message\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for HTTP messages",
+ "homepage": "https://github.com/php-fig/http-message",
+ "keywords": [
+ "http",
+ "http-message",
+ "psr",
+ "psr-7",
+ "request",
+ "response"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/http-message/tree/2.0"
+ },
+ "install-path": "../psr/http-message"
+ },
+ {
+ "name": "psr/log",
+ "version": "1.1.4",
+ "version_normalized": "1.1.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "time": "2021-05-03T11:20:27+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/log/tree/1.1.4"
+ },
+ "install-path": "../psr/log"
+ },
+ {
+ "name": "ralouphie/getallheaders",
+ "version": "3.0.3",
+ "version_normalized": "3.0.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ralouphie/getallheaders.git",
+ "reference": "120b605dfeb996808c31b6477290a714d356e822"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
+ "reference": "120b605dfeb996808c31b6477290a714d356e822",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.6"
+ },
+ "require-dev": {
+ "php-coveralls/php-coveralls": "^2.1",
+ "phpunit/phpunit": "^5 || ^6.5"
+ },
+ "time": "2019-03-08T08:55:37+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "src/getallheaders.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ralph Khattar",
+ "email": "ralph.khattar@gmail.com"
+ }
+ ],
+ "description": "A polyfill for getallheaders.",
+ "support": {
+ "issues": "https://github.com/ralouphie/getallheaders/issues",
+ "source": "https://github.com/ralouphie/getallheaders/tree/develop"
+ },
+ "install-path": "../ralouphie/getallheaders"
+ },
+ {
+ "name": "ramsey/collection",
+ "version": "1.3.0",
+ "version_normalized": "1.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ramsey/collection.git",
+ "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ramsey/collection/zipball/ad7475d1c9e70b190ecffc58f2d989416af339b4",
+ "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0",
+ "symfony/polyfill-php81": "^1.23"
+ },
+ "require-dev": {
+ "captainhook/plugin-composer": "^5.3",
+ "ergebnis/composer-normalize": "^2.28.3",
+ "fakerphp/faker": "^1.21",
+ "hamcrest/hamcrest-php": "^2.0",
+ "jangregor/phpstan-prophecy": "^1.0",
+ "mockery/mockery": "^1.5",
+ "php-parallel-lint/php-console-highlighter": "^1.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3",
+ "phpcsstandards/phpcsutils": "^1.0.0-rc1",
+ "phpspec/prophecy-phpunit": "^2.0",
+ "phpstan/extension-installer": "^1.2",
+ "phpstan/phpstan": "^1.9",
+ "phpstan/phpstan-mockery": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.3",
+ "phpunit/phpunit": "^9.5",
+ "psalm/plugin-mockery": "^1.1",
+ "psalm/plugin-phpunit": "^0.18.4",
+ "ramsey/coding-standard": "^2.0.3",
+ "ramsey/conventional-commits": "^1.3",
+ "vimeo/psalm": "^5.4"
+ },
+ "time": "2022-12-27T19:12:24+00:00",
+ "type": "library",
+ "extra": {
+ "captainhook": {
+ "force-install": true
+ },
+ "ramsey/conventional-commits": {
+ "configFile": "conventional-commits.json"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Ramsey\\Collection\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ben Ramsey",
+ "email": "ben@benramsey.com",
+ "homepage": "https://benramsey.com"
+ }
+ ],
+ "description": "A PHP library for representing and manipulating collections.",
+ "keywords": [
+ "array",
+ "collection",
+ "hash",
+ "map",
+ "queue",
+ "set"
+ ],
+ "support": {
+ "issues": "https://github.com/ramsey/collection/issues",
+ "source": "https://github.com/ramsey/collection/tree/1.3.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/ramsey",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/ramsey/collection",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../ramsey/collection"
+ },
+ {
+ "name": "ramsey/uuid",
+ "version": "4.7.4",
+ "version_normalized": "4.7.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ramsey/uuid.git",
+ "reference": "60a4c63ab724854332900504274f6150ff26d286"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286",
+ "reference": "60a4c63ab724854332900504274f6150ff26d286",
+ "shasum": ""
+ },
+ "require": {
+ "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11",
+ "ext-json": "*",
+ "php": "^8.0",
+ "ramsey/collection": "^1.2 || ^2.0"
+ },
+ "replace": {
+ "rhumsaa/uuid": "self.version"
+ },
+ "require-dev": {
+ "captainhook/captainhook": "^5.10",
+ "captainhook/plugin-composer": "^5.3",
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
+ "doctrine/annotations": "^1.8",
+ "ergebnis/composer-normalize": "^2.15",
+ "mockery/mockery": "^1.3",
+ "paragonie/random-lib": "^2",
+ "php-mock/php-mock": "^2.2",
+ "php-mock/php-mock-mockery": "^1.3",
+ "php-parallel-lint/php-parallel-lint": "^1.1",
+ "phpbench/phpbench": "^1.0",
+ "phpstan/extension-installer": "^1.1",
+ "phpstan/phpstan": "^1.8",
+ "phpstan/phpstan-mockery": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.1",
+ "phpunit/phpunit": "^8.5 || ^9",
+ "ramsey/composer-repl": "^1.4",
+ "slevomat/coding-standard": "^8.4",
+ "squizlabs/php_codesniffer": "^3.5",
+ "vimeo/psalm": "^4.9"
+ },
+ "suggest": {
+ "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.",
+ "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.",
+ "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.",
+ "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
+ "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type."
+ },
+ "time": "2023-04-15T23:01:58+00:00",
+ "type": "library",
+ "extra": {
+ "captainhook": {
+ "force-install": true
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "src/functions.php"
+ ],
+ "psr-4": {
+ "Ramsey\\Uuid\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).",
+ "keywords": [
+ "guid",
+ "identifier",
+ "uuid"
+ ],
+ "support": {
+ "issues": "https://github.com/ramsey/uuid/issues",
+ "source": "https://github.com/ramsey/uuid/tree/4.7.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/ramsey",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../ramsey/uuid"
+ },
+ {
+ "name": "rize/uri-template",
+ "version": "0.3.5",
+ "version_normalized": "0.3.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/rize/UriTemplate.git",
+ "reference": "5ed4ba8ea34af84485dea815d4b6b620794d1168"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/rize/UriTemplate/zipball/5ed4ba8ea34af84485dea815d4b6b620794d1168",
+ "reference": "5ed4ba8ea34af84485dea815d4b6b620794d1168",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8.36"
+ },
+ "time": "2022-10-12T17:22:51+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Rize\\": "src/Rize"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marut K",
+ "homepage": "http://twitter.com/rezigned"
+ }
+ ],
+ "description": "PHP URI Template (RFC 6570) supports both expansion & extraction",
+ "keywords": [
+ "RFC 6570",
+ "template",
+ "uri"
+ ],
+ "support": {
+ "issues": "https://github.com/rize/UriTemplate/issues",
+ "source": "https://github.com/rize/UriTemplate/tree/0.3.5"
+ },
+ "funding": [
+ {
+ "url": "https://www.paypal.me/rezigned",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/rezigned",
+ "type": "github"
+ },
+ {
+ "url": "https://opencollective.com/rize-uri-template",
+ "type": "open_collective"
+ }
+ ],
+ "install-path": "../rize/uri-template"
+ },
+ {
+ "name": "symfony/deprecation-contracts",
+ "version": "v3.0.2",
+ "version_normalized": "3.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
+ "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.0.2"
+ },
+ "time": "2022-01-02T09:55:41+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.0-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/deprecation-contracts"
+ },
+ {
+ "name": "symfony/polyfill-php81",
+ "version": "v1.28.0",
+ "version_normalized": "1.28.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php81.git",
+ "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b",
+ "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2023-01-26T09:26:14+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.28-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php81\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-php81"
+ }
+ ],
+ "dev": false,
+ "dev-package-names": []
+}
diff --git a/lib/Google/vendor/composer/installed.php b/lib/Google/vendor/composer/installed.php
new file mode 100644
index 000000000..dd404f09d
--- /dev/null
+++ b/lib/Google/vendor/composer/installed.php
@@ -0,0 +1,269 @@
+ array(
+ 'name' => 'google/apiclient',
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => 'f7f20f2eef1ca5dc4e2614c43dd40bb5689ccda3',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'dev' => false,
+ ),
+ 'versions' => array(
+ 'brick/math' => array(
+ 'pretty_version' => '0.11.0',
+ 'version' => '0.11.0.0',
+ 'reference' => '0ad82ce168c82ba30d1c01ec86116ab52f589478',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../brick/math',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'firebase/php-jwt' => array(
+ 'pretty_version' => 'v6.9.0',
+ 'version' => '6.9.0.0',
+ 'reference' => 'f03270e63eaccf3019ef0f32849c497385774e11',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../firebase/php-jwt',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'google/apiclient' => array(
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => 'f7f20f2eef1ca5dc4e2614c43dd40bb5689ccda3',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'google/apiclient-services' => array(
+ 'pretty_version' => 'v0.323.0',
+ 'version' => '0.323.0.0',
+ 'reference' => 'd5497d30ddfafe7592102ca48bedaf222a4ca7a6',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../google/apiclient-services',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'google/auth' => array(
+ 'pretty_version' => 'v1.32.1',
+ 'version' => '1.32.1.0',
+ 'reference' => '999e9ce8b9d17914f04e1718271a0a46da4de2f3',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../google/auth',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'google/cloud-core' => array(
+ 'pretty_version' => 'v1.52.8',
+ 'version' => '1.52.8.0',
+ 'reference' => '2ebcaa410f7e92dca5677dd9cc4ec1f9f315e83c',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../google/cloud-core',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'google/cloud-storage' => array(
+ 'pretty_version' => 'v1.34.0',
+ 'version' => '1.34.0.0',
+ 'reference' => '4589dd3c8f4171db4ce3eb335fc7d894661ca0e9',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../google/cloud-storage',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'guzzlehttp/guzzle' => array(
+ 'pretty_version' => '7.8.0',
+ 'version' => '7.8.0.0',
+ 'reference' => '1110f66a6530a40fe7aea0378fe608ee2b2248f9',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'guzzlehttp/promises' => array(
+ 'pretty_version' => '2.0.1',
+ 'version' => '2.0.1.0',
+ 'reference' => '111166291a0f8130081195ac4556a5587d7f1b5d',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../guzzlehttp/promises',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'guzzlehttp/psr7' => array(
+ 'pretty_version' => '2.6.1',
+ 'version' => '2.6.1.0',
+ 'reference' => 'be45764272e8873c72dbe3d2edcfdfcc3bc9f727',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../guzzlehttp/psr7',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'monolog/monolog' => array(
+ 'pretty_version' => '2.9.2',
+ 'version' => '2.9.2.0',
+ 'reference' => '437cb3628f4cf6042cc10ae97fc2b8472e48ca1f',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../monolog/monolog',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'paragonie/constant_time_encoding' => array(
+ 'pretty_version' => 'v2.6.3',
+ 'version' => '2.6.3.0',
+ 'reference' => '58c3f47f650c94ec05a151692652a868995d2938',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../paragonie/constant_time_encoding',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'paragonie/random_compat' => array(
+ 'pretty_version' => 'v9.99.100',
+ 'version' => '9.99.100.0',
+ 'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../paragonie/random_compat',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'phpseclib/phpseclib' => array(
+ 'pretty_version' => '3.0.33',
+ 'version' => '3.0.33.0',
+ 'reference' => '33fa69b2514a61138dd48e7a49f99445711e0ad0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpseclib/phpseclib',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/cache' => array(
+ 'pretty_version' => '2.0.0',
+ 'version' => '2.0.0.0',
+ 'reference' => '213f9dbc5b9bfbc4f8db86d2838dc968752ce13b',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/cache',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/http-client' => array(
+ 'pretty_version' => '1.0.3',
+ 'version' => '1.0.3.0',
+ 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/http-client',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/http-client-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '1.0',
+ ),
+ ),
+ 'psr/http-factory' => array(
+ 'pretty_version' => '1.0.2',
+ 'version' => '1.0.2.0',
+ 'reference' => 'e616d01114759c4c489f93b099585439f795fe35',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/http-factory',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/http-factory-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '1.0',
+ ),
+ ),
+ 'psr/http-message' => array(
+ 'pretty_version' => '2.0',
+ 'version' => '2.0.0.0',
+ 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/http-message',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/http-message-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '1.0',
+ ),
+ ),
+ 'psr/log' => array(
+ 'pretty_version' => '1.1.4',
+ 'version' => '1.1.4.0',
+ 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/log',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/log-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '1.0.0 || 2.0.0 || 3.0.0',
+ ),
+ ),
+ 'ralouphie/getallheaders' => array(
+ 'pretty_version' => '3.0.3',
+ 'version' => '3.0.3.0',
+ 'reference' => '120b605dfeb996808c31b6477290a714d356e822',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../ralouphie/getallheaders',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'ramsey/collection' => array(
+ 'pretty_version' => '1.3.0',
+ 'version' => '1.3.0.0',
+ 'reference' => 'ad7475d1c9e70b190ecffc58f2d989416af339b4',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../ramsey/collection',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'ramsey/uuid' => array(
+ 'pretty_version' => '4.7.4',
+ 'version' => '4.7.4.0',
+ 'reference' => '60a4c63ab724854332900504274f6150ff26d286',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../ramsey/uuid',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'rhumsaa/uuid' => array(
+ 'dev_requirement' => false,
+ 'replaced' => array(
+ 0 => '4.7.4',
+ ),
+ ),
+ 'rize/uri-template' => array(
+ 'pretty_version' => '0.3.5',
+ 'version' => '0.3.5.0',
+ 'reference' => '5ed4ba8ea34af84485dea815d4b6b620794d1168',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../rize/uri-template',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/deprecation-contracts' => array(
+ 'pretty_version' => 'v3.0.2',
+ 'version' => '3.0.2.0',
+ 'reference' => '26954b3d62a6c5fd0ea8a2a00c0353a14978d05c',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-php81' => array(
+ 'pretty_version' => 'v1.28.0',
+ 'version' => '1.28.0.0',
+ 'reference' => '7581cd600fa9fd681b797d00b02f068e2f13263b',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php81',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ ),
+);
diff --git a/lib/Google/vendor/composer/platform_check.php b/lib/Google/vendor/composer/platform_check.php
new file mode 100644
index 000000000..b168ddd5d
--- /dev/null
+++ b/lib/Google/vendor/composer/platform_check.php
@@ -0,0 +1,26 @@
+= 80002)) {
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.2". You are running ' . PHP_VERSION . '.';
+}
+
+if ($issues) {
+ if (!headers_sent()) {
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+ if (!ini_get('display_errors')) {
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+ fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
+ } elseif (!headers_sent()) {
+ echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
+ }
+ }
+ trigger_error(
+ 'Composer detected issues in your platform: ' . implode(' ', $issues),
+ E_USER_ERROR
+ );
+}
diff --git a/lib/Google/vendor/firebase/php-jwt/CHANGELOG.md b/lib/Google/vendor/firebase/php-jwt/CHANGELOG.md
index 35e97fe86..4279dfd23 100644
--- a/lib/Google/vendor/firebase/php-jwt/CHANGELOG.md
+++ b/lib/Google/vendor/firebase/php-jwt/CHANGELOG.md
@@ -1,5 +1,51 @@
# Changelog
+## [6.9.0](https://github.com/firebase/php-jwt/compare/v6.8.1...v6.9.0) (2023-10-04)
+
+
+### Features
+
+* add payload to jwt exception ([#521](https://github.com/firebase/php-jwt/issues/521)) ([175edf9](https://github.com/firebase/php-jwt/commit/175edf958bb61922ec135b2333acf5622f2238a2))
+
+## [6.8.1](https://github.com/firebase/php-jwt/compare/v6.8.0...v6.8.1) (2023-07-14)
+
+
+### Bug Fixes
+
+* accept float claims but round down to ignore them ([#492](https://github.com/firebase/php-jwt/issues/492)) ([3936842](https://github.com/firebase/php-jwt/commit/39368423beeaacb3002afa7dcb75baebf204fe7e))
+* different BeforeValidException messages for nbf and iat ([#526](https://github.com/firebase/php-jwt/issues/526)) ([0a53cf2](https://github.com/firebase/php-jwt/commit/0a53cf2986e45c2bcbf1a269f313ebf56a154ee4))
+
+## [6.8.0](https://github.com/firebase/php-jwt/compare/v6.7.0...v6.8.0) (2023-06-14)
+
+
+### Features
+
+* add support for P-384 curve ([#515](https://github.com/firebase/php-jwt/issues/515)) ([5de4323](https://github.com/firebase/php-jwt/commit/5de4323f4baf4d70bca8663bd87682a69c656c3d))
+
+
+### Bug Fixes
+
+* handle invalid http responses ([#508](https://github.com/firebase/php-jwt/issues/508)) ([91c39c7](https://github.com/firebase/php-jwt/commit/91c39c72b22fc3e1191e574089552c1f2041c718))
+
+## [6.7.0](https://github.com/firebase/php-jwt/compare/v6.6.0...v6.7.0) (2023-06-14)
+
+
+### Features
+
+* add ed25519 support to JWK (public keys) ([#452](https://github.com/firebase/php-jwt/issues/452)) ([e53979a](https://github.com/firebase/php-jwt/commit/e53979abae927de916a75b9d239cfda8ce32be2a))
+
+## [6.6.0](https://github.com/firebase/php-jwt/compare/v6.5.0...v6.6.0) (2023-06-13)
+
+
+### Features
+
+* allow get headers when decoding token ([#442](https://github.com/firebase/php-jwt/issues/442)) ([fb85f47](https://github.com/firebase/php-jwt/commit/fb85f47cfaeffdd94faf8defdf07164abcdad6c3))
+
+
+### Bug Fixes
+
+* only check iat if nbf is not used ([#493](https://github.com/firebase/php-jwt/issues/493)) ([398ccd2](https://github.com/firebase/php-jwt/commit/398ccd25ea12fa84b9e4f1085d5ff448c21ec797))
+
## [6.5.0](https://github.com/firebase/php-jwt/compare/v6.4.0...v6.5.0) (2023-05-12)
diff --git a/lib/Google/vendor/firebase/php-jwt/README.md b/lib/Google/vendor/firebase/php-jwt/README.md
index f03826673..701de23a8 100644
--- a/lib/Google/vendor/firebase/php-jwt/README.md
+++ b/lib/Google/vendor/firebase/php-jwt/README.md
@@ -45,9 +45,12 @@ $payload = [
*/
$jwt = JWT::encode($payload, $key, 'HS256');
$decoded = JWT::decode($jwt, new Key($key, 'HS256'));
-
print_r($decoded);
+// Pass a stdClass in as the third parameter to get the decoded header values
+$decoded = JWT::decode($jwt, new Key($key, 'HS256'), $headers = new stdClass());
+print_r($headers);
+
/*
NOTE: This will now be an object instead of an associative array. To get
an associative array, you will need to cast it as such:
@@ -70,8 +73,8 @@ Example encode/decode headers
Decoding the JWT headers without verifying the JWT first is NOT recommended, and is not supported by
this library. This is because without verifying the JWT, the header values could have been tampered with.
Any value pulled from an unverified header should be treated as if it could be any string sent in from an
-attacker. If this is something you still want to do in your application for whatever reason, it's possible to
-decode the header values manually simply by calling `json_decode` and `base64_decode` on the JWT
+attacker. If this is something you still want to do in your application for whatever reason, it's possible to
+decode the header values manually simply by calling `json_decode` and `base64_decode` on the JWT
header part:
```php
use Firebase\JWT\JWT;
@@ -373,6 +376,8 @@ All exceptions in the `Firebase\JWT` namespace extend `UnexpectedValueException`
like this:
```php
+use Firebase\JWT\JWT;
+use UnexpectedValueException;
try {
$decoded = JWT::decode($payload, $keys);
} catch (LogicException $e) {
diff --git a/lib/Google/vendor/firebase/php-jwt/src/BeforeValidException.php b/lib/Google/vendor/firebase/php-jwt/src/BeforeValidException.php
index c147852b9..595164bf3 100644
--- a/lib/Google/vendor/firebase/php-jwt/src/BeforeValidException.php
+++ b/lib/Google/vendor/firebase/php-jwt/src/BeforeValidException.php
@@ -2,6 +2,17 @@
namespace Firebase\JWT;
-class BeforeValidException extends \UnexpectedValueException
+class BeforeValidException extends \UnexpectedValueException implements JWTExceptionWithPayloadInterface
{
+ private object $payload;
+
+ public function setPayload(object $payload): void
+ {
+ $this->payload = $payload;
+ }
+
+ public function getPayload(): object
+ {
+ return $this->payload;
+ }
}
diff --git a/lib/Google/vendor/firebase/php-jwt/src/CachedKeySet.php b/lib/Google/vendor/firebase/php-jwt/src/CachedKeySet.php
index baf801f13..ee529f9f5 100644
--- a/lib/Google/vendor/firebase/php-jwt/src/CachedKeySet.php
+++ b/lib/Google/vendor/firebase/php-jwt/src/CachedKeySet.php
@@ -178,6 +178,16 @@ private function keyIdExists(string $keyId): bool
}
$request = $this->httpFactory->createRequest('GET', $this->jwksUri);
$jwksResponse = $this->httpClient->sendRequest($request);
+ if ($jwksResponse->getStatusCode() !== 200) {
+ throw new UnexpectedValueException(
+ sprintf('HTTP Error: %d %s for URI "%s"',
+ $jwksResponse->getStatusCode(),
+ $jwksResponse->getReasonPhrase(),
+ $this->jwksUri,
+ ),
+ $jwksResponse->getStatusCode()
+ );
+ }
$this->keySet = $this->formatJwksForCache((string) $jwksResponse->getBody());
if (!isset($this->keySet[$keyId])) {
diff --git a/lib/Google/vendor/firebase/php-jwt/src/ExpiredException.php b/lib/Google/vendor/firebase/php-jwt/src/ExpiredException.php
index 81ba52d43..12fef0944 100644
--- a/lib/Google/vendor/firebase/php-jwt/src/ExpiredException.php
+++ b/lib/Google/vendor/firebase/php-jwt/src/ExpiredException.php
@@ -2,6 +2,17 @@
namespace Firebase\JWT;
-class ExpiredException extends \UnexpectedValueException
+class ExpiredException extends \UnexpectedValueException implements JWTExceptionWithPayloadInterface
{
+ private object $payload;
+
+ public function setPayload(object $payload): void
+ {
+ $this->payload = $payload;
+ }
+
+ public function getPayload(): object
+ {
+ return $this->payload;
+ }
}
diff --git a/lib/Google/vendor/firebase/php-jwt/src/JWK.php b/lib/Google/vendor/firebase/php-jwt/src/JWK.php
index c7eff8ae4..63fb2484b 100644
--- a/lib/Google/vendor/firebase/php-jwt/src/JWK.php
+++ b/lib/Google/vendor/firebase/php-jwt/src/JWK.php
@@ -27,10 +27,16 @@ class JWK
private const EC_CURVES = [
'P-256' => '1.2.840.10045.3.1.7', // Len: 64
'secp256k1' => '1.3.132.0.10', // Len: 64
- // 'P-384' => '1.3.132.0.34', // Len: 96 (not yet supported)
+ 'P-384' => '1.3.132.0.34', // Len: 96
// 'P-521' => '1.3.132.0.35', // Len: 132 (not supported)
];
+ // For keys with "kty" equal to "OKP" (Octet Key Pair), the "crv" parameter must contain the key subtype.
+ // This library supports the following subtypes:
+ private const OKP_SUBTYPES = [
+ 'Ed25519' => true, // RFC 8037
+ ];
+
/**
* Parse a set of JWK keys
*
@@ -145,8 +151,28 @@ public static function parseKey(array $jwk, string $defaultAlg = null): ?Key
$publicKey = self::createPemFromCrvAndXYCoordinates($jwk['crv'], $jwk['x'], $jwk['y']);
return new Key($publicKey, $jwk['alg']);
+ case 'OKP':
+ if (isset($jwk['d'])) {
+ // The key is actually a private key
+ throw new UnexpectedValueException('Key data must be for a public key');
+ }
+
+ if (!isset($jwk['crv'])) {
+ throw new UnexpectedValueException('crv not set');
+ }
+
+ if (empty(self::OKP_SUBTYPES[$jwk['crv']])) {
+ throw new DomainException('Unrecognised or unsupported OKP key subtype');
+ }
+
+ if (empty($jwk['x'])) {
+ throw new UnexpectedValueException('x not set');
+ }
+
+ // This library works internally with EdDSA keys (Ed25519) encoded in standard base64.
+ $publicKey = JWT::convertBase64urlToBase64($jwk['x']);
+ return new Key($publicKey, $jwk['alg']);
default:
- // Currently only RSA is supported
break;
}
@@ -156,7 +182,7 @@ public static function parseKey(array $jwk, string $defaultAlg = null): ?Key
/**
* Converts the EC JWK values to pem format.
*
- * @param string $crv The EC curve (only P-256 is supported)
+ * @param string $crv The EC curve (only P-256 & P-384 is supported)
* @param string $x The EC x-coordinate
* @param string $y The EC y-coordinate
*
diff --git a/lib/Google/vendor/firebase/php-jwt/src/JWT.php b/lib/Google/vendor/firebase/php-jwt/src/JWT.php
index c83ff0990..6efcbb56d 100644
--- a/lib/Google/vendor/firebase/php-jwt/src/JWT.php
+++ b/lib/Google/vendor/firebase/php-jwt/src/JWT.php
@@ -78,6 +78,7 @@ class JWT
* Supported algorithms are 'ES384','ES256',
* 'HS256', 'HS384', 'HS512', 'RS256', 'RS384'
* and 'RS512'.
+ * @param stdClass $headers Optional. Populates stdClass with headers.
*
* @return stdClass The JWT's payload as a PHP object
*
@@ -94,7 +95,8 @@ class JWT
*/
public static function decode(
string $jwt,
- $keyOrKeyArray
+ $keyOrKeyArray,
+ stdClass &$headers = null
): stdClass {
// Validate JWT
$timestamp = \is_null(static::$timestamp) ? \time() : static::$timestamp;
@@ -111,6 +113,9 @@ public static function decode(
if (null === ($header = static::jsonDecode($headerRaw))) {
throw new UnexpectedValueException('Invalid header encoding');
}
+ if ($headers !== null) {
+ $headers = $header;
+ }
$payloadRaw = static::urlsafeB64Decode($bodyb64);
if (null === ($payload = static::jsonDecode($payloadRaw))) {
throw new UnexpectedValueException('Invalid claims encoding');
@@ -147,24 +152,30 @@ public static function decode(
// Check the nbf if it is defined. This is the time that the
// token can actually be used. If it's not yet that time, abort.
- if (isset($payload->nbf) && $payload->nbf > ($timestamp + static::$leeway)) {
- throw new BeforeValidException(
- 'Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->nbf)
+ if (isset($payload->nbf) && floor($payload->nbf) > ($timestamp + static::$leeway)) {
+ $ex = new BeforeValidException(
+ 'Cannot handle token with nbf prior to ' . \date(DateTime::ISO8601, (int) $payload->nbf)
);
+ $ex->setPayload($payload);
+ throw $ex;
}
// Check that this token has been created before 'now'. This prevents
// using tokens that have been created for later use (and haven't
// correctly used the nbf claim).
- if (isset($payload->iat) && $payload->iat > ($timestamp + static::$leeway)) {
- throw new BeforeValidException(
- 'Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->iat)
+ if (!isset($payload->nbf) && isset($payload->iat) && floor($payload->iat) > ($timestamp + static::$leeway)) {
+ $ex = new BeforeValidException(
+ 'Cannot handle token with iat prior to ' . \date(DateTime::ISO8601, (int) $payload->iat)
);
+ $ex->setPayload($payload);
+ throw $ex;
}
// Check if this token has expired.
if (isset($payload->exp) && ($timestamp - static::$leeway) >= $payload->exp) {
- throw new ExpiredException('Expired token');
+ $ex = new ExpiredException('Expired token');
+ $ex->setPayload($payload);
+ throw $ex;
}
return $payload;
@@ -215,7 +226,7 @@ public static function encode(
*
* @param string $msg The message to sign
* @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $key The secret key.
- * @param string $alg Supported algorithms are 'ES384','ES256', 'ES256K', 'HS256',
+ * @param string $alg Supported algorithms are 'EdDSA', 'ES384', 'ES256', 'ES256K', 'HS256',
* 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512'
*
* @return string An encrypted message
@@ -278,7 +289,7 @@ public static function sign(
*
* @param string $msg The original message (header and body)
* @param string $signature The original signature
- * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $keyMaterial For HS*, a string key works. for RS*, must be an instance of OpenSSLAsymmetricKey
+ * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $keyMaterial For Ed*, ES*, HS*, a string key works. for RS*, must be an instance of OpenSSLAsymmetricKey
* @param string $alg The algorithm
*
* @return bool
@@ -399,13 +410,28 @@ public static function jsonEncode(array $input): string
* @throws InvalidArgumentException invalid base64 characters
*/
public static function urlsafeB64Decode(string $input): string
+ {
+ return \base64_decode(self::convertBase64UrlToBase64($input));
+ }
+
+ /**
+ * Convert a string in the base64url (URL-safe Base64) encoding to standard base64.
+ *
+ * @param string $input A Base64 encoded string with URL-safe characters (-_ and no padding)
+ *
+ * @return string A Base64 encoded string with standard characters (+/) and padding (=), when
+ * needed.
+ *
+ * @see https://www.rfc-editor.org/rfc/rfc4648
+ */
+ public static function convertBase64UrlToBase64(string $input): string
{
$remainder = \strlen($input) % 4;
if ($remainder) {
$padlen = 4 - $remainder;
$input .= \str_repeat('=', $padlen);
}
- return \base64_decode(\strtr($input, '-_', '+/'));
+ return \strtr($input, '-_', '+/');
}
/**
diff --git a/lib/Google/vendor/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php b/lib/Google/vendor/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php
new file mode 100644
index 000000000..7933ed68b
--- /dev/null
+++ b/lib/Google/vendor/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php
@@ -0,0 +1,20 @@
+ 'Google_Client',
+ 'Google\\Service' => 'Google_Service',
+ 'Google\\Service\\Resource' => 'Google_Service_Resource',
+ 'Google\\Model' => 'Google_Model',
+ 'Google\\Collection' => 'Google_Collection',
+ ];
+ foreach ($servicesClassMap as $alias => $class) {
+ class_alias($class, $alias);
+ }
+ }
+}
+spl_autoload_register(function ($class) {
+ if (0 === strpos($class, 'Google_Service_')) {
+ // Autoload the new class, which will also create an alias for the
+ // old class by changing underscores to namespaces:
+ // Google_Service_Speech_Resource_Operations
+ // => Google\Service\Speech\Resource\Operations
+ $classExists = class_exists($newClass = str_replace('_', '\\', $class));
+ if ($classExists) {
+ return true;
+ }
+ }
+}, true, true);
diff --git a/lib/Google/vendor/google/apiclient-services/composer.json b/lib/Google/vendor/google/apiclient-services/composer.json
new file mode 100644
index 000000000..ecc41f4e1
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/composer.json
@@ -0,0 +1,27 @@
+{
+ "name": "google/apiclient-services",
+ "type": "library",
+ "description": "Client library for Google APIs",
+ "keywords": ["google"],
+ "homepage": "http://developers.google.com/api-client-library/php",
+ "license": "Apache-2.0",
+ "require": {
+ "php": "^7.4||^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7||^8.5.13"
+ },
+ "autoload": {
+ "psr-4": {
+ "Google\\Service\\": "src"
+ },
+ "files": [
+ "autoload.php"
+ ]
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Google\\": "tests/mocks"
+ }
+ }
+}
diff --git a/lib/Google/src/Service/Storage.php b/lib/Google/vendor/google/apiclient-services/src/Storage.php
similarity index 79%
rename from lib/Google/src/Service/Storage.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage.php
index ae676e286..9f8fb34e4 100644
--- a/lib/Google/src/Service/Storage.php
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage.php
@@ -50,13 +50,16 @@ class Storage extends \Google\Service
const DEVSTORAGE_READ_WRITE =
"https://www.googleapis.com/auth/devstorage.read_write";
+ public $anywhereCache;
public $bucketAccessControls;
public $buckets;
public $channels;
public $defaultObjectAccessControls;
+ public $managedFolders;
public $notifications;
public $objectAccessControls;
public $objects;
+ public $operations;
public $projects_hmacKeys;
public $projects_serviceAccount;
@@ -76,6 +79,119 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
$this->version = 'v1';
$this->serviceName = 'storage';
+ $this->anywhereCache = new Storage\Resource\AnywhereCache(
+ $this,
+ $this->serviceName,
+ 'anywhereCache',
+ [
+ 'methods' => [
+ 'disable' => [
+ 'path' => 'b/{bucket}/anywhereCaches/{anywhereCacheId}/disable',
+ 'httpMethod' => 'POST',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'anywhereCacheId' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ ],
+ ],'get' => [
+ 'path' => 'b/{bucket}/anywhereCaches/{anywhereCacheId}',
+ 'httpMethod' => 'GET',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'anywhereCacheId' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ ],
+ ],'insert' => [
+ 'path' => 'b/{bucket}/anywhereCaches',
+ 'httpMethod' => 'POST',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ ],
+ ],'list' => [
+ 'path' => 'b/{bucket}/anywhereCache',
+ 'httpMethod' => 'GET',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'pageSize' => [
+ 'location' => 'query',
+ 'type' => 'integer',
+ ],
+ 'pageToken' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ ],
+ ],'pause' => [
+ 'path' => 'b/{bucket}/anywhereCaches/{anywhereCacheId}/pause',
+ 'httpMethod' => 'POST',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'anywhereCacheId' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ ],
+ ],'resume' => [
+ 'path' => 'b/{bucket}/anywhereCaches/{anywhereCacheId}/resume',
+ 'httpMethod' => 'POST',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'anywhereCacheId' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ ],
+ ],'update' => [
+ 'path' => 'b/{bucket}/anywhereCaches/{anywhereCacheId}',
+ 'httpMethod' => 'PATCH',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'anywhereCacheId' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ ],
+ ],
+ ]
+ ]
+ );
$this->bucketAccessControls = new Storage\Resource\BucketAccessControls(
$this,
$this->serviceName,
@@ -271,6 +387,10 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'type' => 'string',
'required' => true,
],
+ 'enableObjectRetention' => [
+ 'location' => 'query',
+ 'type' => 'boolean',
+ ],
'predefinedAcl' => [
'location' => 'query',
'type' => 'string',
@@ -579,6 +699,161 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
]
]
);
+ $this->managedFolders = new Storage\Resource\ManagedFolders(
+ $this,
+ $this->serviceName,
+ 'managedFolders',
+ [
+ 'methods' => [
+ 'delete' => [
+ 'path' => 'b/{bucket}/managedFolders/{managedFolder}',
+ 'httpMethod' => 'DELETE',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'managedFolder' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'ifMetagenerationMatch' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ 'ifMetagenerationNotMatch' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ ],
+ ],'get' => [
+ 'path' => 'b/{bucket}/managedFolders/{managedFolder}',
+ 'httpMethod' => 'GET',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'managedFolder' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'ifMetagenerationMatch' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ 'ifMetagenerationNotMatch' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ ],
+ ],'getIamPolicy' => [
+ 'path' => 'b/{bucket}/managedFolders/{managedFolder}/iam',
+ 'httpMethod' => 'GET',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'managedFolder' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'optionsRequestedPolicyVersion' => [
+ 'location' => 'query',
+ 'type' => 'integer',
+ ],
+ 'userProject' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ ],
+ ],'insert' => [
+ 'path' => 'b/{bucket}/managedFolders',
+ 'httpMethod' => 'POST',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ ],
+ ],'list' => [
+ 'path' => 'b/{bucket}/managedFolders',
+ 'httpMethod' => 'GET',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'pageSize' => [
+ 'location' => 'query',
+ 'type' => 'integer',
+ ],
+ 'pageToken' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ 'prefix' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ ],
+ ],'setIamPolicy' => [
+ 'path' => 'b/{bucket}/managedFolders/{managedFolder}/iam',
+ 'httpMethod' => 'PUT',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'managedFolder' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'userProject' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ ],
+ ],'testIamPermissions' => [
+ 'path' => 'b/{bucket}/managedFolders/{managedFolder}/iam/testPermissions',
+ 'httpMethod' => 'GET',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'managedFolder' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'permissions' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ 'repeated' => true,
+ 'required' => true,
+ ],
+ 'userProject' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ ],
+ ],
+ ]
+ ]
+ );
$this->notifications = new Storage\Resource\Notifications(
$this,
$this->serviceName,
@@ -829,7 +1104,17 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'objects',
[
'methods' => [
- 'compose' => [
+ 'bulkRestore' => [
+ 'path' => 'b/{bucket}/o/bulkRestore',
+ 'httpMethod' => 'POST',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ ],
+ ],'compose' => [
'path' => 'b/{destinationBucket}/o/{destinationObject}/compose',
'httpMethod' => 'POST',
'parameters' => [
@@ -1018,6 +1303,10 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'location' => 'query',
'type' => 'string',
],
+ 'softDeleted' => [
+ 'location' => 'query',
+ 'type' => 'boolean',
+ ],
'userProject' => [
'location' => 'query',
'type' => 'string',
@@ -1113,6 +1402,10 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'location' => 'query',
'type' => 'string',
],
+ 'includeFoldersAsPrefixes' => [
+ 'location' => 'query',
+ 'type' => 'boolean',
+ ],
'includeTrailingDelimiter' => [
'location' => 'query',
'type' => 'boolean',
@@ -1137,6 +1430,10 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'location' => 'query',
'type' => 'string',
],
+ 'softDeleted' => [
+ 'location' => 'query',
+ 'type' => 'boolean',
+ ],
'startOffset' => [
'location' => 'query',
'type' => 'string',
@@ -1184,6 +1481,10 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'location' => 'query',
'type' => 'string',
],
+ 'overrideUnlockedRetention' => [
+ 'location' => 'query',
+ 'type' => 'boolean',
+ ],
'predefinedAcl' => [
'location' => 'query',
'type' => 'string',
@@ -1197,6 +1498,54 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'type' => 'string',
],
],
+ ],'restore' => [
+ 'path' => 'b/{bucket}/o/{object}/restore',
+ 'httpMethod' => 'POST',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'object' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'copySourceAcl' => [
+ 'location' => 'query',
+ 'type' => 'boolean',
+ ],
+ 'generation' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'ifGenerationMatch' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ 'ifGenerationNotMatch' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ 'ifMetagenerationMatch' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ 'ifMetagenerationNotMatch' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ 'projection' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ 'userProject' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ ],
],'rewrite' => [
'path' => 'b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}',
'httpMethod' => 'POST',
@@ -1368,6 +1717,10 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'location' => 'query',
'type' => 'string',
],
+ 'overrideUnlockedRetention' => [
+ 'location' => 'query',
+ 'type' => 'boolean',
+ ],
'predefinedAcl' => [
'location' => 'query',
'type' => 'string',
@@ -1435,6 +1788,68 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
]
]
);
+ $this->operations = new Storage\Resource\Operations(
+ $this,
+ $this->serviceName,
+ 'operations',
+ [
+ 'methods' => [
+ 'cancel' => [
+ 'path' => 'b/{bucket}/operations/{operationId}/cancel',
+ 'httpMethod' => 'POST',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'operationId' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ ],
+ ],'get' => [
+ 'path' => 'b/{bucket}/operations/{operationId}',
+ 'httpMethod' => 'GET',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'operationId' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ ],
+ ],'list' => [
+ 'path' => 'b/{bucket}/operations',
+ 'httpMethod' => 'GET',
+ 'parameters' => [
+ 'bucket' => [
+ 'location' => 'path',
+ 'type' => 'string',
+ 'required' => true,
+ ],
+ 'filter' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ 'pageSize' => [
+ 'location' => 'query',
+ 'type' => 'integer',
+ ],
+ 'pageToken' => [
+ 'location' => 'query',
+ 'type' => 'string',
+ ],
+ ],
+ ],
+ ]
+ ]
+ );
$this->projects_hmacKeys = new Storage\Resource\ProjectsHmacKeys(
$this,
$this->serviceName,
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/AnywhereCache.php b/lib/Google/vendor/google/apiclient-services/src/Storage/AnywhereCache.php
new file mode 100644
index 000000000..d31c489a5
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/AnywhereCache.php
@@ -0,0 +1,224 @@
+admissionPolicy = $admissionPolicy;
+ }
+ /**
+ * @return string
+ */
+ public function getAdmissionPolicy()
+ {
+ return $this->admissionPolicy;
+ }
+ /**
+ * @param string
+ */
+ public function setAnywhereCacheId($anywhereCacheId)
+ {
+ $this->anywhereCacheId = $anywhereCacheId;
+ }
+ /**
+ * @return string
+ */
+ public function getAnywhereCacheId()
+ {
+ return $this->anywhereCacheId;
+ }
+ /**
+ * @param string
+ */
+ public function setBucket($bucket)
+ {
+ $this->bucket = $bucket;
+ }
+ /**
+ * @return string
+ */
+ public function getBucket()
+ {
+ return $this->bucket;
+ }
+ /**
+ * @param string
+ */
+ public function setCreateTime($createTime)
+ {
+ $this->createTime = $createTime;
+ }
+ /**
+ * @return string
+ */
+ public function getCreateTime()
+ {
+ return $this->createTime;
+ }
+ /**
+ * @param string
+ */
+ public function setId($id)
+ {
+ $this->id = $id;
+ }
+ /**
+ * @return string
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+ /**
+ * @param string
+ */
+ public function setKind($kind)
+ {
+ $this->kind = $kind;
+ }
+ /**
+ * @return string
+ */
+ public function getKind()
+ {
+ return $this->kind;
+ }
+ /**
+ * @param bool
+ */
+ public function setPendingUpdate($pendingUpdate)
+ {
+ $this->pendingUpdate = $pendingUpdate;
+ }
+ /**
+ * @return bool
+ */
+ public function getPendingUpdate()
+ {
+ return $this->pendingUpdate;
+ }
+ /**
+ * @param string
+ */
+ public function setSelfLink($selfLink)
+ {
+ $this->selfLink = $selfLink;
+ }
+ /**
+ * @return string
+ */
+ public function getSelfLink()
+ {
+ return $this->selfLink;
+ }
+ /**
+ * @param string
+ */
+ public function setState($state)
+ {
+ $this->state = $state;
+ }
+ /**
+ * @return string
+ */
+ public function getState()
+ {
+ return $this->state;
+ }
+ /**
+ * @param string
+ */
+ public function setTtl($ttl)
+ {
+ $this->ttl = $ttl;
+ }
+ /**
+ * @return string
+ */
+ public function getTtl()
+ {
+ return $this->ttl;
+ }
+ /**
+ * @param string
+ */
+ public function setUpdateTime($updateTime)
+ {
+ $this->updateTime = $updateTime;
+ }
+ /**
+ * @return string
+ */
+ public function getUpdateTime()
+ {
+ return $this->updateTime;
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(AnywhereCache::class, 'Google_Service_Storage_AnywhereCache');
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/AnywhereCaches.php b/lib/Google/vendor/google/apiclient-services/src/Storage/AnywhereCaches.php
new file mode 100644
index 000000000..14874aea2
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/AnywhereCaches.php
@@ -0,0 +1,79 @@
+items = $items;
+ }
+ /**
+ * @return AnywhereCache[]
+ */
+ public function getItems()
+ {
+ return $this->items;
+ }
+ /**
+ * @param string
+ */
+ public function setKind($kind)
+ {
+ $this->kind = $kind;
+ }
+ /**
+ * @return string
+ */
+ public function getKind()
+ {
+ return $this->kind;
+ }
+ /**
+ * @param string
+ */
+ public function setNextPageToken($nextPageToken)
+ {
+ $this->nextPageToken = $nextPageToken;
+ }
+ /**
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->nextPageToken;
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(AnywhereCaches::class, 'Google_Service_Storage_AnywhereCaches');
diff --git a/lib/Google/src/Service/Storage/Bucket.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Bucket.php
similarity index 92%
rename from lib/Google/src/Service/Storage/Bucket.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Bucket.php
index 655fea046..ac732ea62 100644
--- a/lib/Google/src/Service/Storage/Bucket.php
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/Bucket.php
@@ -76,6 +76,8 @@ class Bucket extends \Google\Collection
* @var string
*/
public $name;
+ protected $objectRetentionType = BucketObjectRetention::class;
+ protected $objectRetentionDataType = '';
protected $ownerType = BucketOwner::class;
protected $ownerDataType = '';
/**
@@ -96,6 +98,8 @@ class Bucket extends \Google\Collection
* @var string
*/
public $selfLink;
+ protected $softDeletePolicyType = BucketSoftDeletePolicy::class;
+ protected $softDeletePolicyDataType = '';
/**
* @var string
*/
@@ -379,6 +383,20 @@ public function getName()
{
return $this->name;
}
+ /**
+ * @param BucketObjectRetention
+ */
+ public function setObjectRetention(BucketObjectRetention $objectRetention)
+ {
+ $this->objectRetention = $objectRetention;
+ }
+ /**
+ * @return BucketObjectRetention
+ */
+ public function getObjectRetention()
+ {
+ return $this->objectRetention;
+ }
/**
* @param BucketOwner
*/
@@ -463,6 +481,20 @@ public function getSelfLink()
{
return $this->selfLink;
}
+ /**
+ * @param BucketSoftDeletePolicy
+ */
+ public function setSoftDeletePolicy(BucketSoftDeletePolicy $softDeletePolicy)
+ {
+ $this->softDeletePolicy = $softDeletePolicy;
+ }
+ /**
+ * @return BucketSoftDeletePolicy
+ */
+ public function getSoftDeletePolicy()
+ {
+ return $this->softDeletePolicy;
+ }
/**
* @param string
*/
diff --git a/lib/Google/src/Service/Storage/BucketAccessControl.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketAccessControl.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketAccessControl.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketAccessControl.php
diff --git a/lib/Google/src/Service/Storage/BucketAccessControlProjectTeam.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketAccessControlProjectTeam.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketAccessControlProjectTeam.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketAccessControlProjectTeam.php
diff --git a/lib/Google/src/Service/Storage/BucketAccessControls.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketAccessControls.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketAccessControls.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketAccessControls.php
diff --git a/lib/Google/src/Service/Storage/BucketAutoclass.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketAutoclass.php
similarity index 64%
rename from lib/Google/src/Service/Storage/BucketAutoclass.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketAutoclass.php
index 42e8bdcc1..956676ae8 100644
--- a/lib/Google/src/Service/Storage/BucketAutoclass.php
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketAutoclass.php
@@ -23,6 +23,14 @@ class BucketAutoclass extends \Google\Model
* @var bool
*/
public $enabled;
+ /**
+ * @var string
+ */
+ public $terminalStorageClass;
+ /**
+ * @var string
+ */
+ public $terminalStorageClassUpdateTime;
/**
* @var string
*/
@@ -42,6 +50,34 @@ public function getEnabled()
{
return $this->enabled;
}
+ /**
+ * @param string
+ */
+ public function setTerminalStorageClass($terminalStorageClass)
+ {
+ $this->terminalStorageClass = $terminalStorageClass;
+ }
+ /**
+ * @return string
+ */
+ public function getTerminalStorageClass()
+ {
+ return $this->terminalStorageClass;
+ }
+ /**
+ * @param string
+ */
+ public function setTerminalStorageClassUpdateTime($terminalStorageClassUpdateTime)
+ {
+ $this->terminalStorageClassUpdateTime = $terminalStorageClassUpdateTime;
+ }
+ /**
+ * @return string
+ */
+ public function getTerminalStorageClassUpdateTime()
+ {
+ return $this->terminalStorageClassUpdateTime;
+ }
/**
* @param string
*/
diff --git a/lib/Google/src/Service/Storage/BucketBilling.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketBilling.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketBilling.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketBilling.php
diff --git a/lib/Google/src/Service/Storage/BucketCors.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketCors.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketCors.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketCors.php
diff --git a/lib/Google/src/Service/Storage/BucketCustomPlacementConfig.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketCustomPlacementConfig.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketCustomPlacementConfig.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketCustomPlacementConfig.php
diff --git a/lib/Google/src/Service/Storage/BucketEncryption.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketEncryption.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketEncryption.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketEncryption.php
diff --git a/lib/Google/src/Service/Storage/BucketIamConfiguration.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketIamConfiguration.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketIamConfiguration.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketIamConfiguration.php
diff --git a/lib/Google/src/Service/Storage/BucketIamConfigurationBucketPolicyOnly.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketIamConfigurationBucketPolicyOnly.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketIamConfigurationBucketPolicyOnly.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketIamConfigurationBucketPolicyOnly.php
diff --git a/lib/Google/src/Service/Storage/BucketIamConfigurationUniformBucketLevelAccess.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketIamConfigurationUniformBucketLevelAccess.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketIamConfigurationUniformBucketLevelAccess.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketIamConfigurationUniformBucketLevelAccess.php
diff --git a/lib/Google/src/Service/Storage/BucketLifecycle.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketLifecycle.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketLifecycle.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketLifecycle.php
diff --git a/lib/Google/src/Service/Storage/BucketLifecycleRule.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketLifecycleRule.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketLifecycleRule.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketLifecycleRule.php
diff --git a/lib/Google/src/Service/Storage/BucketLifecycleRuleAction.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketLifecycleRuleAction.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketLifecycleRuleAction.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketLifecycleRuleAction.php
diff --git a/lib/Google/src/Service/Storage/BucketLifecycleRuleCondition.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketLifecycleRuleCondition.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketLifecycleRuleCondition.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketLifecycleRuleCondition.php
diff --git a/lib/Google/src/Service/Storage/BucketLogging.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketLogging.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketLogging.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketLogging.php
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/BucketObjectRetention.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketObjectRetention.php
new file mode 100644
index 000000000..5d4a29d9e
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketObjectRetention.php
@@ -0,0 +1,44 @@
+mode = $mode;
+ }
+ /**
+ * @return string
+ */
+ public function getMode()
+ {
+ return $this->mode;
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(BucketObjectRetention::class, 'Google_Service_Storage_BucketObjectRetention');
diff --git a/lib/Google/src/Service/Storage/BucketOwner.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketOwner.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketOwner.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketOwner.php
diff --git a/lib/Google/src/Service/Storage/BucketRetentionPolicy.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketRetentionPolicy.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketRetentionPolicy.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketRetentionPolicy.php
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/BucketSoftDeletePolicy.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketSoftDeletePolicy.php
new file mode 100644
index 000000000..5c28f9b26
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketSoftDeletePolicy.php
@@ -0,0 +1,62 @@
+effectiveTime = $effectiveTime;
+ }
+ /**
+ * @return string
+ */
+ public function getEffectiveTime()
+ {
+ return $this->effectiveTime;
+ }
+ /**
+ * @param string
+ */
+ public function setRetentionDurationSeconds($retentionDurationSeconds)
+ {
+ $this->retentionDurationSeconds = $retentionDurationSeconds;
+ }
+ /**
+ * @return string
+ */
+ public function getRetentionDurationSeconds()
+ {
+ return $this->retentionDurationSeconds;
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(BucketSoftDeletePolicy::class, 'Google_Service_Storage_BucketSoftDeletePolicy');
diff --git a/lib/Google/src/Service/Storage/BucketVersioning.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketVersioning.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketVersioning.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketVersioning.php
diff --git a/lib/Google/src/Service/Storage/BucketWebsite.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BucketWebsite.php
similarity index 100%
rename from lib/Google/src/Service/Storage/BucketWebsite.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/BucketWebsite.php
diff --git a/lib/Google/src/Service/Storage/Buckets.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Buckets.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Buckets.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Buckets.php
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/BulkRestoreObjectsRequest.php b/lib/Google/vendor/google/apiclient-services/src/Storage/BulkRestoreObjectsRequest.php
new file mode 100644
index 000000000..d7feda6f0
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/BulkRestoreObjectsRequest.php
@@ -0,0 +1,117 @@
+allowOverwrite = $allowOverwrite;
+ }
+ /**
+ * @return bool
+ */
+ public function getAllowOverwrite()
+ {
+ return $this->allowOverwrite;
+ }
+ /**
+ * @param bool
+ */
+ public function setCopySourceAcl($copySourceAcl)
+ {
+ $this->copySourceAcl = $copySourceAcl;
+ }
+ /**
+ * @return bool
+ */
+ public function getCopySourceAcl()
+ {
+ return $this->copySourceAcl;
+ }
+ /**
+ * @param string[]
+ */
+ public function setMatchGlobs($matchGlobs)
+ {
+ $this->matchGlobs = $matchGlobs;
+ }
+ /**
+ * @return string[]
+ */
+ public function getMatchGlobs()
+ {
+ return $this->matchGlobs;
+ }
+ /**
+ * @param string
+ */
+ public function setSoftDeletedAfterTime($softDeletedAfterTime)
+ {
+ $this->softDeletedAfterTime = $softDeletedAfterTime;
+ }
+ /**
+ * @return string
+ */
+ public function getSoftDeletedAfterTime()
+ {
+ return $this->softDeletedAfterTime;
+ }
+ /**
+ * @param string
+ */
+ public function setSoftDeletedBeforeTime($softDeletedBeforeTime)
+ {
+ $this->softDeletedBeforeTime = $softDeletedBeforeTime;
+ }
+ /**
+ * @return string
+ */
+ public function getSoftDeletedBeforeTime()
+ {
+ return $this->softDeletedBeforeTime;
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(BulkRestoreObjectsRequest::class, 'Google_Service_Storage_BulkRestoreObjectsRequest');
diff --git a/lib/Google/src/Service/Storage/Channel.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Channel.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Channel.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Channel.php
diff --git a/lib/Google/src/Service/Storage/ComposeRequest.php b/lib/Google/vendor/google/apiclient-services/src/Storage/ComposeRequest.php
similarity index 100%
rename from lib/Google/src/Service/Storage/ComposeRequest.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/ComposeRequest.php
diff --git a/lib/Google/src/Service/Storage/ComposeRequestSourceObjects.php b/lib/Google/vendor/google/apiclient-services/src/Storage/ComposeRequestSourceObjects.php
similarity index 100%
rename from lib/Google/src/Service/Storage/ComposeRequestSourceObjects.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/ComposeRequestSourceObjects.php
diff --git a/lib/Google/src/Service/Storage/ComposeRequestSourceObjectsObjectPreconditions.php b/lib/Google/vendor/google/apiclient-services/src/Storage/ComposeRequestSourceObjectsObjectPreconditions.php
similarity index 100%
rename from lib/Google/src/Service/Storage/ComposeRequestSourceObjectsObjectPreconditions.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/ComposeRequestSourceObjectsObjectPreconditions.php
diff --git a/lib/Google/src/Service/Storage/Expr.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Expr.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Expr.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Expr.php
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/GoogleLongrunningListOperationsResponse.php b/lib/Google/vendor/google/apiclient-services/src/Storage/GoogleLongrunningListOperationsResponse.php
new file mode 100644
index 000000000..55efd1fed
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/GoogleLongrunningListOperationsResponse.php
@@ -0,0 +1,61 @@
+nextPageToken = $nextPageToken;
+ }
+ /**
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->nextPageToken;
+ }
+ /**
+ * @param GoogleLongrunningOperation[]
+ */
+ public function setOperations($operations)
+ {
+ $this->operations = $operations;
+ }
+ /**
+ * @return GoogleLongrunningOperation[]
+ */
+ public function getOperations()
+ {
+ return $this->operations;
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(GoogleLongrunningListOperationsResponse::class, 'Google_Service_Storage_GoogleLongrunningListOperationsResponse');
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/GoogleLongrunningOperation.php b/lib/Google/vendor/google/apiclient-services/src/Storage/GoogleLongrunningOperation.php
new file mode 100644
index 000000000..42db42881
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/GoogleLongrunningOperation.php
@@ -0,0 +1,114 @@
+done = $done;
+ }
+ /**
+ * @return bool
+ */
+ public function getDone()
+ {
+ return $this->done;
+ }
+ /**
+ * @param GoogleRpcStatus
+ */
+ public function setError(GoogleRpcStatus $error)
+ {
+ $this->error = $error;
+ }
+ /**
+ * @return GoogleRpcStatus
+ */
+ public function getError()
+ {
+ return $this->error;
+ }
+ /**
+ * @param array[]
+ */
+ public function setMetadata($metadata)
+ {
+ $this->metadata = $metadata;
+ }
+ /**
+ * @return array[]
+ */
+ public function getMetadata()
+ {
+ return $this->metadata;
+ }
+ /**
+ * @param string
+ */
+ public function setName($name)
+ {
+ $this->name = $name;
+ }
+ /**
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+ /**
+ * @param array[]
+ */
+ public function setResponse($response)
+ {
+ $this->response = $response;
+ }
+ /**
+ * @return array[]
+ */
+ public function getResponse()
+ {
+ return $this->response;
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(GoogleLongrunningOperation::class, 'Google_Service_Storage_GoogleLongrunningOperation');
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/GoogleRpcStatus.php b/lib/Google/vendor/google/apiclient-services/src/Storage/GoogleRpcStatus.php
new file mode 100644
index 000000000..4a9bf3f05
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/GoogleRpcStatus.php
@@ -0,0 +1,81 @@
+code = $code;
+ }
+ /**
+ * @return int
+ */
+ public function getCode()
+ {
+ return $this->code;
+ }
+ /**
+ * @param array[]
+ */
+ public function setDetails($details)
+ {
+ $this->details = $details;
+ }
+ /**
+ * @return array[]
+ */
+ public function getDetails()
+ {
+ return $this->details;
+ }
+ /**
+ * @param string
+ */
+ public function setMessage($message)
+ {
+ $this->message = $message;
+ }
+ /**
+ * @return string
+ */
+ public function getMessage()
+ {
+ return $this->message;
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(GoogleRpcStatus::class, 'Google_Service_Storage_GoogleRpcStatus');
diff --git a/lib/Google/src/Service/Storage/HmacKey.php b/lib/Google/vendor/google/apiclient-services/src/Storage/HmacKey.php
similarity index 100%
rename from lib/Google/src/Service/Storage/HmacKey.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/HmacKey.php
diff --git a/lib/Google/src/Service/Storage/HmacKeyMetadata.php b/lib/Google/vendor/google/apiclient-services/src/Storage/HmacKeyMetadata.php
similarity index 100%
rename from lib/Google/src/Service/Storage/HmacKeyMetadata.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/HmacKeyMetadata.php
diff --git a/lib/Google/src/Service/Storage/HmacKeysMetadata.php b/lib/Google/vendor/google/apiclient-services/src/Storage/HmacKeysMetadata.php
similarity index 100%
rename from lib/Google/src/Service/Storage/HmacKeysMetadata.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/HmacKeysMetadata.php
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/ManagedFolder.php b/lib/Google/vendor/google/apiclient-services/src/Storage/ManagedFolder.php
new file mode 100644
index 000000000..cca7d25fa
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/ManagedFolder.php
@@ -0,0 +1,170 @@
+bucket = $bucket;
+ }
+ /**
+ * @return string
+ */
+ public function getBucket()
+ {
+ return $this->bucket;
+ }
+ /**
+ * @param string
+ */
+ public function setCreateTime($createTime)
+ {
+ $this->createTime = $createTime;
+ }
+ /**
+ * @return string
+ */
+ public function getCreateTime()
+ {
+ return $this->createTime;
+ }
+ /**
+ * @param string
+ */
+ public function setId($id)
+ {
+ $this->id = $id;
+ }
+ /**
+ * @return string
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+ /**
+ * @param string
+ */
+ public function setKind($kind)
+ {
+ $this->kind = $kind;
+ }
+ /**
+ * @return string
+ */
+ public function getKind()
+ {
+ return $this->kind;
+ }
+ /**
+ * @param string
+ */
+ public function setMetageneration($metageneration)
+ {
+ $this->metageneration = $metageneration;
+ }
+ /**
+ * @return string
+ */
+ public function getMetageneration()
+ {
+ return $this->metageneration;
+ }
+ /**
+ * @param string
+ */
+ public function setName($name)
+ {
+ $this->name = $name;
+ }
+ /**
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+ /**
+ * @param string
+ */
+ public function setSelfLink($selfLink)
+ {
+ $this->selfLink = $selfLink;
+ }
+ /**
+ * @return string
+ */
+ public function getSelfLink()
+ {
+ return $this->selfLink;
+ }
+ /**
+ * @param string
+ */
+ public function setUpdateTime($updateTime)
+ {
+ $this->updateTime = $updateTime;
+ }
+ /**
+ * @return string
+ */
+ public function getUpdateTime()
+ {
+ return $this->updateTime;
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ManagedFolder::class, 'Google_Service_Storage_ManagedFolder');
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/ManagedFolders.php b/lib/Google/vendor/google/apiclient-services/src/Storage/ManagedFolders.php
new file mode 100644
index 000000000..582c4fe93
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/ManagedFolders.php
@@ -0,0 +1,79 @@
+items = $items;
+ }
+ /**
+ * @return ManagedFolder[]
+ */
+ public function getItems()
+ {
+ return $this->items;
+ }
+ /**
+ * @param string
+ */
+ public function setKind($kind)
+ {
+ $this->kind = $kind;
+ }
+ /**
+ * @return string
+ */
+ public function getKind()
+ {
+ return $this->kind;
+ }
+ /**
+ * @param string
+ */
+ public function setNextPageToken($nextPageToken)
+ {
+ $this->nextPageToken = $nextPageToken;
+ }
+ /**
+ * @return string
+ */
+ public function getNextPageToken()
+ {
+ return $this->nextPageToken;
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ManagedFolders::class, 'Google_Service_Storage_ManagedFolders');
diff --git a/lib/Google/src/Service/Storage/Notification.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Notification.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Notification.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Notification.php
diff --git a/lib/Google/src/Service/Storage/Notifications.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Notifications.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Notifications.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Notifications.php
diff --git a/lib/Google/src/Service/Storage/ObjectAccessControl.php b/lib/Google/vendor/google/apiclient-services/src/Storage/ObjectAccessControl.php
similarity index 100%
rename from lib/Google/src/Service/Storage/ObjectAccessControl.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/ObjectAccessControl.php
diff --git a/lib/Google/src/Service/Storage/ObjectAccessControlProjectTeam.php b/lib/Google/vendor/google/apiclient-services/src/Storage/ObjectAccessControlProjectTeam.php
similarity index 100%
rename from lib/Google/src/Service/Storage/ObjectAccessControlProjectTeam.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/ObjectAccessControlProjectTeam.php
diff --git a/lib/Google/src/Service/Storage/ObjectAccessControls.php b/lib/Google/vendor/google/apiclient-services/src/Storage/ObjectAccessControls.php
similarity index 100%
rename from lib/Google/src/Service/Storage/ObjectAccessControls.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/ObjectAccessControls.php
diff --git a/lib/Google/src/Service/Storage/Objects.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Objects.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Objects.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Objects.php
diff --git a/lib/Google/src/Service/Storage/Policy.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Policy.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Policy.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Policy.php
diff --git a/lib/Google/src/Service/Storage/PolicyBindings.php b/lib/Google/vendor/google/apiclient-services/src/Storage/PolicyBindings.php
similarity index 100%
rename from lib/Google/src/Service/Storage/PolicyBindings.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/PolicyBindings.php
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/AnywhereCache.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/AnywhereCache.php
new file mode 100644
index 000000000..5b2a6934a
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/AnywhereCache.php
@@ -0,0 +1,142 @@
+
+ * $storageService = new Google\Service\Storage(...);
+ * $anywhereCache = $storageService->anywhereCache;
+ *
+ */
+class AnywhereCache extends \Google\Service\Resource
+{
+ /**
+ * Disables an Anywhere Cache instance. (anywhereCache.disable)
+ *
+ * @param string $bucket Name of the partent bucket
+ * @param string $anywhereCacheId The ID of requested Anywhere Cache instance.
+ * @param array $optParams Optional parameters.
+ * @return AnywhereCacheModel
+ */
+ public function disable($bucket, $anywhereCacheId, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'anywhereCacheId' => $anywhereCacheId];
+ $params = array_merge($params, $optParams);
+ return $this->call('disable', [$params], AnywhereCacheModel::class);
+ }
+ /**
+ * Returns the metadata of an Anywhere Cache instance. (anywhereCache.get)
+ *
+ * @param string $bucket Name of the partent bucket
+ * @param string $anywhereCacheId The ID of requested Anywhere Cache instance.
+ * @param array $optParams Optional parameters.
+ * @return AnywhereCacheModel
+ */
+ public function get($bucket, $anywhereCacheId, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'anywhereCacheId' => $anywhereCacheId];
+ $params = array_merge($params, $optParams);
+ return $this->call('get', [$params], AnywhereCacheModel::class);
+ }
+ /**
+ * Creates an Anywhere Cache instance. (anywhereCache.insert)
+ *
+ * @param string $bucket Name of the partent bucket
+ * @param AnywhereCacheModel $postBody
+ * @param array $optParams Optional parameters.
+ * @return GoogleLongrunningOperation
+ */
+ public function insert($bucket, AnywhereCacheModel $postBody, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'postBody' => $postBody];
+ $params = array_merge($params, $optParams);
+ return $this->call('insert', [$params], GoogleLongrunningOperation::class);
+ }
+ /**
+ * Returns a list of Anywhere Cache instances of the bucket matching the
+ * criteria. (anywhereCache.listAnywhereCache)
+ *
+ * @param string $bucket Name of the partent bucket
+ * @param array $optParams Optional parameters.
+ *
+ * @opt_param int pageSize Maximum number of items return in a single page of
+ * responses. Maximum 1000.
+ * @opt_param string pageToken A previously-returned page token representing
+ * part of the larger set of results to view.
+ * @return AnywhereCaches
+ */
+ public function listAnywhereCache($bucket, $optParams = [])
+ {
+ $params = ['bucket' => $bucket];
+ $params = array_merge($params, $optParams);
+ return $this->call('list', [$params], AnywhereCaches::class);
+ }
+ /**
+ * Pauses an Anywhere Cache instance. (anywhereCache.pause)
+ *
+ * @param string $bucket Name of the partent bucket
+ * @param string $anywhereCacheId The ID of requested Anywhere Cache instance.
+ * @param array $optParams Optional parameters.
+ * @return AnywhereCacheModel
+ */
+ public function pause($bucket, $anywhereCacheId, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'anywhereCacheId' => $anywhereCacheId];
+ $params = array_merge($params, $optParams);
+ return $this->call('pause', [$params], AnywhereCacheModel::class);
+ }
+ /**
+ * Resumes a paused or disabled Anywhere Cache instance. (anywhereCache.resume)
+ *
+ * @param string $bucket Name of the partent bucket
+ * @param string $anywhereCacheId The ID of requested Anywhere Cache instance.
+ * @param array $optParams Optional parameters.
+ * @return AnywhereCacheModel
+ */
+ public function resume($bucket, $anywhereCacheId, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'anywhereCacheId' => $anywhereCacheId];
+ $params = array_merge($params, $optParams);
+ return $this->call('resume', [$params], AnywhereCacheModel::class);
+ }
+ /**
+ * Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.
+ * (anywhereCache.update)
+ *
+ * @param string $bucket Name of the partent bucket
+ * @param string $anywhereCacheId The ID of requested Anywhere Cache instance.
+ * @param AnywhereCacheModel $postBody
+ * @param array $optParams Optional parameters.
+ * @return GoogleLongrunningOperation
+ */
+ public function update($bucket, $anywhereCacheId, AnywhereCacheModel $postBody, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'anywhereCacheId' => $anywhereCacheId, 'postBody' => $postBody];
+ $params = array_merge($params, $optParams);
+ return $this->call('update', [$params], GoogleLongrunningOperation::class);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(AnywhereCache::class, 'Google_Service_Storage_Resource_AnywhereCache');
diff --git a/lib/Google/src/Service/Storage/Resource/BucketAccessControls.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/BucketAccessControls.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Resource/BucketAccessControls.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Resource/BucketAccessControls.php
diff --git a/lib/Google/src/Service/Storage/Resource/Buckets.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Buckets.php
similarity index 98%
rename from lib/Google/src/Service/Storage/Resource/Buckets.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Buckets.php
index 9ba71daae..8e79cb55b 100644
--- a/lib/Google/src/Service/Storage/Resource/Buckets.php
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Buckets.php
@@ -100,6 +100,8 @@ public function getIamPolicy($bucket, $optParams = [])
* @param Bucket $postBody
* @param array $optParams Optional parameters.
*
+ * @opt_param bool enableObjectRetention When set to true, object retention is
+ * enabled for this bucket.
* @opt_param string predefinedAcl Apply a predefined set of access controls to
* this bucket.
* @opt_param string predefinedDefaultObjectAcl Apply a predefined set of
diff --git a/lib/Google/src/Service/Storage/Resource/Channels.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Channels.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Resource/Channels.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Channels.php
diff --git a/lib/Google/src/Service/Storage/Resource/DefaultObjectAccessControls.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/DefaultObjectAccessControls.php
similarity index 99%
rename from lib/Google/src/Service/Storage/Resource/DefaultObjectAccessControls.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Resource/DefaultObjectAccessControls.php
index 4bd61bcff..ac0002422 100644
--- a/lib/Google/src/Service/Storage/Resource/DefaultObjectAccessControls.php
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/DefaultObjectAccessControls.php
@@ -101,7 +101,7 @@ public function insert($bucket, ObjectAccessControl $postBody, $optParams = [])
* value.
* @opt_param string userProject The project to be billed for this request.
* Required for Requester Pays buckets.
- * @return ObjectAccessControls
+ * @return ObjectAccessControlsModel
*/
public function listDefaultObjectAccessControls($bucket, $optParams = [])
{
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/ManagedFolders.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/ManagedFolders.php
new file mode 100644
index 000000000..d5e06e144
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/ManagedFolders.php
@@ -0,0 +1,171 @@
+
+ * $storageService = new Google\Service\Storage(...);
+ * $managedFolders = $storageService->managedFolders;
+ *
+ */
+class ManagedFolders extends \Google\Service\Resource
+{
+ /**
+ * Permanently deletes a managed folder. (managedFolders.delete)
+ *
+ * @param string $bucket Name of the bucket containing the managed folder.
+ * @param string $managedFolder The managed folder name/path.
+ * @param array $optParams Optional parameters.
+ *
+ * @opt_param string ifMetagenerationMatch If set, only deletes the managed
+ * folder if its metageneration matches this value.
+ * @opt_param string ifMetagenerationNotMatch If set, only deletes the managed
+ * folder if its metageneration does not match this value.
+ */
+ public function delete($bucket, $managedFolder, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'managedFolder' => $managedFolder];
+ $params = array_merge($params, $optParams);
+ return $this->call('delete', [$params]);
+ }
+ /**
+ * Returns metadata of the specified managed folder. (managedFolders.get)
+ *
+ * @param string $bucket Name of the bucket containing the managed folder.
+ * @param string $managedFolder The managed folder name/path.
+ * @param array $optParams Optional parameters.
+ *
+ * @opt_param string ifMetagenerationMatch Makes the return of the managed
+ * folder metadata conditional on whether the managed folder's current
+ * metageneration matches the given value.
+ * @opt_param string ifMetagenerationNotMatch Makes the return of the managed
+ * folder metadata conditional on whether the managed folder's current
+ * metageneration does not match the given value.
+ * @return ManagedFolder
+ */
+ public function get($bucket, $managedFolder, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'managedFolder' => $managedFolder];
+ $params = array_merge($params, $optParams);
+ return $this->call('get', [$params], ManagedFolder::class);
+ }
+ /**
+ * Returns an IAM policy for the specified managed folder.
+ * (managedFolders.getIamPolicy)
+ *
+ * @param string $bucket Name of the bucket containing the managed folder.
+ * @param string $managedFolder The managed folder name/path.
+ * @param array $optParams Optional parameters.
+ *
+ * @opt_param int optionsRequestedPolicyVersion The IAM policy format version to
+ * be returned. If the optionsRequestedPolicyVersion is for an older version
+ * that doesn't support part of the requested IAM policy, the request fails.
+ * @opt_param string userProject The project to be billed for this request.
+ * Required for Requester Pays buckets.
+ * @return Policy
+ */
+ public function getIamPolicy($bucket, $managedFolder, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'managedFolder' => $managedFolder];
+ $params = array_merge($params, $optParams);
+ return $this->call('getIamPolicy', [$params], Policy::class);
+ }
+ /**
+ * Creates a new managed folder. (managedFolders.insert)
+ *
+ * @param string $bucket Name of the bucket containing the managed folder.
+ * @param ManagedFolder $postBody
+ * @param array $optParams Optional parameters.
+ * @return ManagedFolder
+ */
+ public function insert($bucket, ManagedFolder $postBody, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'postBody' => $postBody];
+ $params = array_merge($params, $optParams);
+ return $this->call('insert', [$params], ManagedFolder::class);
+ }
+ /**
+ * Lists managed folders in the given bucket.
+ * (managedFolders.listManagedFolders)
+ *
+ * @param string $bucket Name of the bucket containing the managed folder.
+ * @param array $optParams Optional parameters.
+ *
+ * @opt_param int pageSize Maximum number of items return in a single page of
+ * responses.
+ * @opt_param string pageToken A previously-returned page token representing
+ * part of the larger set of results to view.
+ * @opt_param string prefix The managed folder name/path prefix to filter the
+ * output list of results.
+ * @return ManagedFoldersModel
+ */
+ public function listManagedFolders($bucket, $optParams = [])
+ {
+ $params = ['bucket' => $bucket];
+ $params = array_merge($params, $optParams);
+ return $this->call('list', [$params], ManagedFoldersModel::class);
+ }
+ /**
+ * Updates an IAM policy for the specified managed folder.
+ * (managedFolders.setIamPolicy)
+ *
+ * @param string $bucket Name of the bucket containing the managed folder.
+ * @param string $managedFolder The managed folder name/path.
+ * @param Policy $postBody
+ * @param array $optParams Optional parameters.
+ *
+ * @opt_param string userProject The project to be billed for this request.
+ * Required for Requester Pays buckets.
+ * @return Policy
+ */
+ public function setIamPolicy($bucket, $managedFolder, Policy $postBody, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'managedFolder' => $managedFolder, 'postBody' => $postBody];
+ $params = array_merge($params, $optParams);
+ return $this->call('setIamPolicy', [$params], Policy::class);
+ }
+ /**
+ * Tests a set of permissions on the given managed folder to see which, if any,
+ * are held by the caller. (managedFolders.testIamPermissions)
+ *
+ * @param string $bucket Name of the bucket containing the managed folder.
+ * @param string $managedFolder The managed folder name/path.
+ * @param string|array $permissions Permissions to test.
+ * @param array $optParams Optional parameters.
+ *
+ * @opt_param string userProject The project to be billed for this request.
+ * Required for Requester Pays buckets.
+ * @return TestIamPermissionsResponse
+ */
+ public function testIamPermissions($bucket, $managedFolder, $permissions, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'managedFolder' => $managedFolder, 'permissions' => $permissions];
+ $params = array_merge($params, $optParams);
+ return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(ManagedFolders::class, 'Google_Service_Storage_Resource_ManagedFolders');
diff --git a/lib/Google/src/Service/Storage/Resource/Notifications.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Notifications.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Resource/Notifications.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Notifications.php
diff --git a/lib/Google/src/Service/Storage/Resource/ObjectAccessControls.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/ObjectAccessControls.php
similarity index 89%
rename from lib/Google/src/Service/Storage/Resource/ObjectAccessControls.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Resource/ObjectAccessControls.php
index 7a930ac18..3976d1211 100644
--- a/lib/Google/src/Service/Storage/Resource/ObjectAccessControls.php
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/ObjectAccessControls.php
@@ -36,7 +36,8 @@ class ObjectAccessControls extends \Google\Service\Resource
*
* @param string $bucket Name of a bucket.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param string $entity The entity holding the permission. Can be user-userId,
* user-emailAddress, group-groupId, group-emailAddress, allUsers, or
* allAuthenticatedUsers.
@@ -59,7 +60,8 @@ public function delete($bucket, $object, $entity, $optParams = [])
*
* @param string $bucket Name of a bucket.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param string $entity The entity holding the permission. Can be user-userId,
* user-emailAddress, group-groupId, group-emailAddress, allUsers, or
* allAuthenticatedUsers.
@@ -83,7 +85,8 @@ public function get($bucket, $object, $entity, $optParams = [])
*
* @param string $bucket Name of a bucket.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param ObjectAccessControl $postBody
* @param array $optParams Optional parameters.
*
@@ -105,7 +108,8 @@ public function insert($bucket, $object, ObjectAccessControl $postBody, $optPara
*
* @param string $bucket Name of a bucket.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param array $optParams Optional parameters.
*
* @opt_param string generation If present, selects a specific revision of this
@@ -125,7 +129,8 @@ public function listObjectAccessControls($bucket, $object, $optParams = [])
*
* @param string $bucket Name of a bucket.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param string $entity The entity holding the permission. Can be user-userId,
* user-emailAddress, group-groupId, group-emailAddress, allUsers, or
* allAuthenticatedUsers.
@@ -149,7 +154,8 @@ public function patch($bucket, $object, $entity, ObjectAccessControl $postBody,
*
* @param string $bucket Name of a bucket.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param string $entity The entity holding the permission. Can be user-userId,
* user-emailAddress, group-groupId, group-emailAddress, allUsers, or
* allAuthenticatedUsers.
diff --git a/lib/Google/src/Service/Storage/Resource/Objects.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Objects.php
similarity index 83%
rename from lib/Google/src/Service/Storage/Resource/Objects.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Objects.php
index c74c0a9a3..fe3998c99 100644
--- a/lib/Google/src/Service/Storage/Resource/Objects.php
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Objects.php
@@ -17,8 +17,10 @@
namespace Google\Service\Storage\Resource;
+use Google\Service\Storage\BulkRestoreObjectsRequest;
use Google\Service\Storage\Channel;
use Google\Service\Storage\ComposeRequest;
+use Google\Service\Storage\GoogleLongrunningOperation;
use Google\Service\Storage\Objects as ObjectsModel;
use Google\Service\Storage\Policy;
use Google\Service\Storage\RewriteResponse;
@@ -35,6 +37,21 @@
*/
class Objects extends \Google\Service\Resource
{
+ /**
+ * Initiates a long-running bulk restore operation on the specified bucket.
+ * (objects.bulkRestore)
+ *
+ * @param string $bucket Name of the bucket in which the object resides.
+ * @param BulkRestoreObjectsRequest $postBody
+ * @param array $optParams Optional parameters.
+ * @return GoogleLongrunningOperation
+ */
+ public function bulkRestore($bucket, BulkRestoreObjectsRequest $postBody, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'postBody' => $postBody];
+ $params = array_merge($params, $optParams);
+ return $this->call('bulkRestore', [$params], GoogleLongrunningOperation::class);
+ }
/**
* Concatenates a list of existing objects into a new object in the same bucket.
* (objects.compose)
@@ -42,8 +59,8 @@ class Objects extends \Google\Service\Resource
* @param string $destinationBucket Name of the bucket containing the source
* objects. The destination object is stored in this bucket.
* @param string $destinationObject Name of the new object. For information
- * about how to URL encode object names to be path safe, see Encoding URI Path
- * Parts.
+ * about how to URL encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param ComposeRequest $postBody
* @param array $optParams Optional parameters.
*
@@ -75,11 +92,13 @@ public function compose($destinationBucket, $destinationObject, ComposeRequest $
* @param string $sourceBucket Name of the bucket in which to find the source
* object.
* @param string $sourceObject Name of the source object. For information about
- * how to URL encode object names to be path safe, see Encoding URI Path Parts.
+ * how to URL encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param string $destinationBucket Name of the bucket in which to store the new
* object. Overrides the provided object metadata's bucket value, if any.For
* information about how to URL encode object names to be path safe, see
- * Encoding URI Path Parts.
+ * [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-
+ * endpoints#encoding).
* @param string $destinationObject Name of the new object. Required when the
* object metadata is not otherwise provided. Overrides the object metadata's
* name value, if any.
@@ -87,9 +106,9 @@ public function compose($destinationBucket, $destinationObject, ComposeRequest $
* @param array $optParams Optional parameters.
*
* @opt_param string destinationKmsKeyName Resource name of the Cloud KMS key,
- * of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys
- * /my-key, that will be used to encrypt the object. Overrides the object
- * metadata's kms_key_name value, if any.
+ * of the form projects/my-project/locations/global/keyRings/my-
+ * kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the
+ * object metadata's kms_key_name value, if any.
* @opt_param string destinationPredefinedAcl Apply a predefined set of access
* controls to the destination object.
* @opt_param string ifGenerationMatch Makes the operation conditional on
@@ -139,7 +158,8 @@ public function copy($sourceBucket, $sourceObject, $destinationBucket, $destinat
*
* @param string $bucket Name of the bucket in which the object resides.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param array $optParams Optional parameters.
*
* @opt_param string generation If present, permanently deletes a specific
@@ -169,7 +189,8 @@ public function delete($bucket, $object, $optParams = [])
*
* @param string $bucket Name of the bucket in which the object resides.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param array $optParams Optional parameters.
*
* @opt_param string generation If present, selects a specific revision of this
@@ -186,6 +207,8 @@ public function delete($bucket, $object, $optParams = [])
* @opt_param string ifMetagenerationNotMatch Makes the operation conditional on
* whether the object's current metageneration does not match the given value.
* @opt_param string projection Set of properties to return. Defaults to noAcl.
+ * @opt_param bool softDeleted If true, only soft-deleted object versions will
+ * be listed. The default is false. For more information, see Soft Delete.
* @opt_param string userProject The project to be billed for this request.
* Required for Requester Pays buckets.
* @return StorageObject
@@ -201,7 +224,8 @@ public function get($bucket, $object, $optParams = [])
*
* @param string $bucket Name of the bucket in which the object resides.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param array $optParams Optional parameters.
*
* @opt_param string generation If present, selects a specific revision of this
@@ -247,7 +271,8 @@ public function getIamPolicy($bucket, $object, $optParams = [])
* @opt_param string name Name of the object. Required when the object metadata
* is not otherwise provided. Overrides the object metadata's name value, if
* any. For information about how to URL encode object names to be path safe,
- * see Encoding URI Path Parts.
+ * see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-
+ * endpoints#encoding).
* @opt_param string predefinedAcl Apply a predefined set of access controls to
* this object.
* @opt_param string projection Set of properties to return. Defaults to noAcl,
@@ -278,6 +303,9 @@ public function insert($bucket, StorageObject $postBody, $optParams = [])
* lexicographically before endOffset. If startOffset is also set, the objects
* listed will have names between startOffset (inclusive) and endOffset
* (exclusive).
+ * @opt_param bool includeFoldersAsPrefixes Only applicable if delimiter is set
+ * to '/'. If true, will also include folders and managed folders (besides
+ * objects) in the returned prefixes.
* @opt_param bool includeTrailingDelimiter If true, objects that end in exactly
* one instance of delimiter will have their metadata included in items in
* addition to prefixes.
@@ -292,6 +320,8 @@ public function insert($bucket, StorageObject $postBody, $optParams = [])
* @opt_param string prefix Filter results to objects whose names begin with
* this prefix.
* @opt_param string projection Set of properties to return. Defaults to noAcl.
+ * @opt_param bool softDeleted If true, only soft-deleted object versions will
+ * be listed. The default is false. For more information, see Soft Delete.
* @opt_param string startOffset Filter results to objects whose names are
* lexicographically equal to or after startOffset. If endOffset is also set,
* the objects listed will have names between startOffset (inclusive) and
@@ -313,7 +343,8 @@ public function listObjects($bucket, $optParams = [])
*
* @param string $bucket Name of the bucket in which the object resides.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param StorageObject $postBody
* @param array $optParams Optional parameters.
*
@@ -330,6 +361,9 @@ public function listObjects($bucket, $optParams = [])
* whether the object's current metageneration matches the given value.
* @opt_param string ifMetagenerationNotMatch Makes the operation conditional on
* whether the object's current metageneration does not match the given value.
+ * @opt_param bool overrideUnlockedRetention Must be true to remove the
+ * retention configuration, reduce its unlocked retention period, or change its
+ * mode from unlocked to locked.
* @opt_param string predefinedAcl Apply a predefined set of access controls to
* this object.
* @opt_param string projection Set of properties to return. Defaults to full.
@@ -343,6 +377,41 @@ public function patch($bucket, $object, StorageObject $postBody, $optParams = []
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], StorageObject::class);
}
+ /**
+ * Restores a soft-deleted object. (objects.restore)
+ *
+ * @param string $bucket Name of the bucket in which the object resides.
+ * @param string $object Name of the object. For information about how to URL
+ * encode object names to be path safe, see Encoding URI Path Parts.
+ * @param string $generation Selects a specific revision of this object.
+ * @param StorageObject $postBody
+ * @param array $optParams Optional parameters.
+ *
+ * @opt_param bool copySourceAcl If true, copies the source object's ACL;
+ * otherwise, uses the bucket's default object ACL. The default is false.
+ * @opt_param string ifGenerationMatch Makes the operation conditional on
+ * whether the object's one live generation matches the given value. Setting to
+ * 0 makes the operation succeed only if there are no live versions of the
+ * object.
+ * @opt_param string ifGenerationNotMatch Makes the operation conditional on
+ * whether none of the object's live generations match the given value. If no
+ * live object exists, the precondition fails. Setting to 0 makes the operation
+ * succeed only if there is a live version of the object.
+ * @opt_param string ifMetagenerationMatch Makes the operation conditional on
+ * whether the object's one live metageneration matches the given value.
+ * @opt_param string ifMetagenerationNotMatch Makes the operation conditional on
+ * whether none of the object's live metagenerations match the given value.
+ * @opt_param string projection Set of properties to return. Defaults to full.
+ * @opt_param string userProject The project to be billed for this request.
+ * Required for Requester Pays buckets.
+ * @return StorageObject
+ */
+ public function restore($bucket, $object, $generation, StorageObject $postBody, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'object' => $object, 'generation' => $generation, 'postBody' => $postBody];
+ $params = array_merge($params, $optParams);
+ return $this->call('restore', [$params], StorageObject::class);
+ }
/**
* Rewrites a source object to a destination object. Optionally overrides
* metadata. (objects.rewrite)
@@ -350,20 +419,22 @@ public function patch($bucket, $object, StorageObject $postBody, $optParams = []
* @param string $sourceBucket Name of the bucket in which to find the source
* object.
* @param string $sourceObject Name of the source object. For information about
- * how to URL encode object names to be path safe, see Encoding URI Path Parts.
+ * how to URL encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param string $destinationBucket Name of the bucket in which to store the new
* object. Overrides the provided object metadata's bucket value, if any.
* @param string $destinationObject Name of the new object. Required when the
* object metadata is not otherwise provided. Overrides the object metadata's
* name value, if any. For information about how to URL encode object names to
- * be path safe, see Encoding URI Path Parts.
+ * be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param StorageObject $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string destinationKmsKeyName Resource name of the Cloud KMS key,
- * of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys
- * /my-key, that will be used to encrypt the object. Overrides the object
- * metadata's kms_key_name value, if any.
+ * of the form projects/my-project/locations/global/keyRings/my-
+ * kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the
+ * object metadata's kms_key_name value, if any.
* @opt_param string destinationPredefinedAcl Apply a predefined set of access
* controls to the destination object.
* @opt_param string ifGenerationMatch Makes the operation conditional on
@@ -422,7 +493,8 @@ public function rewrite($sourceBucket, $sourceObject, $destinationBucket, $desti
*
* @param string $bucket Name of the bucket in which the object resides.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param Policy $postBody
* @param array $optParams Optional parameters.
*
@@ -444,7 +516,8 @@ public function setIamPolicy($bucket, $object, Policy $postBody, $optParams = []
*
* @param string $bucket Name of the bucket in which the object resides.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param string|array $permissions Permissions to test.
* @param array $optParams Optional parameters.
*
@@ -465,7 +538,8 @@ public function testIamPermissions($bucket, $object, $permissions, $optParams =
*
* @param string $bucket Name of the bucket in which the object resides.
* @param string $object Name of the object. For information about how to URL
- * encode object names to be path safe, see Encoding URI Path Parts.
+ * encode object names to be path safe, see [Encoding URI Path
+ * Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
* @param StorageObject $postBody
* @param array $optParams Optional parameters.
*
@@ -482,6 +556,9 @@ public function testIamPermissions($bucket, $object, $permissions, $optParams =
* whether the object's current metageneration matches the given value.
* @opt_param string ifMetagenerationNotMatch Makes the operation conditional on
* whether the object's current metageneration does not match the given value.
+ * @opt_param bool overrideUnlockedRetention Must be true to remove the
+ * retention configuration, reduce its unlocked retention period, or change its
+ * mode from unlocked to locked.
* @opt_param string predefinedAcl Apply a predefined set of access controls to
* this object.
* @opt_param string projection Set of properties to return. Defaults to full.
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Operations.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Operations.php
new file mode 100644
index 000000000..bff19b4b4
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Operations.php
@@ -0,0 +1,88 @@
+
+ * $storageService = new Google\Service\Storage(...);
+ * $operations = $storageService->operations;
+ *
+ */
+class Operations extends \Google\Service\Resource
+{
+ /**
+ * Starts asynchronous cancellation on a long-running operation. The server
+ * makes a best effort to cancel the operation, but success is not guaranteed.
+ * (operations.cancel)
+ *
+ * @param string $bucket The parent bucket of the operation resource.
+ * @param string $operationId The ID of the operation resource.
+ * @param array $optParams Optional parameters.
+ */
+ public function cancel($bucket, $operationId, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'operationId' => $operationId];
+ $params = array_merge($params, $optParams);
+ return $this->call('cancel', [$params]);
+ }
+ /**
+ * Gets the latest state of a long-running operation. (operations.get)
+ *
+ * @param string $bucket The parent bucket of the operation resource.
+ * @param string $operationId The ID of the operation resource.
+ * @param array $optParams Optional parameters.
+ * @return GoogleLongrunningOperation
+ */
+ public function get($bucket, $operationId, $optParams = [])
+ {
+ $params = ['bucket' => $bucket, 'operationId' => $operationId];
+ $params = array_merge($params, $optParams);
+ return $this->call('get', [$params], GoogleLongrunningOperation::class);
+ }
+ /**
+ * Lists operations that match the specified filter in the request.
+ * (operations.listOperations)
+ *
+ * @param string $bucket Name of the bucket in which to look for operations.
+ * @param array $optParams Optional parameters.
+ *
+ * @opt_param string filter A filter to narrow down results to a preferred
+ * subset. The filtering language is documented in more detail in
+ * [AIP-160](https://google.aip.dev/160).
+ * @opt_param int pageSize Maximum number of items to return in a single page of
+ * responses. Fewer total results may be returned than requested. The service
+ * uses this parameter or 100 items, whichever is smaller.
+ * @opt_param string pageToken A previously-returned page token representing
+ * part of the larger set of results to view.
+ * @return GoogleLongrunningListOperationsResponse
+ */
+ public function listOperations($bucket, $optParams = [])
+ {
+ $params = ['bucket' => $bucket];
+ $params = array_merge($params, $optParams);
+ return $this->call('list', [$params], GoogleLongrunningListOperationsResponse::class);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Operations::class, 'Google_Service_Storage_Resource_Operations');
diff --git a/lib/Google/src/Service/Storage/Resource/Projects.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Projects.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Resource/Projects.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Resource/Projects.php
diff --git a/lib/Google/src/Service/Storage/Resource/ProjectsHmacKeys.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/ProjectsHmacKeys.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Resource/ProjectsHmacKeys.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Resource/ProjectsHmacKeys.php
diff --git a/lib/Google/src/Service/Storage/Resource/ProjectsServiceAccount.php b/lib/Google/vendor/google/apiclient-services/src/Storage/Resource/ProjectsServiceAccount.php
similarity index 100%
rename from lib/Google/src/Service/Storage/Resource/ProjectsServiceAccount.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/Resource/ProjectsServiceAccount.php
diff --git a/lib/Google/src/Service/Storage/RewriteResponse.php b/lib/Google/vendor/google/apiclient-services/src/Storage/RewriteResponse.php
similarity index 100%
rename from lib/Google/src/Service/Storage/RewriteResponse.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/RewriteResponse.php
diff --git a/lib/Google/src/Service/Storage/ServiceAccount.php b/lib/Google/vendor/google/apiclient-services/src/Storage/ServiceAccount.php
similarity index 100%
rename from lib/Google/src/Service/Storage/ServiceAccount.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/ServiceAccount.php
diff --git a/lib/Google/src/Service/Storage/StorageObject.php b/lib/Google/vendor/google/apiclient-services/src/Storage/StorageObject.php
similarity index 91%
rename from lib/Google/src/Service/Storage/StorageObject.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/StorageObject.php
index 2ca42efcd..cb666b2ae 100644
--- a/lib/Google/src/Service/Storage/StorageObject.php
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/StorageObject.php
@@ -72,6 +72,10 @@ class StorageObject extends \Google\Collection
* @var string
*/
public $generation;
+ /**
+ * @var string
+ */
+ public $hardDeleteTime;
/**
* @var string
*/
@@ -106,6 +110,8 @@ class StorageObject extends \Google\Collection
public $name;
protected $ownerType = StorageObjectOwner::class;
protected $ownerDataType = '';
+ protected $retentionType = StorageObjectRetention::class;
+ protected $retentionDataType = '';
/**
* @var string
*/
@@ -118,6 +124,10 @@ class StorageObject extends \Google\Collection
* @var string
*/
public $size;
+ /**
+ * @var string
+ */
+ public $softDeleteTime;
/**
* @var string
*/
@@ -339,6 +349,20 @@ public function getGeneration()
{
return $this->generation;
}
+ /**
+ * @param string
+ */
+ public function setHardDeleteTime($hardDeleteTime)
+ {
+ $this->hardDeleteTime = $hardDeleteTime;
+ }
+ /**
+ * @return string
+ */
+ public function getHardDeleteTime()
+ {
+ return $this->hardDeleteTime;
+ }
/**
* @param string
*/
@@ -465,6 +489,20 @@ public function getOwner()
{
return $this->owner;
}
+ /**
+ * @param StorageObjectRetention
+ */
+ public function setRetention(StorageObjectRetention $retention)
+ {
+ $this->retention = $retention;
+ }
+ /**
+ * @return StorageObjectRetention
+ */
+ public function getRetention()
+ {
+ return $this->retention;
+ }
/**
* @param string
*/
@@ -507,6 +545,20 @@ public function getSize()
{
return $this->size;
}
+ /**
+ * @param string
+ */
+ public function setSoftDeleteTime($softDeleteTime)
+ {
+ $this->softDeleteTime = $softDeleteTime;
+ }
+ /**
+ * @return string
+ */
+ public function getSoftDeleteTime()
+ {
+ return $this->softDeleteTime;
+ }
/**
* @param string
*/
diff --git a/lib/Google/src/Service/Storage/StorageObjectCustomerEncryption.php b/lib/Google/vendor/google/apiclient-services/src/Storage/StorageObjectCustomerEncryption.php
similarity index 100%
rename from lib/Google/src/Service/Storage/StorageObjectCustomerEncryption.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/StorageObjectCustomerEncryption.php
diff --git a/lib/Google/src/Service/Storage/StorageObjectOwner.php b/lib/Google/vendor/google/apiclient-services/src/Storage/StorageObjectOwner.php
similarity index 100%
rename from lib/Google/src/Service/Storage/StorageObjectOwner.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/StorageObjectOwner.php
diff --git a/lib/Google/vendor/google/apiclient-services/src/Storage/StorageObjectRetention.php b/lib/Google/vendor/google/apiclient-services/src/Storage/StorageObjectRetention.php
new file mode 100644
index 000000000..d871f9afa
--- /dev/null
+++ b/lib/Google/vendor/google/apiclient-services/src/Storage/StorageObjectRetention.php
@@ -0,0 +1,62 @@
+mode = $mode;
+ }
+ /**
+ * @return string
+ */
+ public function getMode()
+ {
+ return $this->mode;
+ }
+ /**
+ * @param string
+ */
+ public function setRetainUntilTime($retainUntilTime)
+ {
+ $this->retainUntilTime = $retainUntilTime;
+ }
+ /**
+ * @return string
+ */
+ public function getRetainUntilTime()
+ {
+ return $this->retainUntilTime;
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(StorageObjectRetention::class, 'Google_Service_Storage_StorageObjectRetention');
diff --git a/lib/Google/src/Service/Storage/TestIamPermissionsResponse.php b/lib/Google/vendor/google/apiclient-services/src/Storage/TestIamPermissionsResponse.php
similarity index 100%
rename from lib/Google/src/Service/Storage/TestIamPermissionsResponse.php
rename to lib/Google/vendor/google/apiclient-services/src/Storage/TestIamPermissionsResponse.php
diff --git a/lib/Google/vendor/google/auth/composer.json b/lib/Google/vendor/google/auth/composer.json
index 47f673c48..9e6466d61 100644
--- a/lib/Google/vendor/google/auth/composer.json
+++ b/lib/Google/vendor/google/auth/composer.json
@@ -17,13 +17,13 @@
"psr/cache": "^1.0||^2.0||^3.0"
},
"require-dev": {
- "guzzlehttp/promises": "^1.3",
+ "guzzlehttp/promises": "^2.0",
"squizlabs/php_codesniffer": "^3.5",
"phpunit/phpunit": "^9.0.0",
"phpspec/prophecy-phpunit": "^2.0",
"sebastian/comparator": ">=1.2.3",
"phpseclib/phpseclib": "^3.0",
- "kelvinmo/simplejwt": "0.7.0"
+ "kelvinmo/simplejwt": "0.7.1"
},
"suggest": {
"phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2."
diff --git a/lib/Google/vendor/google/auth/src/AccessToken.php b/lib/Google/vendor/google/auth/src/AccessToken.php
index 52bad396e..0afc4ca1e 100644
--- a/lib/Google/vendor/google/auth/src/AccessToken.php
+++ b/lib/Google/vendor/google/auth/src/AccessToken.php
@@ -18,7 +18,6 @@
namespace Google\Auth;
use DateTime;
-use Exception;
use Firebase\JWT\ExpiredException;
use Firebase\JWT\JWT;
use Firebase\JWT\Key;
@@ -312,11 +311,9 @@ private function getCerts($location, $cacheKey, array $options = [])
$cacheItem = $this->cache->getItem($cacheKey);
$certs = $cacheItem ? $cacheItem->get() : null;
- $gotNewCerts = false;
+ $expireTime = null;
if (!$certs) {
- $certs = $this->retrieveCertsFromLocation($location, $options);
-
- $gotNewCerts = true;
+ list($certs, $expireTime) = $this->retrieveCertsFromLocation($location, $options);
}
if (!isset($certs['keys'])) {
@@ -332,8 +329,8 @@ private function getCerts($location, $cacheKey, array $options = [])
// Push caching off until after verifying certs are in a valid format.
// Don't want to cache bad data.
- if ($gotNewCerts) {
- $cacheItem->expiresAt(new DateTime('+1 hour'));
+ if ($expireTime) {
+ $cacheItem->expiresAt(new DateTime($expireTime));
$cacheItem->set($certs);
$this->cache->save($cacheItem);
}
@@ -346,13 +343,14 @@ private function getCerts($location, $cacheKey, array $options = [])
*
* @param string $url location
* @param array $options [optional] Configuration options.
- * @return array certificates
+ * @return array{array, string}
* @throws InvalidArgumentException If certs could not be retrieved from a local file.
* @throws RuntimeException If certs could not be retrieved from a remote location.
*/
private function retrieveCertsFromLocation($url, array $options = [])
{
// If we're retrieving a local file, just grab it.
+ $expireTime = '+1 hour';
if (strpos($url, 'http') !== 0) {
if (!file_exists($url)) {
throw new InvalidArgumentException(sprintf(
@@ -361,14 +359,28 @@ private function retrieveCertsFromLocation($url, array $options = [])
));
}
- return json_decode((string) file_get_contents($url), true);
+ return [
+ json_decode((string) file_get_contents($url), true),
+ $expireTime
+ ];
}
$httpHandler = $this->httpHandler;
$response = $httpHandler(new Request('GET', $url), $options);
if ($response->getStatusCode() == 200) {
- return json_decode((string) $response->getBody(), true);
+ if ($cacheControl = $response->getHeaderLine('Cache-Control')) {
+ array_map(function ($value) use (&$expireTime) {
+ list($key, $value) = explode('=', $value) + [null, null];
+ if (trim($key) == 'max-age') {
+ $expireTime = '+' . $value . ' seconds';
+ }
+ }, explode(',', $cacheControl));
+ }
+ return [
+ json_decode((string) $response->getBody(), true),
+ $expireTime
+ ];
}
throw new RuntimeException(sprintf(
@@ -409,7 +421,7 @@ private function loadPhpsecPublicKey(string $modulus, string $exponent): string
$exponent
]), 256),
]);
- return $key->toString('PKCS1');
+ return $key->toString('PKCS8');
}
/**
diff --git a/lib/Google/vendor/google/auth/src/CredentialSource/AwsNativeSource.php b/lib/Google/vendor/google/auth/src/CredentialSource/AwsNativeSource.php
new file mode 100644
index 000000000..3a8c20eaa
--- /dev/null
+++ b/lib/Google/vendor/google/auth/src/CredentialSource/AwsNativeSource.php
@@ -0,0 +1,360 @@
+audience = $audience;
+ $this->regionalCredVerificationUrl = $regionalCredVerificationUrl;
+ $this->regionUrl = $regionUrl;
+ $this->securityCredentialsUrl = $securityCredentialsUrl;
+ $this->imdsv2SessionTokenUrl = $imdsv2SessionTokenUrl;
+ }
+
+ public function fetchSubjectToken(callable $httpHandler = null): string
+ {
+ if (is_null($httpHandler)) {
+ $httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient());
+ }
+
+ $headers = [];
+ if ($this->imdsv2SessionTokenUrl) {
+ $headers = [
+ 'X-aws-ec2-metadata-token' => self::getImdsV2SessionToken($this->imdsv2SessionTokenUrl, $httpHandler)
+ ];
+ }
+
+ if (!$signingVars = self::getSigningVarsFromEnv()) {
+ if (!$this->securityCredentialsUrl) {
+ throw new \LogicException('Unable to get credentials from ENV, and no security credentials URL provided');
+ }
+ $signingVars = self::getSigningVarsFromUrl(
+ $httpHandler,
+ $this->securityCredentialsUrl,
+ self::getRoleName($httpHandler, $this->securityCredentialsUrl, $headers),
+ $headers
+ );
+ }
+
+ if (!$region = self::getRegionFromEnv()) {
+ if (!$this->regionUrl) {
+ throw new \LogicException('Unable to get region from ENV, and no region URL provided');
+ }
+ $region = self::getRegionFromUrl($httpHandler, $this->regionUrl, $headers);
+ }
+ $url = str_replace('{region}', $region, $this->regionalCredVerificationUrl);
+ $host = parse_url($url)['host'] ?? '';
+
+ // From here we use the signing vars to create the signed request to receive a token
+ [$accessKeyId, $secretAccessKey, $securityToken] = $signingVars;
+ $headers = self::getSignedRequestHeaders($region, $host, $accessKeyId, $secretAccessKey, $securityToken);
+
+ // Inject x-goog-cloud-target-resource into header
+ $headers['x-goog-cloud-target-resource'] = $this->audience;
+
+ // Format headers as they're expected in the subject token
+ $formattedHeaders= array_map(
+ fn ($k, $v) => ['key' => $k, 'value' => $v],
+ array_keys($headers),
+ $headers,
+ );
+
+ $request = [
+ 'headers' => $formattedHeaders,
+ 'method' => 'POST',
+ 'url' => $url,
+ ];
+
+ return urlencode(json_encode($request) ?: '');
+ }
+
+ /**
+ * @internal
+ */
+ public static function getImdsV2SessionToken(string $imdsV2Url, callable $httpHandler): string
+ {
+ $headers = [
+ 'X-aws-ec2-metadata-token-ttl-seconds' => '21600'
+ ];
+ $request = new Request(
+ 'PUT',
+ $imdsV2Url,
+ $headers
+ );
+
+ $response = $httpHandler($request);
+ return (string) $response->getBody();
+ }
+
+ /**
+ * @see http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
+ *
+ * @internal
+ *
+ * @return array
+ */
+ public static function getSignedRequestHeaders(
+ string $region,
+ string $host,
+ string $accessKeyId,
+ string $secretAccessKey,
+ ?string $securityToken
+ ): array {
+ $service = 'sts';
+
+ # Create a date for headers and the credential string in ISO-8601 format
+ $amzdate = date('Ymd\THis\Z');
+ $datestamp = date('Ymd'); # Date w/o time, used in credential scope
+
+ # Create the canonical headers and signed headers. Header names
+ # must be trimmed and lowercase, and sorted in code point order from
+ # low to high. Note that there is a trailing \n.
+ $canonicalHeaders = sprintf("host:%s\nx-amz-date:%s\n", $host, $amzdate);
+ if ($securityToken) {
+ $canonicalHeaders .= sprintf("x-amz-security-token:%s\n", $securityToken);
+ }
+
+ # Step 5: Create the list of signed headers. This lists the headers
+ # in the canonicalHeaders list, delimited with ";" and in alpha order.
+ # Note: The request can include any headers; $canonicalHeaders and
+ # $signedHeaders lists those that you want to be included in the
+ # hash of the request. "Host" and "x-amz-date" are always required.
+ $signedHeaders = 'host;x-amz-date';
+ if ($securityToken) {
+ $signedHeaders .= ';x-amz-security-token';
+ }
+
+ # Step 6: Create payload hash (hash of the request body content). For GET
+ # requests, the payload is an empty string ("").
+ $payloadHash = hash('sha256', '');
+
+ # Step 7: Combine elements to create canonical request
+ $canonicalRequest = implode("\n", [
+ 'POST', // method
+ '/', // canonical URL
+ self::CRED_VERIFICATION_QUERY, // query string
+ $canonicalHeaders,
+ $signedHeaders,
+ $payloadHash
+ ]);
+
+ # ************* TASK 2: CREATE THE STRING TO SIGN*************
+ # Match the algorithm to the hashing algorithm you use, either SHA-1 or
+ # SHA-256 (recommended)
+ $algorithm = 'AWS4-HMAC-SHA256';
+ $scope = implode('/', [$datestamp, $region, $service, 'aws4_request']);
+ $stringToSign = implode("\n", [$algorithm, $amzdate, $scope, hash('sha256', $canonicalRequest)]);
+
+ # ************* TASK 3: CALCULATE THE SIGNATURE *************
+ # Create the signing key using the function defined above.
+ // (done above)
+ $signingKey = self::getSignatureKey($secretAccessKey, $datestamp, $region, $service);
+
+ # Sign the string_to_sign using the signing_key
+ $signature = bin2hex(self::hmacSign($signingKey, $stringToSign));
+
+ # ************* TASK 4: ADD SIGNING INFORMATION TO THE REQUEST *************
+ # The signing information can be either in a query string value or in
+ # a header named Authorization. This code shows how to use a header.
+ # Create authorization header and add to request headers
+ $authorizationHeader = sprintf(
+ '%s Credential=%s/%s, SignedHeaders=%s, Signature=%s',
+ $algorithm,
+ $accessKeyId,
+ $scope,
+ $signedHeaders,
+ $signature
+ );
+
+ # The request can include any headers, but MUST include "host", "x-amz-date",
+ # and (for this scenario) "Authorization". "host" and "x-amz-date" must
+ # be included in the canonical_headers and signed_headers, as noted
+ # earlier. Order here is not significant.
+ $headers = [
+ 'host' => $host,
+ 'x-amz-date' => $amzdate,
+ 'Authorization' => $authorizationHeader,
+ ];
+ if ($securityToken) {
+ $headers['x-amz-security-token'] = $securityToken;
+ }
+
+ return $headers;
+ }
+
+ /**
+ * @internal
+ */
+ public static function getRegionFromEnv(): ?string
+ {
+ $region = getenv('AWS_REGION');
+ if (empty($region)) {
+ $region = getenv('AWS_DEFAULT_REGION');
+ }
+ return $region ?: null;
+ }
+
+ /**
+ * @internal
+ *
+ * @param callable $httpHandler
+ * @param string $regionUrl
+ * @param array $headers Request headers to send in with the request.
+ */
+ public static function getRegionFromUrl(callable $httpHandler, string $regionUrl, array $headers): string
+ {
+ // get the region/zone from the region URL
+ $regionRequest = new Request('GET', $regionUrl, $headers);
+ $regionResponse = $httpHandler($regionRequest);
+
+ // Remove last character. For example, if us-east-2b is returned,
+ // the region would be us-east-2.
+ return substr((string) $regionResponse->getBody(), 0, -1);
+ }
+
+ /**
+ * @internal
+ *
+ * @param callable $httpHandler
+ * @param string $securityCredentialsUrl
+ * @param array $headers Request headers to send in with the request.
+ */
+ public static function getRoleName(callable $httpHandler, string $securityCredentialsUrl, array $headers): string
+ {
+ // Get the AWS role name
+ $roleRequest = new Request('GET', $securityCredentialsUrl, $headers);
+ $roleResponse = $httpHandler($roleRequest);
+ $roleName = (string) $roleResponse->getBody();
+
+ return $roleName;
+ }
+
+ /**
+ * @internal
+ *
+ * @param callable $httpHandler
+ * @param string $securityCredentialsUrl
+ * @param array $headers Request headers to send in with the request.
+ * @return array{string, string, ?string}
+ */
+ public static function getSigningVarsFromUrl(
+ callable $httpHandler,
+ string $securityCredentialsUrl,
+ string $roleName,
+ array $headers
+ ): array {
+ // Get the AWS credentials
+ $credsRequest = new Request(
+ 'GET',
+ $securityCredentialsUrl . '/' . $roleName,
+ $headers
+ );
+ $credsResponse = $httpHandler($credsRequest);
+ $awsCreds = json_decode((string) $credsResponse->getBody(), true);
+ return [
+ $awsCreds['AccessKeyId'], // accessKeyId
+ $awsCreds['SecretAccessKey'], // secretAccessKey
+ $awsCreds['Token'], // token
+ ];
+ }
+
+ /**
+ * @internal
+ *
+ * @return array{string, string, ?string}
+ */
+ public static function getSigningVarsFromEnv(): ?array
+ {
+ $accessKeyId = getenv('AWS_ACCESS_KEY_ID');
+ $secretAccessKey = getenv('AWS_SECRET_ACCESS_KEY');
+ if ($accessKeyId && $secretAccessKey) {
+ return [
+ $accessKeyId,
+ $secretAccessKey,
+ getenv('AWS_SESSION_TOKEN') ?: null, // session token (can be null)
+ ];
+ }
+
+ return null;
+ }
+
+ /**
+ * Return HMAC hash in binary string
+ */
+ private static function hmacSign(string $key, string $msg): string
+ {
+ return hash_hmac('sha256', self::utf8Encode($msg), $key, true);
+ }
+
+ /**
+ * @TODO add a fallback when mbstring is not available
+ */
+ private static function utf8Encode(string $string): string
+ {
+ return mb_convert_encoding($string, 'UTF-8', 'ISO-8859-1');
+ }
+
+ private static function getSignatureKey(
+ string $key,
+ string $dateStamp,
+ string $regionName,
+ string $serviceName
+ ): string {
+ $kDate = self::hmacSign(self::utf8Encode('AWS4' . $key), $dateStamp);
+ $kRegion = self::hmacSign($kDate, $regionName);
+ $kService = self::hmacSign($kRegion, $serviceName);
+ $kSigning = self::hmacSign($kService, 'aws4_request');
+
+ return $kSigning;
+ }
+}
diff --git a/lib/Google/vendor/google/auth/src/CredentialSource/FileSource.php b/lib/Google/vendor/google/auth/src/CredentialSource/FileSource.php
new file mode 100644
index 000000000..e2afc6c58
--- /dev/null
+++ b/lib/Google/vendor/google/auth/src/CredentialSource/FileSource.php
@@ -0,0 +1,75 @@
+file = $file;
+
+ if ($format === 'json' && is_null($subjectTokenFieldName)) {
+ throw new InvalidArgumentException(
+ 'subject_token_field_name must be set when format is JSON'
+ );
+ }
+
+ $this->format = $format;
+ $this->subjectTokenFieldName = $subjectTokenFieldName;
+ }
+
+ public function fetchSubjectToken(callable $httpHandler = null): string
+ {
+ $contents = file_get_contents($this->file);
+ if ($this->format === 'json') {
+ if (!$json = json_decode((string) $contents, true)) {
+ throw new UnexpectedValueException(
+ 'Unable to decode JSON file'
+ );
+ }
+ if (!isset($json[$this->subjectTokenFieldName])) {
+ throw new UnexpectedValueException(
+ 'subject_token_field_name not found in JSON file'
+ );
+ }
+ $contents = $json[$this->subjectTokenFieldName];
+ }
+
+ return $contents;
+ }
+}
diff --git a/lib/Google/vendor/google/auth/src/CredentialSource/UrlSource.php b/lib/Google/vendor/google/auth/src/CredentialSource/UrlSource.php
new file mode 100644
index 000000000..0acb3c6ef
--- /dev/null
+++ b/lib/Google/vendor/google/auth/src/CredentialSource/UrlSource.php
@@ -0,0 +1,97 @@
+
+ */
+ private ?array $headers;
+
+ /**
+ * @param string $url The URL to fetch the subject token from.
+ * @param string $format The format of the token in the response. Can be null or "json".
+ * @param string $subjectTokenFieldName The name of the field containing the token in the response. This is required
+ * when format is "json".
+ * @param array $headers Request headers to send in with the request to the URL.
+ */
+ public function __construct(
+ string $url,
+ string $format = null,
+ string $subjectTokenFieldName = null,
+ array $headers = null
+ ) {
+ $this->url = $url;
+
+ if ($format === 'json' && is_null($subjectTokenFieldName)) {
+ throw new InvalidArgumentException(
+ 'subject_token_field_name must be set when format is JSON'
+ );
+ }
+
+ $this->format = $format;
+ $this->subjectTokenFieldName = $subjectTokenFieldName;
+ $this->headers = $headers;
+ }
+
+ public function fetchSubjectToken(callable $httpHandler = null): string
+ {
+ if (is_null($httpHandler)) {
+ $httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient());
+ }
+
+ $request = new Request(
+ 'GET',
+ $this->url,
+ $this->headers ?: []
+ );
+
+ $response = $httpHandler($request);
+ $body = (string) $response->getBody();
+ if ($this->format === 'json') {
+ if (!$json = json_decode((string) $body, true)) {
+ throw new UnexpectedValueException(
+ 'Unable to decode JSON response'
+ );
+ }
+ if (!isset($json[$this->subjectTokenFieldName])) {
+ throw new UnexpectedValueException(
+ 'subject_token_field_name not found in JSON file'
+ );
+ }
+ $body = $json[$this->subjectTokenFieldName];
+ }
+
+ return $body;
+ }
+}
diff --git a/lib/Google/vendor/google/auth/src/Credentials/ExternalAccountCredentials.php b/lib/Google/vendor/google/auth/src/Credentials/ExternalAccountCredentials.php
new file mode 100644
index 000000000..b2716bfaa
--- /dev/null
+++ b/lib/Google/vendor/google/auth/src/Credentials/ExternalAccountCredentials.php
@@ -0,0 +1,241 @@
+ $jsonKey JSON credentials as an associative array.
+ */
+ public function __construct(
+ $scope,
+ array $jsonKey
+ ) {
+ if (!array_key_exists('type', $jsonKey)) {
+ throw new InvalidArgumentException('json key is missing the type field');
+ }
+ if ($jsonKey['type'] !== self::EXTERNAL_ACCOUNT_TYPE) {
+ throw new InvalidArgumentException(sprintf(
+ 'expected "%s" type but received "%s"',
+ self::EXTERNAL_ACCOUNT_TYPE,
+ $jsonKey['type']
+ ));
+ }
+
+ if (!array_key_exists('token_url', $jsonKey)) {
+ throw new InvalidArgumentException(
+ 'json key is missing the token_url field'
+ );
+ }
+
+ if (!array_key_exists('audience', $jsonKey)) {
+ throw new InvalidArgumentException(
+ 'json key is missing the audience field'
+ );
+ }
+
+ if (!array_key_exists('subject_token_type', $jsonKey)) {
+ throw new InvalidArgumentException(
+ 'json key is missing the subject_token_type field'
+ );
+ }
+
+ if (!array_key_exists('credential_source', $jsonKey)) {
+ throw new InvalidArgumentException(
+ 'json key is missing the credential_source field'
+ );
+ }
+
+ if (array_key_exists('service_account_impersonation_url', $jsonKey)) {
+ $this->serviceAccountImpersonationUrl = $jsonKey['service_account_impersonation_url'];
+ }
+
+ $this->quotaProject = $jsonKey['quota_project_id'] ?? null;
+
+ $this->auth = new OAuth2([
+ 'tokenCredentialUri' => $jsonKey['token_url'],
+ 'audience' => $jsonKey['audience'],
+ 'scope' => $scope,
+ 'subjectTokenType' => $jsonKey['subject_token_type'],
+ 'subjectTokenFetcher' => self::buildCredentialSource($jsonKey),
+ ]);
+ }
+
+ /**
+ * @param array $jsonKey
+ */
+ private static function buildCredentialSource(array $jsonKey): ExternalAccountCredentialSourceInterface
+ {
+ $credentialSource = $jsonKey['credential_source'];
+ if (isset($credentialSource['file'])) {
+ return new FileSource(
+ $credentialSource['file'],
+ $credentialSource['format']['type'] ?? null,
+ $credentialSource['format']['subject_token_field_name'] ?? null
+ );
+ }
+
+ if (
+ isset($credentialSource['environment_id'])
+ && 1 === preg_match('/^aws(\d+)$/', $credentialSource['environment_id'], $matches)
+ ) {
+ if ($matches[1] !== '1') {
+ throw new InvalidArgumentException(
+ "aws version \"$matches[1]\" is not supported in the current build."
+ );
+ }
+ if (!array_key_exists('regional_cred_verification_url', $credentialSource)) {
+ throw new InvalidArgumentException(
+ 'The regional_cred_verification_url field is required for aws1 credential source.'
+ );
+ }
+ if (!array_key_exists('audience', $jsonKey)) {
+ throw new InvalidArgumentException(
+ 'aws1 credential source requires an audience to be set in the JSON file.'
+ );
+ }
+
+ return new AwsNativeSource(
+ $jsonKey['audience'],
+ $credentialSource['regional_cred_verification_url'], // $regionalCredVerificationUrl
+ $credentialSource['region_url'] ?? null, // $regionUrl
+ $credentialSource['url'] ?? null, // $securityCredentialsUrl
+ $credentialSource['imdsv2_session_token_url'] ?? null, // $imdsV2TokenUrl
+ );
+ }
+
+ if (isset($credentialSource['url'])) {
+ return new UrlSource(
+ $credentialSource['url'],
+ $credentialSource['format']['type'] ?? null,
+ $credentialSource['format']['subject_token_field_name'] ?? null,
+ $credentialSource['headers'] ?? null,
+ );
+ }
+
+ throw new InvalidArgumentException('Unable to determine credential source from json key.');
+ }
+ /**
+ * @param string $stsToken
+ * @param callable $httpHandler
+ *
+ * @return array {
+ * A set of auth related metadata, containing the following
+ *
+ * @type string $access_token
+ * @type int $expires_at
+ * }
+ */
+ private function getImpersonatedAccessToken(string $stsToken, callable $httpHandler = null): array
+ {
+ if (!isset($this->serviceAccountImpersonationUrl)) {
+ throw new InvalidArgumentException(
+ 'service_account_impersonation_url must be set in JSON credentials.'
+ );
+ }
+ $request = new Request(
+ 'POST',
+ $this->serviceAccountImpersonationUrl,
+ [
+ 'Content-Type' => 'application/json',
+ 'Authorization' => 'Bearer ' . $stsToken,
+ ],
+ (string) json_encode([
+ 'lifetime' => sprintf('%ss', OAuth2::DEFAULT_EXPIRY_SECONDS),
+ 'scope' => $this->auth->getScope(),
+ ]),
+ );
+ if (is_null($httpHandler)) {
+ $httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient());
+ }
+ $response = $httpHandler($request);
+ $body = json_decode((string) $response->getBody(), true);
+ return [
+ 'access_token' => $body['accessToken'],
+ 'expires_at' => strtotime($body['expireTime']),
+ ];
+ }
+
+ /**
+ * @param callable $httpHandler
+ *
+ * @return array {
+ * A set of auth related metadata, containing the following
+ *
+ * @type string $access_token
+ * @type int $expires_at (impersonated service accounts only)
+ * @type int $expires_in (identity pool only)
+ * @type string $issued_token_type (identity pool only)
+ * @type string $token_type (identity pool only)
+ * }
+ */
+ public function fetchAuthToken(callable $httpHandler = null)
+ {
+ $stsToken = $this->auth->fetchAuthToken($httpHandler);
+
+ if (isset($this->serviceAccountImpersonationUrl)) {
+ return $this->getImpersonatedAccessToken($stsToken['access_token'], $httpHandler);
+ }
+
+ return $stsToken;
+ }
+
+ public function getCacheKey()
+ {
+ return $this->auth->getCacheKey();
+ }
+
+ public function getLastReceivedToken()
+ {
+ return $this->auth->getLastReceivedToken();
+ }
+
+ /**
+ * Get the quota project used for this API request
+ *
+ * @return string|null
+ */
+ public function getQuotaProject()
+ {
+ return $this->quotaProject;
+ }
+}
diff --git a/lib/Google/vendor/google/auth/src/Credentials/GCECredentials.php b/lib/Google/vendor/google/auth/src/Credentials/GCECredentials.php
index 0a2c019de..991589b52 100644
--- a/lib/Google/vendor/google/auth/src/Credentials/GCECredentials.php
+++ b/lib/Google/vendor/google/auth/src/Credentials/GCECredentials.php
@@ -100,6 +100,11 @@ class GCECredentials extends CredentialsLoader implements
*/
const FLAVOR_HEADER = 'Metadata-Flavor';
+ /**
+ * The Linux file which contains the product name.
+ */
+ private const GKE_PRODUCT_NAME_FILE = '/sys/class/dmi/id/product_name';
+
/**
* Note: the explicit `timeout` and `tries` below is a workaround. The underlying
* issue is that resolving an unknown host on some networks will take
@@ -340,6 +345,22 @@ public static function onGce(callable $httpHandler = null)
} catch (ConnectException $e) {
}
}
+
+ if (PHP_OS === 'Windows') {
+ // @TODO: implement GCE residency detection on Windows
+ return false;
+ }
+
+ // Detect GCE residency on Linux
+ return self::detectResidencyLinux(self::GKE_PRODUCT_NAME_FILE);
+ }
+
+ private static function detectResidencyLinux(string $productNameFile): bool
+ {
+ if (file_exists($productNameFile)) {
+ $productName = trim((string) file_get_contents($productNameFile));
+ return 0 === strpos($productName, 'Google');
+ }
return false;
}
diff --git a/lib/Google/vendor/google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php b/lib/Google/vendor/google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php
index 577fe2298..1b4e46eaf 100644
--- a/lib/Google/vendor/google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php
+++ b/lib/Google/vendor/google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php
@@ -37,13 +37,13 @@ class ImpersonatedServiceAccountCredentials extends CredentialsLoader implements
protected $sourceCredentials;
/**
- * Instantiate an instance of ImpersonatedServiceAccountCredentials from a credentials file that has be created with
- * the --impersonated-service-account flag.
+ * Instantiate an instance of ImpersonatedServiceAccountCredentials from a credentials file that
+ * has be created with the --impersonated-service-account flag.
*
- * @param string|string[] $scope the scope of the access request, expressed
- * either as an Array or as a space-delimited String.
+ * @param string|string[] $scope The scope of the access request, expressed either as an
+ * array or as a space-delimited string.
* @param string|array $jsonKey JSON credential file path or JSON credentials
- * as an associative array
+ * as an associative array.
*/
public function __construct(
$scope,
@@ -59,24 +59,34 @@ public function __construct(
}
}
if (!array_key_exists('service_account_impersonation_url', $jsonKey)) {
- throw new \LogicException('json key is missing the service_account_impersonation_url field');
+ throw new \LogicException(
+ 'json key is missing the service_account_impersonation_url field'
+ );
}
if (!array_key_exists('source_credentials', $jsonKey)) {
throw new \LogicException('json key is missing the source_credentials field');
}
- $this->impersonatedServiceAccountName = $this->getImpersonatedServiceAccountNameFromUrl($jsonKey['service_account_impersonation_url']);
+ $this->impersonatedServiceAccountName = $this->getImpersonatedServiceAccountNameFromUrl(
+ $jsonKey['service_account_impersonation_url']
+ );
- $this->sourceCredentials = new UserRefreshCredentials($scope, $jsonKey['source_credentials']);
+ $this->sourceCredentials = new UserRefreshCredentials(
+ $scope,
+ $jsonKey['source_credentials']
+ );
}
/**
- * Helper function for extracting the Server Account Name from the URL saved in the account credentials file
- * @param $serviceAccountImpersonationUrl string URL from the 'service_account_impersonation_url' field
+ * Helper function for extracting the Server Account Name from the URL saved in the account
+ * credentials file.
+ *
+ * @param $serviceAccountImpersonationUrl string URL from "service_account_impersonation_url"
* @return string Service account email or ID.
*/
- private function getImpersonatedServiceAccountNameFromUrl(string $serviceAccountImpersonationUrl)
- {
+ private function getImpersonatedServiceAccountNameFromUrl(
+ string $serviceAccountImpersonationUrl
+ ): string {
$fields = explode('/', $serviceAccountImpersonationUrl);
$lastField = end($fields);
$splitter = explode(':', $lastField);
diff --git a/lib/Google/vendor/google/auth/src/CredentialsLoader.php b/lib/Google/vendor/google/auth/src/CredentialsLoader.php
index ada8e759c..9e28701ed 100644
--- a/lib/Google/vendor/google/auth/src/CredentialsLoader.php
+++ b/lib/Google/vendor/google/auth/src/CredentialsLoader.php
@@ -17,6 +17,7 @@
namespace Google\Auth;
+use Google\Auth\Credentials\ExternalAccountCredentials;
use Google\Auth\Credentials\ImpersonatedServiceAccountCredentials;
use Google\Auth\Credentials\InsecureCredentials;
use Google\Auth\Credentials\ServiceAccountCredentials;
@@ -32,6 +33,8 @@ abstract class CredentialsLoader implements
FetchAuthTokenInterface,
UpdateMetadataInterface
{
+ use UpdateMetadataTrait;
+
const TOKEN_CREDENTIAL_URI = 'https://oauth2.googleapis.com/token';
const ENV_VAR = 'GOOGLE_APPLICATION_CREDENTIALS';
const QUOTA_PROJECT_ENV_VAR = 'GOOGLE_CLOUD_QUOTA_PROJECT';
@@ -122,7 +125,7 @@ public static function fromWellKnownFile()
* user-defined scopes exist, expressed either as an Array or as a
* space-delimited string.
*
- * @return ServiceAccountCredentials|UserRefreshCredentials|ImpersonatedServiceAccountCredentials
+ * @return ServiceAccountCredentials|UserRefreshCredentials|ImpersonatedServiceAccountCredentials|ExternalAccountCredentials
*/
public static function makeCredentials(
$scope,
@@ -148,6 +151,11 @@ public static function makeCredentials(
return new ImpersonatedServiceAccountCredentials($anyScope, $jsonKey);
}
+ if ($jsonKey['type'] == 'external_account') {
+ $anyScope = $scope ?: $defaultScope;
+ return new ExternalAccountCredentials($anyScope, $jsonKey);
+ }
+
throw new \InvalidArgumentException('invalid value in the type field');
}
@@ -190,44 +198,6 @@ public static function makeInsecureCredentials()
return new InsecureCredentials();
}
- /**
- * export a callback function which updates runtime metadata.
- *
- * @return callable updateMetadata function
- * @deprecated
- */
- public function getUpdateMetadataFunc()
- {
- return [$this, 'updateMetadata'];
- }
-
- /**
- * Updates metadata with the authorization token.
- *
- * @param array $metadata metadata hashmap
- * @param string $authUri optional auth uri
- * @param callable $httpHandler callback which delivers psr7 request
- * @return array updated metadata hashmap
- */
- public function updateMetadata(
- $metadata,
- $authUri = null,
- callable $httpHandler = null
- ) {
- if (isset($metadata[self::AUTH_METADATA_KEY])) {
- // Auth metadata has already been set
- return $metadata;
- }
- $result = $this->fetchAuthToken($httpHandler);
- $metadata_copy = $metadata;
- if (isset($result['access_token'])) {
- $metadata_copy[self::AUTH_METADATA_KEY] = ['Bearer ' . $result['access_token']];
- } elseif (isset($result['id_token'])) {
- $metadata_copy[self::AUTH_METADATA_KEY] = ['Bearer ' . $result['id_token']];
- }
- return $metadata_copy;
- }
-
/**
* Fetch a quota project from the environment variable
* GOOGLE_CLOUD_QUOTA_PROJECT. Return null if
diff --git a/lib/Google/vendor/google/auth/src/ExternalAccountCredentialSourceInterface.php b/lib/Google/vendor/google/auth/src/ExternalAccountCredentialSourceInterface.php
new file mode 100644
index 000000000..b4d00f8b4
--- /dev/null
+++ b/lib/Google/vendor/google/auth/src/ExternalAccountCredentialSourceInterface.php
@@ -0,0 +1,23 @@
+ $config Configuration array
*/
public function __construct(array $config)
@@ -368,6 +433,11 @@ public function __construct(array $config)
'scope' => null,
'additionalClaims' => [],
'codeVerifier' => null,
+ 'resource' => null,
+ 'subjectTokenFetcher' => null,
+ 'subjectTokenType' => null,
+ 'actorToken' => null,
+ 'actorTokenType' => null,
], $config);
$this->setAuthorizationUri($opts['authorizationUri']);
@@ -389,6 +459,14 @@ public function __construct(array $config)
$this->setExtensionParams($opts['extensionParams']);
$this->setAdditionalClaims($opts['additionalClaims']);
$this->setCodeVerifier($opts['codeVerifier']);
+
+ // for STS
+ $this->resource = $opts['resource'];
+ $this->subjectTokenFetcher = $opts['subjectTokenFetcher'];
+ $this->subjectTokenType = $opts['subjectTokenType'];
+ $this->actorToken = $opts['actorToken'];
+ $this->actorTokenType = $opts['actorTokenType'];
+
$this->updateToken($opts);
}
@@ -493,9 +571,10 @@ public function toJwt(array $config = [])
/**
* Generates a request for token credentials.
*
+ * @param callable $httpHandler callback which delivers psr7 request
* @return RequestInterface the authorization Url.
*/
- public function generateCredentialsRequest()
+ public function generateCredentialsRequest(callable $httpHandler = null)
{
$uri = $this->getTokenCredentialUri();
if (is_null($uri)) {
@@ -525,6 +604,19 @@ public function generateCredentialsRequest()
case self::JWT_URN:
$params['assertion'] = $this->toJwt();
break;
+ case self::STS_URN:
+ $token = $this->subjectTokenFetcher->fetchSubjectToken($httpHandler);
+ $params['subject_token'] = $token;
+ $params['subject_token_type'] = $this->subjectTokenType;
+ $params += array_filter([
+ 'resource' => $this->resource,
+ 'audience' => $this->audience,
+ 'scope' => $this->getScope(),
+ 'requested_token_type' => self::STS_REQUESTED_TOKEN_TYPE,
+ 'actor_token' => $this->actorToken,
+ 'actor_token_type' => $this->actorTokenType,
+ ]);
+ break;
default:
if (!is_null($this->getRedirectUri())) {
# Grant type was supposed to be 'authorization_code', as there
@@ -563,7 +655,7 @@ public function fetchAuthToken(callable $httpHandler = null)
$httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient());
}
- $response = $httpHandler($this->generateCredentialsRequest());
+ $response = $httpHandler($this->generateCredentialsRequest($httpHandler));
$credentials = $this->parseTokenResponse($response);
$this->updateToken($credentials);
if (isset($credentials['scope'])) {
@@ -685,6 +777,12 @@ public function updateToken(array $config)
if (array_key_exists('refresh_token', $opts)) {
$this->setRefreshToken($opts['refresh_token']);
}
+
+ // Required for STS response. An identifier for the representation of
+ // the issued security token.
+ if (array_key_exists('issued_token_type', $opts)) {
+ $this->issuedTokenType = $opts['issued_token_type'];
+ }
}
/**
@@ -965,6 +1063,10 @@ public function getGrantType()
return self::JWT_URN;
}
+ if (!is_null($this->subjectTokenFetcher) && !is_null($this->subjectTokenType)) {
+ return self::STS_URN;
+ }
+
return null;
}
@@ -1492,6 +1594,16 @@ public function getAdditionalClaims()
return $this->additionalClaims;
}
+ /**
+ * Gets the additional claims to be included in the JWT token.
+ *
+ * @return ?string
+ */
+ public function getIssuedTokenType()
+ {
+ return $this->issuedTokenType;
+ }
+
/**
* The expiration of the last received token.
*
@@ -1611,7 +1723,7 @@ private function getFirebaseJwtKeys($publicKey, $allowedAlgs)
$allowedAlg = null;
if (is_string($allowedAlgs)) {
- $allowedAlg = $allowedAlg;
+ $allowedAlg = $allowedAlgs;
} elseif (is_array($allowedAlgs)) {
if (count($allowedAlgs) > 1) {
throw new \InvalidArgumentException(
diff --git a/lib/Google/vendor/google/auth/src/UpdateMetadataTrait.php b/lib/Google/vendor/google/auth/src/UpdateMetadataTrait.php
new file mode 100644
index 000000000..fd33e0dca
--- /dev/null
+++ b/lib/Google/vendor/google/auth/src/UpdateMetadataTrait.php
@@ -0,0 +1,66 @@
+ $metadata metadata hashmap
+ * @param string $authUri optional auth uri
+ * @param callable $httpHandler callback which delivers psr7 request
+ * @return array updated metadata hashmap
+ */
+ public function updateMetadata(
+ $metadata,
+ $authUri = null,
+ callable $httpHandler = null
+ ) {
+ if (isset($metadata[self::AUTH_METADATA_KEY])) {
+ // Auth metadata has already been set
+ return $metadata;
+ }
+ $result = $this->fetchAuthToken($httpHandler);
+ $metadata_copy = $metadata;
+ if (isset($result['access_token'])) {
+ $metadata_copy[self::AUTH_METADATA_KEY] = ['Bearer ' . $result['access_token']];
+ } elseif (isset($result['id_token'])) {
+ $metadata_copy[self::AUTH_METADATA_KEY] = ['Bearer ' . $result['id_token']];
+ }
+ return $metadata_copy;
+ }
+}
diff --git a/lib/Google/vendor/google/cloud-core/.repo-metadata.json b/lib/Google/vendor/google/cloud-core/.repo-metadata.json
index 477240ca5..9f0a1e0ee 100644
--- a/lib/Google/vendor/google/cloud-core/.repo-metadata.json
+++ b/lib/Google/vendor/google/cloud-core/.repo-metadata.json
@@ -1,4 +1,5 @@
{
+ "language": "php",
"distribution_name": "google/cloud-core",
"release_level": "stable",
"client_documentation": "https://cloud.google.com/php/docs/reference/cloud-core/latest",
diff --git a/lib/Google/vendor/google/cloud-core/VERSION b/lib/Google/vendor/google/cloud-core/VERSION
index aa618f0d5..4b7e78db0 100644
--- a/lib/Google/vendor/google/cloud-core/VERSION
+++ b/lib/Google/vendor/google/cloud-core/VERSION
@@ -1 +1 @@
-1.51.2
+1.52.8
diff --git a/lib/Google/vendor/google/cloud-core/composer.json b/lib/Google/vendor/google/cloud-core/composer.json
index 1b1315be6..63aff87d1 100644
--- a/lib/Google/vendor/google/cloud-core/composer.json
+++ b/lib/Google/vendor/google/cloud-core/composer.json
@@ -7,11 +7,11 @@
"php": ">=7.4",
"rize/uri-template": "~0.3",
"google/auth": "^1.18",
- "guzzlehttp/guzzle": "^5.3|^6.5.7|^7.4.4",
- "guzzlehttp/promises": "^1.3",
+ "guzzlehttp/guzzle": "^6.5.8|^7.4.4",
+ "guzzlehttp/promises": "^1.4||^2.0",
"guzzlehttp/psr7": "^1.7|^2.0",
"monolog/monolog": "^1.1|^2.0|^3.0",
- "psr/http-message": "^1.0"
+ "psr/http-message": "^1.0|^2.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
@@ -19,7 +19,7 @@
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"erusev/parsedown": "^1.6",
- "google/gax": "^1.9",
+ "google/gax": "^1.24.0",
"opis/closure": "^3",
"google/cloud-common-protos": "^0.4"
},
diff --git a/lib/Google/vendor/google/cloud-core/src/Batch/BatchTrait.php b/lib/Google/vendor/google/cloud-core/src/Batch/BatchTrait.php
index 2ba2d4208..3ac284cf1 100644
--- a/lib/Google/vendor/google/cloud-core/src/Batch/BatchTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/Batch/BatchTrait.php
@@ -161,7 +161,7 @@ abstract protected function getCallback();
* responsible for serializing closures used in the
* `$clientConfig`. This is especially important when using the
* batch daemon. **Defaults to**
- * {@see Google\Cloud\Core\Batch\OpisClosureSerializer} if the
+ * {@see \Google\Cloud\Core\Batch\OpisClosureSerializer} if the
* `opis/closure` library is installed.
* }
* @throws \InvalidArgumentException
diff --git a/lib/Google/vendor/google/cloud-core/src/Batch/HandleFailureTrait.php b/lib/Google/vendor/google/cloud-core/src/Batch/HandleFailureTrait.php
index 543bff705..32b467efd 100644
--- a/lib/Google/vendor/google/cloud-core/src/Batch/HandleFailureTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/Batch/HandleFailureTrait.php
@@ -88,7 +88,7 @@ public function handleFailure($idNum, array $items)
if ($this->failureFile) {
$fp = @fopen($this->failureFile, 'a');
- @fwrite($fp, serialize([$idNum => $items]) . PHP_EOL);
+ @fwrite($fp, json_encode(serialize([$idNum => $items])) . PHP_EOL);
@fclose($fp);
}
}
diff --git a/lib/Google/vendor/google/cloud-core/src/Batch/InMemoryConfigStorage.php b/lib/Google/vendor/google/cloud-core/src/Batch/InMemoryConfigStorage.php
index 941208c31..aa4a1b118 100644
--- a/lib/Google/vendor/google/cloud-core/src/Batch/InMemoryConfigStorage.php
+++ b/lib/Google/vendor/google/cloud-core/src/Batch/InMemoryConfigStorage.php
@@ -154,8 +154,9 @@ public function clear()
*
* We want to delay registering the shutdown function. The error
* reporter also registers a shutdown function and the order matters.
- * {@see Google\ErrorReporting\Bootstrap::init()}
- * {@see http://php.net/manual/en/function.register-shutdown-function.php}
+ *
+ * @see \Google\Cloud\ErrorReporting\Bootstrap::init()
+ * @see http://php.net/manual/en/function.register-shutdown-function.php
*
* @param mixed $item An item to submit.
* @param int $idNum A numeric id for the job.
diff --git a/lib/Google/vendor/google/cloud-core/src/Batch/InterruptTrait.php b/lib/Google/vendor/google/cloud-core/src/Batch/InterruptTrait.php
index ecc163492..dae64456f 100644
--- a/lib/Google/vendor/google/cloud-core/src/Batch/InterruptTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/Batch/InterruptTrait.php
@@ -40,7 +40,8 @@ private function setupSignalHandlers()
/**
* A signal handler for setting the terminate switch.
- * {@see http://php.net/manual/en/function.pcntl-signal.php}
+ *
+ * @see http://php.net/manual/en/function.pcntl-signal.php
*
* @param int $signo The received signal.
* @param mixed $siginfo [optional] An array representing the signal
diff --git a/lib/Google/vendor/google/cloud-core/src/Batch/QueueOverflowException.php b/lib/Google/vendor/google/cloud-core/src/Batch/QueueOverflowException.php
index 8359b0234..8424daa53 100644
--- a/lib/Google/vendor/google/cloud-core/src/Batch/QueueOverflowException.php
+++ b/lib/Google/vendor/google/cloud-core/src/Batch/QueueOverflowException.php
@@ -18,7 +18,7 @@
namespace Google\Cloud\Core\Batch;
/**
- * Exception thrown in {@see Google\Cloud\Core\Batch\SysvProcessor::submit()}
+ * Exception thrown in {@see \Google\Cloud\Core\Batch\SysvProcessor::submit()}
* method when it cannot add an item to the message queue.
* Possible causes include:
*
diff --git a/lib/Google/vendor/google/cloud-core/src/Batch/Retry.php b/lib/Google/vendor/google/cloud-core/src/Batch/Retry.php
index 4b0941fcb..483c7eb3d 100644
--- a/lib/Google/vendor/google/cloud-core/src/Batch/Retry.php
+++ b/lib/Google/vendor/google/cloud-core/src/Batch/Retry.php
@@ -62,6 +62,11 @@ public function retryAll()
continue;
}
while ($line = fgets($fp)) {
+ $jsonDecodedValue = json_decode($line);
+ // Check if data json_encoded after serialization
+ if ($jsonDecodedValue !== null || $jsonDecodedValue !== false) {
+ $line = $jsonDecodedValue;
+ }
$a = unserialize($line);
$idNum = key($a);
$job = $this->runner->getJobFromIdNum($idNum);
diff --git a/lib/Google/vendor/google/cloud-core/src/Batch/SerializableClientTrait.php b/lib/Google/vendor/google/cloud-core/src/Batch/SerializableClientTrait.php
index fc2ca6017..60cd825be 100644
--- a/lib/Google/vendor/google/cloud-core/src/Batch/SerializableClientTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/Batch/SerializableClientTrait.php
@@ -48,7 +48,7 @@ trait SerializableClientTrait
* responsible for serializing closures used in the
* `$clientConfig`. This is especially important when using the
* batch daemon. **Defaults to**
- * {@see Google\Cloud\Core\Batch\OpisClosureSerializer} if the
+ * {@see \Google\Cloud\Core\Batch\OpisClosureSerializer} if the
* `opis/closure` library is installed.
* @type array $clientConfig A config used to construct the client upon
* which requests will be made.
diff --git a/lib/Google/vendor/google/cloud-core/src/Batch/SimpleJobTrait.php b/lib/Google/vendor/google/cloud-core/src/Batch/SimpleJobTrait.php
index 196e38fa2..bdf08669f 100644
--- a/lib/Google/vendor/google/cloud-core/src/Batch/SimpleJobTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/Batch/SimpleJobTrait.php
@@ -55,7 +55,7 @@ abstract public function run();
* responsible for serializing closures used in the
* `$clientConfig`. This is especially important when using the
* batch daemon. **Defaults to**
- * {@see Google\Cloud\Core\Batch\OpisClosureSerializer} if the
+ * {@see \Google\Cloud\Core\Batch\OpisClosureSerializer} if the
* `opis/closure` library is installed.
* }
*/
diff --git a/lib/Google/vendor/google/cloud-core/src/ExponentialBackoff.php b/lib/Google/vendor/google/cloud-core/src/ExponentialBackoff.php
index ab3a4116e..e5a041311 100644
--- a/lib/Google/vendor/google/cloud-core/src/ExponentialBackoff.php
+++ b/lib/Google/vendor/google/cloud-core/src/ExponentialBackoff.php
@@ -135,7 +135,7 @@ public function setDelayFunction(callable $delayFunction)
/**
* If not set, defaults to using
- * {@see Google\Cloud\Core\ExponentialBackoff::calculateDelay()}.
+ * {@see \Google\Cloud\Core\ExponentialBackoff::calculateDelay()}.
*
* @param callable $calcDelayFunction
* @return void
diff --git a/lib/Google/vendor/google/cloud-core/src/GrpcRequestWrapper.php b/lib/Google/vendor/google/cloud-core/src/GrpcRequestWrapper.php
index 847e43e7a..5a2735361 100644
--- a/lib/Google/vendor/google/cloud-core/src/GrpcRequestWrapper.php
+++ b/lib/Google/vendor/google/cloud-core/src/GrpcRequestWrapper.php
@@ -74,7 +74,7 @@ class GrpcRequestWrapper
/**
* @param array $config [optional] {
* Configuration options. Please see
- * {@see Google\Cloud\Core\RequestWrapperTrait::setCommonDefaults()} for
+ * {@see \Google\Cloud\Core\RequestWrapperTrait::setCommonDefaults()} for
* the other available options.
*
* @type callable $authHttpHandler A handler used to deliver Psr7
diff --git a/lib/Google/vendor/google/cloud-core/src/Iam/Iam.php b/lib/Google/vendor/google/cloud-core/src/Iam/Iam.php
index b83e747dc..1f8c08d53 100644
--- a/lib/Google/vendor/google/cloud-core/src/Iam/Iam.php
+++ b/lib/Google/vendor/google/cloud-core/src/Iam/Iam.php
@@ -23,7 +23,7 @@
* This class is not meant to be used directly. It should be accessed
* through other objects which support IAM.
*
- * Policies can be created using the {@see Google\Cloud\Core\Iam\PolicyBuilder}
+ * Policies can be created using the {@see \Google\Cloud\Core\Iam\PolicyBuilder}
* to help ensure their validity.
*
* Example:
@@ -98,7 +98,7 @@ public function __construct(IamConnectionInterface $connection, $resource, array
*
* If a policy has already been retrieved from the API, it will be returned.
* To fetch a fresh copy of the policy, use
- * {@see Google\Cloud\Core\Iam\Iam::reload()}.
+ * {@see \Google\Cloud\Core\Iam\Iam::reload()}.
*
* Example:
* ```
@@ -136,7 +136,7 @@ public function policy(array $options = [])
* ```
*
* @param array|PolicyBuilder $policy The new policy, as an array or an
- * instance of {@see Google\Cloud\Core\Iam\PolicyBuilder}.
+ * instance of {@see \Google\Cloud\Core\Iam\PolicyBuilder}.
* @param array $options Configuration Options
* @return array An array of policy data
* @throws \InvalidArgumentException If the given policy is not an array or PolicyBuilder.
diff --git a/lib/Google/vendor/google/cloud-core/src/LongRunning/LROTrait.php b/lib/Google/vendor/google/cloud-core/src/LongRunning/LROTrait.php
index d345699eb..477d5f3ea 100644
--- a/lib/Google/vendor/google/cloud-core/src/LongRunning/LROTrait.php
+++ b/lib/Google/vendor/google/cloud-core/src/LongRunning/LROTrait.php
@@ -30,6 +30,7 @@ trait LROTrait
{
/**
* @var LongRunningConnectionInterface
+ * @internal
*/
private $lroConnection;
@@ -47,6 +48,8 @@ trait LROTrait
* Populate required LRO properties.
*
* @param LongRunningConnectionInterface $lroConnection The LRO Connection.
+ * This object is created by internal classes,
+ * and should not be instantiated outside of this context.
* @param array $callablesMap An collection of form [(string) typeUrl, (callable) callable]
* providing a function to invoke when an operation completes. The
* callable Type should correspond to an expected value of
diff --git a/lib/Google/vendor/google/cloud-core/src/LongRunning/LongRunningConnectionInterface.php b/lib/Google/vendor/google/cloud-core/src/LongRunning/LongRunningConnectionInterface.php
index 9b35a5cce..df8c27b6e 100644
--- a/lib/Google/vendor/google/cloud-core/src/LongRunning/LongRunningConnectionInterface.php
+++ b/lib/Google/vendor/google/cloud-core/src/LongRunning/LongRunningConnectionInterface.php
@@ -21,6 +21,7 @@
* Defines the calls required to manage Long Running Operations.
*
* This interface should be implemented in a service's Connection namespace.
+ * @internal
*/
interface LongRunningConnectionInterface
{
diff --git a/lib/Google/vendor/google/cloud-core/src/LongRunning/LongRunningOperation.php b/lib/Google/vendor/google/cloud-core/src/LongRunning/LongRunningOperation.php
index 63732d91b..d0decd596 100644
--- a/lib/Google/vendor/google/cloud-core/src/LongRunning/LongRunningOperation.php
+++ b/lib/Google/vendor/google/cloud-core/src/LongRunning/LongRunningOperation.php
@@ -30,6 +30,7 @@ class LongRunningOperation
/**
* @var LongRunningConnectionInterface
+ * @internal
*/
private $connection;
@@ -61,6 +62,8 @@ class LongRunningOperation
/**
* @param LongRunningConnectionInterface $connection An implementation
* mapping to methods which handle LRO resolution in the service.
+ * This object is created by internal classes,
+ * and should not be instantiated outside of this context.
* @param string $name The Operation name.
* @param array $callablesMap An collection of form [(string) typeUrl, (callable) callable]
* providing a function to invoke when an operation completes. The
diff --git a/lib/Google/vendor/google/cloud-core/src/Report/EmptyMetadataProvider.php b/lib/Google/vendor/google/cloud-core/src/Report/EmptyMetadataProvider.php
index 50c07e92e..32ed9a859 100644
--- a/lib/Google/vendor/google/cloud-core/src/Report/EmptyMetadataProvider.php
+++ b/lib/Google/vendor/google/cloud-core/src/Report/EmptyMetadataProvider.php
@@ -25,7 +25,8 @@ class EmptyMetadataProvider implements MetadataProviderInterface
{
/**
* Return an array representing MonitoredResource.
- * {@see https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource}
+ *
+ * @see https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource
*
* @return array
*/
diff --git a/lib/Google/vendor/google/cloud-core/src/Report/GAEMetadataProvider.php b/lib/Google/vendor/google/cloud-core/src/Report/GAEMetadataProvider.php
index 3493f8b98..75caef7a5 100644
--- a/lib/Google/vendor/google/cloud-core/src/Report/GAEMetadataProvider.php
+++ b/lib/Google/vendor/google/cloud-core/src/Report/GAEMetadataProvider.php
@@ -59,7 +59,8 @@ public function __construct(array $server)
/**
* Return an array representing MonitoredResource.
- * {@see https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource}
+ *
+ * @see https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource
*
* @return array
*/
diff --git a/lib/Google/vendor/google/cloud-core/src/Report/MetadataProviderInterface.php b/lib/Google/vendor/google/cloud-core/src/Report/MetadataProviderInterface.php
index 9834fda0d..a1cb5f3b2 100644
--- a/lib/Google/vendor/google/cloud-core/src/Report/MetadataProviderInterface.php
+++ b/lib/Google/vendor/google/cloud-core/src/Report/MetadataProviderInterface.php
@@ -24,7 +24,8 @@ interface MetadataProviderInterface
{
/**
* Return an array representing MonitoredResource.
- * {@see https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource}
+ *
+ * @see https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource
*
* @return array
*/
diff --git a/lib/Google/vendor/google/cloud-core/src/Report/SimpleMetadataProvider.php b/lib/Google/vendor/google/cloud-core/src/Report/SimpleMetadataProvider.php
index 12b04679d..288c6886f 100644
--- a/lib/Google/vendor/google/cloud-core/src/Report/SimpleMetadataProvider.php
+++ b/lib/Google/vendor/google/cloud-core/src/Report/SimpleMetadataProvider.php
@@ -49,7 +49,8 @@ public function __construct(
/**
* Return an array representing MonitoredResource.
- * {@see https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource}
+ *
+ * @see https://cloud.google.com/logging/docs/reference/v2/rest/v2/MonitoredResource
*
* @return array
*/
diff --git a/lib/Google/vendor/google/cloud-core/src/RequestWrapper.php b/lib/Google/vendor/google/cloud-core/src/RequestWrapper.php
index 4b28b58e8..f45e7a7a5 100644
--- a/lib/Google/vendor/google/cloud-core/src/RequestWrapper.php
+++ b/lib/Google/vendor/google/cloud-core/src/RequestWrapper.php
@@ -95,12 +95,13 @@ class RequestWrapper
/**
* @param array $config [optional] {
* Configuration options. Please see
- * {@see Google\Cloud\Core\RequestWrapperTrait::setCommonDefaults()} for
+ * {@see \Google\Cloud\Core\RequestWrapperTrait::setCommonDefaults()} for
* the other available options.
*
* @type string $componentVersion The current version of the component from
* which the request originated.
* @type string $accessToken Access token used to sign requests.
+ * Deprecated: This option is no longer supported. Use the `$credentialsFetcher` option instead.
* @type callable $asyncHttpHandler *Experimental* A handler used to
* deliver PSR-7 requests asynchronously. Function signature should match:
* `function (RequestInterface $request, array $options = []) : PromiseInterface`.
diff --git a/lib/Google/vendor/google/cloud-core/src/Retry.php b/lib/Google/vendor/google/cloud-core/src/Retry.php
index c2fd34fea..67b6000b4 100644
--- a/lib/Google/vendor/google/cloud-core/src/Retry.php
+++ b/lib/Google/vendor/google/cloud-core/src/Retry.php
@@ -20,7 +20,7 @@
/**
* Retry implementation.
*
- * Unlike {@see Google\Cloud\Core\ExponentialBackoff}, Retry requires an implementor
+ * Unlike {@see \Google\Cloud\Core\ExponentialBackoff}, Retry requires an implementor
* to supply wait times for each iteration.
*/
class Retry
diff --git a/lib/Google/vendor/google/cloud-core/src/ServiceBuilder.php b/lib/Google/vendor/google/cloud-core/src/ServiceBuilder.php
index 3214c5e24..b174df812 100644
--- a/lib/Google/vendor/google/cloud-core/src/ServiceBuilder.php
+++ b/lib/Google/vendor/google/cloud-core/src/ServiceBuilder.php
@@ -110,10 +110,10 @@ public function __construct(array $config = [])
*
* @param array $config [optional] {
* Configuration options. See
- * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
+ * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
*
* @type bool $returnInt64AsObject If true, 64 bit integers will be
- * returned as a {@see Google\Cloud\Core\Int64} object for 32 bit
+ * returned as a {@see \Google\Cloud\Core\Int64} object for 32 bit
* platform compatibility. **Defaults to** false.
* @type string $location If provided, determines the default geographic
* location used when creating datasets and managing jobs. Please
@@ -141,10 +141,10 @@ public function bigQuery(array $config = [])
*
* @param array $config [optional] {
* Configuration options. See
- * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
+ * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
*
* @type bool $returnInt64AsObject If true, 64 bit integers will be
- * returned as a {@see Google\Cloud\Core\Int64} object for 32 bit
+ * returned as a {@see \Google\Cloud\Core\Int64} object for 32 bit
* platform compatibility. **Defaults to** false.
* @return DatastoreClient
*/
@@ -165,10 +165,10 @@ public function datastore(array $config = [])
*
* @param array $config [optional] {
* Configuration options. See
- * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
+ * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
*
* @type bool $returnInt64AsObject If true, 64 bit integers will be
- * returned as a {@see Google\Cloud\Core\Int64} object for 32 bit
+ * returned as a {@see \Google\Cloud\Core\Int64} object for 32 bit
* platform compatibility. **Defaults to** false.
* @return FirestoreClient
*/
@@ -189,7 +189,7 @@ public function firestore(array $config = [])
* ```
*
* @param array $config [optional] Configuration options. See
- * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the available options.
+ * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the available options.
* @return LoggingClient
*/
public function logging(array $config = [])
@@ -210,7 +210,7 @@ public function logging(array $config = [])
* ```
*
* @param array $config [optional] Configuration options. See
- * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the available options.
+ * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the available options.
* @return LanguageClient
*/
public function language(array $config = [])
@@ -230,7 +230,7 @@ public function language(array $config = [])
*
* @param array $config [optional] {
* Configuration options. See
- * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
+ * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
*
* @type string $transport The transport type used for requests. May be
* either `grpc` or `rest`. **Defaults to** `grpc` if gRPC support
@@ -254,10 +254,10 @@ public function pubsub(array $config = [])
*
* @param array $config [optional] {
* Configuration options. See
- * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
+ * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
*
* @type bool $returnInt64AsObject If true, 64 bit integers will be
- * returned as a {@see Google\Cloud\Core\Int64} object for 32 bit
+ * returned as a {@see \Google\Cloud\Core\Int64} object for 32 bit
* platform compatibility. **Defaults to** false.
* }
* @return SpannerClient
@@ -282,7 +282,7 @@ public function spanner(array $config = [])
*
* @param array $config [optional] {
* Configuration options. See
- * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
+ * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
*
* @type string $languageCode The language of the content to
* be recognized. Only BCP-47 (e.g., `"en-US"`, `"es-ES"`)
@@ -307,7 +307,7 @@ public function speech(array $config = [])
* ```
*
* @param array $config [optional] Configuration options. See
- * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the available options.
+ * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the available options.
* @return StorageClient
*/
public function storage(array $config = [])
@@ -327,7 +327,7 @@ public function storage(array $config = [])
* ```
*
* @param array $config [optional] Configuration options. See
- * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the available options.
+ * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the available options.
* @return TraceClient
*/
public function trace(array $config = [])
@@ -347,7 +347,7 @@ public function trace(array $config = [])
* ```
*
* @param array $config [optional] Configuration options. See
- * {@see Google\Cloud\Core\ServiceBuilder::__construct()} for the available options.
+ * {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the available options.
* @return VisionClient
*/
public function vision(array $config = [])
diff --git a/lib/Google/vendor/google/cloud-core/src/Testing/TestHelpers.php b/lib/Google/vendor/google/cloud-core/src/Testing/TestHelpers.php
index c8e20d45f..3e6c39772 100644
--- a/lib/Google/vendor/google/cloud-core/src/Testing/TestHelpers.php
+++ b/lib/Google/vendor/google/cloud-core/src/Testing/TestHelpers.php
@@ -131,7 +131,7 @@ public static function snippetBootstrap()
*/
public static function perfBootstrap()
{
- $bootstraps = glob(self::projectRoot() .'/*/tests/Perf/bootstrap.php');
+ $bootstraps = glob(self::projectRoot() .'/*tests/Perf/bootstrap.php');
foreach ($bootstraps as $bootstrap) {
require_once $bootstrap;
}
@@ -186,7 +186,7 @@ public static function systemBootstrap()
SystemTestCase::setupQueue();
- $bootstraps = glob(self::projectRoot() .'/*/tests/System/bootstrap.php');
+ $bootstraps = glob(self::projectRoot() .'/*tests/System/bootstrap.php');
foreach ($bootstraps as $bootstrap) {
require_once $bootstrap;
}
diff --git a/lib/Google/vendor/google/cloud-core/src/Upload/ResumableUploader.php b/lib/Google/vendor/google/cloud-core/src/Upload/ResumableUploader.php
index b47fbc2bb..6e61546fe 100644
--- a/lib/Google/vendor/google/cloud-core/src/Upload/ResumableUploader.php
+++ b/lib/Google/vendor/google/cloud-core/src/Upload/ResumableUploader.php
@@ -52,8 +52,8 @@ class ResumableUploader extends AbstractUploader
/**
* Classes extending ResumableUploader may provide request headers to be
- * included in {@see Google\Cloud\Core\Upload\ResumableUploader::upload()}
- * and {@see Google\Cloud\Core\Upload\ResumableUploader::createResumeUri{}}.
+ * included in {@see \Google\Cloud\Core\Upload\ResumableUploader::upload()}
+ * and {@see \Google\Cloud\Core\Upload\ResumableUploader::createResumeUri{}}.
*
* @var array
*/
@@ -142,7 +142,7 @@ public function resume($resumeUri)
* Triggers the upload process.
*
* Errors are of form [`google.rpc.Status`](https://cloud.google.com/apis/design/errors#error_model),
- * and may be obtained via {@see Google\Cloud\Core\Exception\ServiceException::getMetadata()}.
+ * and may be obtained via {@see \Google\Cloud\Core\Exception\ServiceException::getMetadata()}.
*
* @return array
* @throws ServiceException
diff --git a/lib/Google/vendor/google/cloud-storage/.repo-metadata.json b/lib/Google/vendor/google/cloud-storage/.repo-metadata.json
index cfa4cf227..cec1634b2 100644
--- a/lib/Google/vendor/google/cloud-storage/.repo-metadata.json
+++ b/lib/Google/vendor/google/cloud-storage/.repo-metadata.json
@@ -1,4 +1,5 @@
{
+ "language": "php",
"distribution_name": "google/cloud-storage",
"release_level": "stable",
"client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storage/latest",
diff --git a/lib/Google/vendor/google/cloud-storage/VERSION b/lib/Google/vendor/google/cloud-storage/VERSION
index 3492b09b4..2b17ffd50 100644
--- a/lib/Google/vendor/google/cloud-storage/VERSION
+++ b/lib/Google/vendor/google/cloud-storage/VERSION
@@ -1 +1 @@
-1.31.2
+1.34.0
diff --git a/lib/Google/vendor/google/cloud-storage/composer.json b/lib/Google/vendor/google/cloud-storage/composer.json
index 703df7e52..a5d1195db 100644
--- a/lib/Google/vendor/google/cloud-storage/composer.json
+++ b/lib/Google/vendor/google/cloud-storage/composer.json
@@ -5,8 +5,7 @@
"minimum-stability": "stable",
"require": {
"php": ">=7.4",
- "google/cloud-core": "^1.51.1",
- "google/crc32": "^0.2.0",
+ "google/cloud-core": "^1.52.7",
"ramsey/uuid": "^4.2.3"
},
"require-dev": {
diff --git a/lib/Google/vendor/google/cloud-storage/src/Acl.php b/lib/Google/vendor/google/cloud-storage/src/Acl.php
index 8cfae7213..c7f19f6d8 100644
--- a/lib/Google/vendor/google/cloud-storage/src/Acl.php
+++ b/lib/Google/vendor/google/cloud-storage/src/Acl.php
@@ -45,6 +45,7 @@ class Acl
/**
* @var ConnectionInterface Represents a connection to Cloud Storage.
+ * @internal
*/
protected $connection;
@@ -55,7 +56,8 @@ class Acl
/**
* @param ConnectionInterface $connection Represents a connection to
- * Cloud Storage.
+ * Cloud Storage. This object is created by StorageClient,
+ * and should not be instantiated outside of this client.
* @param string $type The type of access control this instance applies to.
* @param array $identity Represents which bucket, file, or generation this
* instance applies to.
@@ -78,8 +80,10 @@ public function __construct(ConnectionInterface $connection, $type, array $ident
}
/**
- * Delete access controls on a {@see Google\Cloud\Storage\Bucket} or
- * {@see Google\Cloud\Storage\StorageObject} for a specified entity.
+ * Delete access controls.
+ *
+ * Delete access controls on a {@see Bucket} or
+ * {@see StorageObject} for a specified entity.
*
* Example:
* ```
@@ -104,8 +108,10 @@ public function delete($entity, array $options = [])
}
/**
- * Get access controls on a {@see Google\Cloud\Storage\Bucket} or
- * {@see Google\Cloud\Storage\StorageObject}. By default this will return all available
+ * Get access controls.
+ *
+ * Get access controls on a {@see Bucket} or
+ * {@see StorageObject}. By default this will return all available
* access controls. You may optionally specify a single entity to return
* details for as well.
*
@@ -139,8 +145,10 @@ public function get(array $options = [])
}
/**
- * Add access controls on a {@see Google\Cloud\Storage\Bucket} or
- * {@see Google\Cloud\Storage\StorageObject}.
+ * Add access controls.
+ *
+ * Add access controls on a {@see Bucket} or
+ * {@see StorageObject}.
*
* Example:
* ```
@@ -171,8 +179,9 @@ public function add($entity, $role, array $options = [])
}
/**
- * Update access controls on a {@see Google\Cloud\Storage\Bucket} or
- * {@see Google\Cloud\Storage\StorageObject}.
+ * Update access controls.
+ *
+ * Update access controls on a {@see Bucket} or {@see StorageObject}.
*
* Example:
* ```
diff --git a/lib/Google/vendor/google/cloud-storage/src/Bucket.php b/lib/Google/vendor/google/cloud-storage/src/Bucket.php
index abad33b77..68279fb11 100644
--- a/lib/Google/vendor/google/cloud-storage/src/Bucket.php
+++ b/lib/Google/vendor/google/cloud-storage/src/Bucket.php
@@ -65,6 +65,7 @@ class Bucket
/**
* @var ConnectionInterface Represents a connection to Cloud Storage.
+ * @internal
*/
private $connection;
@@ -95,7 +96,8 @@ class Bucket
/**
* @param ConnectionInterface $connection Represents a connection to Cloud
- * Storage.
+ * Storage. This object is created by StorageClient,
+ * and should not be instantiated outside of this client.
* @param string $name The bucket's name.
* @param array $info [optional] The bucket's metadata.
*/
@@ -564,8 +566,10 @@ public function getStreamableUploader($data, array $options = [])
/**
* Lazily instantiates an object. There are no network requests made at this
- * point. To see the operations that can be performed on an object please
- * see {@see Google\Cloud\Storage\StorageObject}.
+ * point.
+ *
+ * To see the operations that can be performed on an object please
+ * see {@see StorageObject}.
*
* Example:
* ```
@@ -647,6 +651,9 @@ public function object($name, array $options = [])
* distinct results. **Defaults to** `false`.
* @type string $fields Selector which will cause the response to only
* return the specified fields.
+ * @type string $matchGlob A glob pattern to filter results. The string
+ * value must be UTF-8 encoded. See:
+ * https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-object-glob
* }
* @return ObjectIterator
*/
@@ -756,7 +763,7 @@ function (array $object) {
* }
* @return Notification
* @throws \InvalidArgumentException When providing a type other than string
- * or {@see Google\Cloud\PubSub\Topic} as $topic.
+ * or {@see \Google\Cloud\PubSub\Topic} as $topic.
* @throws GoogleException When a project ID has not been detected.
* @experimental The experimental flag means that while we believe this
* method or class is ready for use, it may change before release in
@@ -782,8 +789,10 @@ public function createNotification($topic, array $options = [])
/**
* Lazily instantiates a notification. There are no network requests made at
- * this point. To see the operations that can be performed on a notification
- * please see {@see Google\Cloud\Storage\Notification}.
+ * this point.
+ *
+ * To see the operations that can be performed on a notification
+ * please see {@see Notification}.
*
* Example:
* ```
@@ -948,6 +957,8 @@ public function delete(array $options = [])
* Buckets can have either StorageClass OLM rules or Autoclass,
* but not both. When Autoclass is enabled on a bucket, adding
* StorageClass OLM rules will result in failure.
+ * For more information, refer to
+ * [Storage Autoclass](https://cloud.google.com/storage/docs/autoclass)
* @type array $versioning The bucket's versioning configuration.
* @type array $website The bucket's website configuration.
* @type array $billing The bucket's billing configuration.
@@ -970,7 +981,7 @@ public function delete(array $options = [])
* occurs, signified by the hold's release.
* @type array $retentionPolicy Defines the retention policy for a
* bucket. In order to lock a retention policy, please see
- * {@see Google\Cloud\Storage\Bucket::lockRetentionPolicy()}.
+ * {@see Bucket::lockRetentionPolicy()}.
* @type int $retentionPolicy.retentionPeriod Specifies the duration
* that objects need to be retained, in seconds. Retention
* duration must be greater than zero and less than 100 years.
@@ -1182,8 +1193,8 @@ public function name()
* replace the configuration with the rules provided by this builder.
*
* This builder is intended to be used in tandem with
- * {@see Google\Cloud\Storage\StorageClient::createBucket()} and
- * {@see Google\Cloud\Storage\Bucket::update()}.
+ * {@see StorageClient::createBucket()} and
+ * {@see Bucket::update()}.
*
* Example:
* ```
@@ -1213,13 +1224,15 @@ public static function lifecycle(array $lifecycle = [])
/**
* Retrieves a lifecycle builder preconfigured with the lifecycle rules that
- * already exists on the bucket. Use this if you want to make updates to an
+ * already exists on the bucket.
+ *
+ * Use this if you want to make updates to an
* existing configuration without removing existing rules, as would be the
- * case when using {@see Google\Cloud\Storage\Bucket::lifecycle()}.
+ * case when using {@see Bucket::lifecycle()}.
*
* This builder is intended to be used in tandem with
- * {@see Google\Cloud\Storage\StorageClient::createBucket()} and
- * {@see Google\Cloud\Storage\Bucket::update()}.
+ * {@see StorageClient::createBucket()} and
+ * {@see Bucket::update()}.
*
* Please note, this method may trigger a network request in order to fetch
* the existing lifecycle rules from the server.
@@ -1341,8 +1354,8 @@ public function iam()
* metageneration value will need to be available. It can either be supplied
* explicitly through the `ifMetagenerationMatch` option or detected for you
* by ensuring a value is cached locally (by calling
- * {@see Google\Cloud\Storage\Bucket::reload()} or
- * {@see Google\Cloud\Storage\Bucket::info()}, for example).
+ * {@see Bucket::reload()} or
+ * {@see Bucket::info()}, for example).
*
* Example:
* ```
@@ -1414,7 +1427,7 @@ public function lockRetentionPolicy(array $options = [])
* @see https://cloud.google.com/storage/docs/access-control/signed-urls Signed URLs
*
* @param Timestamp|\DateTimeInterface|int $expires Specifies when the URL
- * will expire. May provide an instance of {@see Google\Cloud\Core\Timestamp},
+ * will expire. May provide an instance of {@see \Google\Cloud\Core\Timestamp},
* [http://php.net/datetimeimmutable](`\DateTimeImmutable`), or a
* UNIX timestamp as an integer.
* @param array $options {
@@ -1520,7 +1533,7 @@ public function signedUrl($expires, array $options = [])
* @param string $objectName The path to the file in Google Cloud Storage,
* relative to the bucket.
* @param Timestamp|\DateTimeInterface|int $expires Specifies when the URL
- * will expire. May provide an instance of {@see Google\Cloud\Core\Timestamp},
+ * will expire. May provide an instance of {@see \Google\Cloud\Core\Timestamp},
* [http://php.net/datetimeimmutable](`\DateTimeImmutable`), or a
* UNIX timestamp as an integer.
* @param array $options [optional] {
diff --git a/lib/Google/vendor/google/cloud-storage/src/Connection/ConnectionInterface.php b/lib/Google/vendor/google/cloud-storage/src/Connection/ConnectionInterface.php
index 819597029..71df234e5 100644
--- a/lib/Google/vendor/google/cloud-storage/src/Connection/ConnectionInterface.php
+++ b/lib/Google/vendor/google/cloud-storage/src/Connection/ConnectionInterface.php
@@ -20,6 +20,8 @@
/**
* Represents a connection to
* [Cloud Storage](https://cloud.google.com/storage/).
+ *
+ * @internal
*/
interface ConnectionInterface
{
diff --git a/lib/Google/vendor/google/cloud-storage/src/Connection/IamBucket.php b/lib/Google/vendor/google/cloud-storage/src/Connection/IamBucket.php
index 4a1d2511c..084ced8f6 100644
--- a/lib/Google/vendor/google/cloud-storage/src/Connection/IamBucket.php
+++ b/lib/Google/vendor/google/cloud-storage/src/Connection/IamBucket.php
@@ -21,6 +21,8 @@
/**
* IAM Implementation for GCS Buckets
+ *
+ * @internal
*/
class IamBucket implements IamConnectionInterface
{
diff --git a/lib/Google/vendor/google/cloud-storage/src/Connection/Rest.php b/lib/Google/vendor/google/cloud-storage/src/Connection/Rest.php
index 4cab69fc6..b32ed878d 100644
--- a/lib/Google/vendor/google/cloud-storage/src/Connection/Rest.php
+++ b/lib/Google/vendor/google/cloud-storage/src/Connection/Rest.php
@@ -29,8 +29,6 @@
use Google\Cloud\Core\UriTrait;
use Google\Cloud\Storage\Connection\ConnectionInterface;
use Google\Cloud\Storage\StorageClient;
-use Google\CRC32\Builtin;
-use Google\CRC32\CRC32;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\MimeType;
use GuzzleHttp\Psr7\Request;
@@ -43,6 +41,8 @@
/**
* Implementation of the
* [Google Cloud Storage JSON API](https://cloud.google.com/storage/docs/json_api/).
+ *
+ * @internal
*/
class Rest implements ConnectionInterface
{
@@ -660,21 +660,15 @@ private function chooseValidationMethod(array $args)
private function crcFromStream(StreamInterface $data)
{
$pos = $data->tell();
-
- if ($pos > 0) {
- $data->rewind();
- }
-
- $crc32c = CRC32::create(CRC32::CASTAGNOLI);
-
$data->rewind();
+ $crc32c = hash_init('crc32c');
while (!$data->eof()) {
- $crc32c->update($data->read(1048576));
+ $buffer = $data->read(1048576);
+ hash_update($crc32c, $buffer);
}
-
$data->seek($pos);
-
- return base64_encode($crc32c->hash(true));
+ $hash = hash_final($crc32c, true);
+ return base64_encode($hash);
}
/**
@@ -692,13 +686,12 @@ protected function crc32cExtensionLoaded()
/**
* Check if hash() supports crc32c.
*
- * Protected access for unit testing.
- *
+ * @deprecated
* @return bool
*/
protected function supportsBuiltinCrc32c()
{
- return Builtin::supports(CRC32::CASTAGNOLI);
+ return extension_loaded('hash') && in_array('crc32c', hash_algos());
}
/**
diff --git a/lib/Google/vendor/google/cloud-storage/src/Connection/ServiceDefinition/storage-v1.json b/lib/Google/vendor/google/cloud-storage/src/Connection/ServiceDefinition/storage-v1.json
index f503978ce..f4a150b2f 100644
--- a/lib/Google/vendor/google/cloud-storage/src/Connection/ServiceDefinition/storage-v1.json
+++ b/lib/Google/vendor/google/cloud-storage/src/Connection/ServiceDefinition/storage-v1.json
@@ -1,4278 +1,5077 @@
{
- "kind": "discovery#restDescription",
- "version": "v1",
- "id": "storage:v1",
- "rootUrl": "https://storage.googleapis.com/",
- "mtlsRootUrl": "https://storage.mtls.googleapis.com/",
- "baseUrl": "https://storage.googleapis.com/storage/v1/",
- "basePath": "/storage/v1/",
- "servicePath": "storage/v1/",
- "batchPath": "batch/storage/v1",
- "discoveryVersion": "v1",
- "name": "storage",
- "title": "Cloud Storage JSON API",
- "description": "Stores and retrieves potentially large, immutable data objects.",
- "ownerDomain": "google.com",
- "ownerName": "Google",
- "icons": {
- "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
- "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
+ "kind": "discovery#restDescription",
+ "version": "v1",
+ "id": "storage:v1",
+ "rootUrl": "https://storage.googleapis.com/",
+ "mtlsRootUrl": "https://storage.mtls.googleapis.com/",
+ "baseUrl": "https://storage.googleapis.com/storage/v1/",
+ "basePath": "/storage/v1/",
+ "servicePath": "storage/v1/",
+ "batchPath": "batch/storage/v1",
+ "discoveryVersion": "v1",
+ "name": "storage",
+ "title": "Cloud Storage JSON API",
+ "description": "Stores and retrieves potentially large, immutable data objects.",
+ "ownerDomain": "google.com",
+ "ownerName": "Google",
+ "icons": {
+ "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
+ "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
+ },
+ "documentationLink": "https://developers.google.com/storage/docs/json_api/",
+ "labels": [
+ "labs"
+ ],
+ "protocol": "rest",
+ "parameters": {
+ "alt": {
+ "type": "string",
+ "description": "Data format for the response.",
+ "default": "json",
+ "enum": [
+ "json"
+ ],
+ "enumDescriptions": [
+ "Responses with Content-Type of application/json"
+ ],
+ "location": "query"
},
- "documentationLink": "https://developers.google.com/storage/docs/json_api/",
- "labels": [
- "labs"
- ],
- "protocol": "rest",
- "parameters": {
- "alt": {
- "type": "string",
- "description": "Data format for the response.",
- "default": "json",
- "enum": [
- "json"
- ],
- "enumDescriptions": [
- "Responses with Content-Type of application/json"
- ],
- "location": "query"
- },
- "fields": {
- "type": "string",
- "description": "Selector specifying which fields to include in a partial response.",
- "location": "query"
- },
- "key": {
- "type": "string",
- "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
- "location": "query"
- },
- "oauth_token": {
- "type": "string",
- "description": "OAuth 2.0 token for the current user.",
- "location": "query"
- },
- "prettyPrint": {
- "type": "boolean",
- "description": "Returns response with indentations and line breaks.",
- "default": "true",
- "location": "query"
- },
- "quotaUser": {
- "type": "string",
- "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
- "location": "query"
- },
- "userIp": {
- "type": "string",
- "description": "Deprecated. Please use quotaUser instead.",
- "location": "query"
+ "fields": {
+ "type": "string",
+ "description": "Selector specifying which fields to include in a partial response.",
+ "location": "query"
+ },
+ "key": {
+ "type": "string",
+ "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
+ "location": "query"
+ },
+ "oauth_token": {
+ "type": "string",
+ "description": "OAuth 2.0 token for the current user.",
+ "location": "query"
+ },
+ "prettyPrint": {
+ "type": "boolean",
+ "description": "Returns response with indentations and line breaks.",
+ "default": "true",
+ "location": "query"
+ },
+ "quotaUser": {
+ "type": "string",
+ "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.",
+ "location": "query"
+ },
+ "userIp": {
+ "type": "string",
+ "description": "Deprecated. Please use quotaUser instead.",
+ "location": "query"
},
"uploadType": {
- "type": "string",
- "description": "Upload protocol for media (e.g. \"media\", \"multipart\", \"resumable\").",
- "location": "query"
+ "type": "string",
+ "description": "Upload protocol for media (e.g. \"media\", \"multipart\", \"resumable\").",
+ "location": "query"
+ }
+ },
+ "auth": {
+ "oauth2": {
+ "scopes": {
+ "https://www.googleapis.com/auth/cloud-platform": {
+ "description": "View and manage your data across Google Cloud Platform services"
+ },
+ "https://www.googleapis.com/auth/cloud-platform.read-only": {
+ "description": "View your data across Google Cloud Platform services"
+ },
+ "https://www.googleapis.com/auth/devstorage.full_control": {
+ "description": "Manage your data and permissions in Google Cloud Storage"
+ },
+ "https://www.googleapis.com/auth/devstorage.read_only": {
+ "description": "View your data in Google Cloud Storage"
+ },
+ "https://www.googleapis.com/auth/devstorage.read_write": {
+ "description": "Manage your data in Google Cloud Storage"
+ }
}
- },
- "auth": {
- "oauth2": {
- "scopes": {
- "https://www.googleapis.com/auth/cloud-platform": {
- "description": "View and manage your data across Google Cloud Platform services"
- },
- "https://www.googleapis.com/auth/cloud-platform.read-only": {
- "description": "View your data across Google Cloud Platform services"
- },
- "https://www.googleapis.com/auth/devstorage.full_control": {
- "description": "Manage your data and permissions in Google Cloud Storage"
- },
- "https://www.googleapis.com/auth/devstorage.read_only": {
- "description": "View your data in Google Cloud Storage"
+ }
+ },
+ "schemas": {
+ "Bucket": {
+ "id": "Bucket",
+ "type": "object",
+ "description": "A bucket.",
+ "properties": {
+ "acl": {
+ "type": "array",
+ "description": "Access controls on the bucket.",
+ "items": {
+ "$ref": "BucketAccessControl"
},
- "https://www.googleapis.com/auth/devstorage.read_write": {
- "description": "Manage your data in Google Cloud Storage"
+ "annotations": {
+ "required": [
+ "storage.buckets.update"
+ ]
}
- }
- }
- },
- "schemas": {
- "Bucket": {
- "id": "Bucket",
- "type": "object",
- "description": "A bucket.",
- "properties": {
- "acl": {
- "type": "array",
- "description": "Access controls on the bucket.",
- "items": {
- "$ref": "BucketAccessControl"
- },
- "annotations": {
- "required": [
- "storage.buckets.update"
- ]
+ },
+ "billing": {
+ "type": "object",
+ "description": "The bucket's billing configuration.",
+ "properties": {
+ "requesterPays": {
+ "type": "boolean",
+ "description": "When set to true, Requester Pays is enabled for this bucket."
}
- },
- "billing": {
+ }
+ },
+ "cors": {
+ "type": "array",
+ "description": "The bucket's Cross-Origin Resource Sharing (CORS) configuration.",
+ "items": {
"type": "object",
- "description": "The bucket's billing configuration.",
"properties": {
- "requesterPays": {
- "type": "boolean",
- "description": "When set to true, Requester Pays is enabled for this bucket."
+ "maxAgeSeconds": {
+ "type": "integer",
+ "description": "The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.",
+ "format": "int32"
+ },
+ "method": {
+ "type": "array",
+ "description": "The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: \"*\" is permitted in the list of methods, and means \"any method\".",
+ "items": {
+ "type": "string"
+ }
+ },
+ "origin": {
+ "type": "array",
+ "description": "The list of Origins eligible to receive CORS response headers. Note: \"*\" is permitted in the list of origins, and means \"any Origin\".",
+ "items": {
+ "type": "string"
+ }
+ },
+ "responseHeader": {
+ "type": "array",
+ "description": "The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.",
+ "items": {
+ "type": "string"
+ }
}
}
- },
- "cors": {
- "type": "array",
- "description": "The bucket's Cross-Origin Resource Sharing (CORS) configuration.",
- "items": {
+ }
+ },
+ "customPlacementConfig": {
+ "type": "object",
+ "description": "The bucket's custom placement configuration for Custom Dual Regions.",
+ "properties": {
+ "dataLocations": {
+ "type": "array",
+ "description": "The list of regional locations in which data is placed.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "defaultEventBasedHold": {
+ "type": "boolean",
+ "description": "The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed."
+ },
+ "defaultObjectAcl": {
+ "type": "array",
+ "description": "Default access controls to apply to new objects when no ACL is provided.",
+ "items": {
+ "$ref": "ObjectAccessControl"
+ }
+ },
+ "encryption": {
+ "type": "object",
+ "description": "Encryption configuration for a bucket.",
+ "properties": {
+ "defaultKmsKeyName": {
+ "type": "string",
+ "description": "A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified."
+ }
+ }
+ },
+ "etag": {
+ "type": "string",
+ "description": "HTTP 1.1 Entity tag for the bucket."
+ },
+ "iamConfiguration": {
+ "type": "object",
+ "description": "The bucket's IAM configuration.",
+ "properties": {
+ "bucketPolicyOnly": {
"type": "object",
+ "description": "The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature.",
"properties": {
- "maxAgeSeconds": {
- "type": "integer",
- "description": "The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.",
- "format": "int32"
- },
- "method": {
- "type": "array",
- "description": "The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: \"*\" is permitted in the list of methods, and means \"any method\".",
- "items": {
- "type": "string"
- }
- },
- "origin": {
- "type": "array",
- "description": "The list of Origins eligible to receive CORS response headers. Note: \"*\" is permitted in the list of origins, and means \"any Origin\".",
- "items": {
- "type": "string"
- }
+ "enabled": {
+ "type": "boolean",
+ "description": "If set, access is controlled only by bucket-level or above IAM policies."
},
- "responseHeader": {
- "type": "array",
- "description": "The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.",
- "items": {
- "type": "string"
- }
+ "lockedTime": {
+ "type": "string",
+ "description": "The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable.",
+ "format": "date-time"
}
}
- }
- },
- "customPlacementConfig": {
- "type": "object",
- "description": "The bucket's custom placement configuration for Custom Dual Regions.",
- "properties": {
- "dataLocations": {
- "type": "array",
- "description": "The list of regional locations in which data is placed.",
- "items": {
- "type": "string"
- }
+ },
+ "uniformBucketLevelAccess": {
+ "type": "object",
+ "description": "The bucket's uniform bucket-level access configuration.",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "If set, access is controlled only by bucket-level or above IAM policies."
+ },
+ "lockedTime": {
+ "type": "string",
+ "description": "The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable.",
+ "format": "date-time"
}
- }
- },
- "defaultEventBasedHold": {
- "type": "boolean",
- "description": "The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed."
- },
- "defaultObjectAcl": {
- "type": "array",
- "description": "Default access controls to apply to new objects when no ACL is provided.",
- "items": {
- "$ref": "ObjectAccessControl"
- }
- },
- "encryption": {
- "type": "object",
- "description": "Encryption configuration for a bucket.",
- "properties": {
- "defaultKmsKeyName": {
- "type": "string",
- "description": "A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified."
}
+ },
+ "publicAccessPrevention": {
+ "type": "string",
+ "description": "The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported."
}
- },
- "etag": {
+ }
+ },
+ "id": {
+ "type": "string",
+ "description": "The ID of the bucket. For buckets, the id and name properties are the same."
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For buckets, this is always storage#bucket.",
+ "default": "storage#bucket"
+ },
+ "labels": {
+ "type": "object",
+ "description": "User-provided labels, in key/value pairs.",
+ "additionalProperties": {
"type": "string",
- "description": "HTTP 1.1 Entity tag for the bucket."
- },
- "iamConfiguration": {
- "type": "object",
- "description": "The bucket's IAM configuration.",
- "properties": {
- "bucketPolicyOnly": {
- "type": "object",
- "description": "The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature.",
- "properties": {
- "enabled": {
- "type": "boolean",
- "description": "If set, access is controlled only by bucket-level or above IAM policies."
- },
- "lockedTime": {
- "type": "string",
- "description": "The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable.",
- "format": "date-time"
- }
- }
- },
- "uniformBucketLevelAccess": {
+ "description": "An individual label entry."
+ }
+ },
+ "lifecycle": {
+ "type": "object",
+ "description": "The bucket's lifecycle configuration. See lifecycle management for more information.",
+ "properties": {
+ "rule": {
+ "type": "array",
+ "description": "A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken.",
+ "items": {
"type": "object",
- "description": "The bucket's uniform bucket-level access configuration.",
"properties": {
- "enabled": {
- "type": "boolean",
- "description": "If set, access is controlled only by bucket-level or above IAM policies."
- },
- "lockedTime": {
- "type": "string",
- "description": "The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable.",
- "format": "date-time"
- }
- }
- },
- "publicAccessPrevention": {
- "type": "string",
- "description": "The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported."
- }
- }
- },
- "id": {
- "type": "string",
- "description": "The ID of the bucket. For buckets, the id and name properties are the same."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For buckets, this is always storage#bucket.",
- "default": "storage#bucket"
- },
- "labels": {
- "type": "object",
- "description": "User-provided labels, in key/value pairs.",
- "additionalProperties": {
- "type": "string",
- "description": "An individual label entry."
- }
- },
- "lifecycle": {
- "type": "object",
- "description": "The bucket's lifecycle configuration. See lifecycle management for more information.",
- "properties": {
- "rule": {
- "type": "array",
- "description": "A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken.",
- "items": {
- "type": "object",
- "properties": {
- "action": {
- "type": "object",
- "description": "The action to take.",
- "properties": {
- "storageClass": {
- "type": "string",
- "description": "Target storage class. Required iff the type of the action is SetStorageClass."
- },
- "type": {
- "type": "string",
+ "action": {
+ "type": "object",
+ "description": "The action to take.",
+ "properties": {
+ "storageClass": {
+ "type": "string",
+ "description": "Target storage class. Required iff the type of the action is SetStorageClass."
+ },
+ "type": {
+ "type": "string",
"description": "Type of the action. Currently, only Delete, SetStorageClass, and AbortIncompleteMultipartUpload are supported."
- }
}
- },
- "condition": {
- "type": "object",
- "description": "The condition(s) under which the action will be taken.",
- "properties": {
- "age": {
- "type": "integer",
- "description": "Age of an object (in days). This condition is satisfied when an object reaches the specified age.",
- "format": "int32"
- },
- "createdBefore": {
- "type": "string",
- "description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when an object is created before midnight of the specified date in UTC.",
- "format": "date"
- },
- "customTimeBefore": {
- "type": "string",
- "description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when the custom time on an object is before this date in UTC.",
- "format": "date"
- },
- "daysSinceCustomTime": {
- "type": "integer",
- "description": "Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply.",
- "format": "int32"
- },
- "daysSinceNoncurrentTime": {
- "type": "integer",
- "description": "Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent.",
- "format": "int32"
- },
- "isLive": {
- "type": "boolean",
- "description": "Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects."
- },
- "matchesPattern": {
- "type": "string",
- "description": "A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the \"Early Access\" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released."
- },
- "matchesPrefix": {
- "type": "array",
- "description": "List of object name prefixes. This condition will be satisfied when at least one of the prefixes exactly matches the beginning of the object name.",
- "items": {
- "type": "string"
- }
- },
- "matchesSuffix": {
- "type": "array",
- "description": "List of object name suffixes. This condition will be satisfied when at least one of the suffixes exactly matches the end of the object name.",
- "items": {
- "type": "string"
- }
- },
- "matchesStorageClass": {
- "type": "array",
- "description": "Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.",
- "items": {
- "type": "string"
- }
- },
- "noncurrentTimeBefore": {
- "type": "string",
- "description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects.",
- "format": "date"
- },
- "numNewerVersions": {
- "type": "integer",
- "description": "Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.",
- "format": "int32"
+ }
+ },
+ "condition": {
+ "type": "object",
+ "description": "The condition(s) under which the action will be taken.",
+ "properties": {
+ "age": {
+ "type": "integer",
+ "description": "Age of an object (in days). This condition is satisfied when an object reaches the specified age.",
+ "format": "int32"
+ },
+ "createdBefore": {
+ "type": "string",
+ "description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when an object is created before midnight of the specified date in UTC.",
+ "format": "date"
+ },
+ "customTimeBefore": {
+ "type": "string",
+ "description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when the custom time on an object is before this date in UTC.",
+ "format": "date"
+ },
+ "daysSinceCustomTime": {
+ "type": "integer",
+ "description": "Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply.",
+ "format": "int32"
+ },
+ "daysSinceNoncurrentTime": {
+ "type": "integer",
+ "description": "Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent.",
+ "format": "int32"
+ },
+ "isLive": {
+ "type": "boolean",
+ "description": "Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects."
+ },
+ "matchesPattern": {
+ "type": "string",
+ "description": "A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the \"Early Access\" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released."
+ },
+ "matchesPrefix": {
+ "type": "array",
+ "description": "List of object name prefixes. This condition will be satisfied when at least one of the prefixes exactly matches the beginning of the object name.",
+ "items": {
+ "type": "string"
+ }
+ },
+ "matchesSuffix": {
+ "type": "array",
+ "description": "List of object name suffixes. This condition will be satisfied when at least one of the suffixes exactly matches the end of the object name.",
+ "items": {
+ "type": "string"
}
+ },
+ "matchesStorageClass": {
+ "type": "array",
+ "description": "Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.",
+ "items": {
+ "type": "string"
+ }
+ },
+ "noncurrentTimeBefore": {
+ "type": "string",
+ "description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects.",
+ "format": "date"
+ },
+ "numNewerVersions": {
+ "type": "integer",
+ "description": "Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.",
+ "format": "int32"
}
}
}
}
}
}
- },
+ }
+ },
"autoclass": {
- "type": "object",
- "description": "The bucket's Autoclass configuration.",
- "properties": {
- "enabled": {
- "type": "boolean",
- "description": "Whether or not Autoclass is enabled on this bucket"
- },
- "toggleTime": {
- "type": "string",
- "description": "A date and time in RFC 3339 format representing the instant at which \"enabled\" was last toggled.",
- "format": "date-time"
- }
+ "type": "object",
+ "description": "The bucket's Autoclass configuration.",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether or not Autoclass is enabled on this bucket"
+ },
+ "toggleTime": {
+ "type": "string",
+ "description": "A date and time in RFC 3339 format representing the instant at which \"enabled\" was last toggled.",
+ "format": "date-time"
+ },
+ "terminalStorageClass": {
+ "type": "string",
+ "description": "The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Valid values are NEARLINE and ARCHIVE."
+ },
+ "terminalStorageClassUpdateTime": {
+ "type": "string",
+ "description": "A date and time in RFC 3339 format representing the time of the most recent update to \"terminalStorageClass\".",
+ "format": "date-time"
}
+ }
},
- "location": {
- "type": "string",
- "description": "The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list."
- },
- "locationType": {
- "type": "string",
- "description": "The type of the bucket location."
- },
- "logging": {
- "type": "object",
- "description": "The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.",
- "properties": {
- "logBucket": {
- "type": "string",
- "description": "The destination bucket where the current bucket's logs should be placed."
- },
- "logObjectPrefix": {
- "type": "string",
- "description": "A prefix for log object names."
- }
+ "location": {
+ "type": "string",
+ "description": "The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list."
+ },
+ "locationType": {
+ "type": "string",
+ "description": "The type of the bucket location."
+ },
+ "logging": {
+ "type": "object",
+ "description": "The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.",
+ "properties": {
+ "logBucket": {
+ "type": "string",
+ "description": "The destination bucket where the current bucket's logs should be placed."
+ },
+ "logObjectPrefix": {
+ "type": "string",
+ "description": "A prefix for log object names."
}
- },
- "metageneration": {
- "type": "string",
- "description": "The metadata generation of this bucket.",
- "format": "int64"
- },
- "name": {
- "type": "string",
- "description": "The name of the bucket.",
- "annotations": {
- "required": [
- "storage.buckets.insert"
- ]
+ }
+ },
+ "metageneration": {
+ "type": "string",
+ "description": "The metadata generation of this bucket.",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the bucket.",
+ "annotations": {
+ "required": [
+ "storage.buckets.insert"
+ ]
+ }
+ },
+ "owner": {
+ "type": "object",
+ "description": "The owner of the bucket. This is always the project team's owner group.",
+ "properties": {
+ "entity": {
+ "type": "string",
+ "description": "The entity, in the form project-owner-projectId."
+ },
+ "entityId": {
+ "type": "string",
+ "description": "The ID for the entity."
}
- },
- "owner": {
- "type": "object",
- "description": "The owner of the bucket. This is always the project team's owner group.",
- "properties": {
- "entity": {
- "type": "string",
- "description": "The entity, in the form project-owner-projectId."
- },
- "entityId": {
- "type": "string",
- "description": "The ID for the entity."
- }
+ }
+ },
+ "projectNumber": {
+ "type": "string",
+ "description": "The project number of the project the bucket belongs to.",
+ "format": "uint64"
+ },
+ "retentionPolicy": {
+ "type": "object",
+ "description": "The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error.",
+ "properties": {
+ "effectiveTime": {
+ "type": "string",
+ "description": "Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format.",
+ "format": "date-time"
+ },
+ "isLocked": {
+ "type": "boolean",
+ "description": "Once locked, an object retention policy cannot be modified."
+ },
+ "retentionPeriod": {
+ "type": "string",
+ "description": "The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes.",
+ "format": "int64"
}
- },
- "projectNumber": {
- "type": "string",
- "description": "The project number of the project the bucket belongs to.",
- "format": "uint64"
- },
- "retentionPolicy": {
- "type": "object",
- "description": "The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error.",
- "properties": {
- "effectiveTime": {
- "type": "string",
- "description": "Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format.",
- "format": "date-time"
- },
- "isLocked": {
- "type": "boolean",
- "description": "Once locked, an object retention policy cannot be modified."
- },
- "retentionPeriod": {
- "type": "string",
- "description": "The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes.",
- "format": "int64"
- }
+ }
+ },
+ "objectRetention": {
+ "type": "object",
+ "description": "The bucket's object retention config.",
+ "properties": {
+ "mode": {
+ "type": "string",
+ "description": "The bucket's object retention mode. Can be Enabled."
}
- },
- "rpo": {
- "type": "string",
- "description": "The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket."
- },
- "selfLink": {
- "type": "string",
- "description": "The URI of this bucket."
- },
- "storageClass": {
- "type": "string",
- "description": "The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes."
- },
- "timeCreated": {
- "type": "string",
- "description": "The creation time of the bucket in RFC 3339 format.",
- "format": "date-time"
- },
- "updated": {
- "type": "string",
- "description": "The modification time of the bucket in RFC 3339 format.",
- "format": "date-time"
- },
- "versioning": {
- "type": "object",
- "description": "The bucket's versioning configuration.",
- "properties": {
- "enabled": {
- "type": "boolean",
- "description": "While set to true, versioning is fully enabled for this bucket."
- }
+ }
+ },
+ "rpo": {
+ "type": "string",
+ "description": "The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket."
+ },
+ "selfLink": {
+ "type": "string",
+ "description": "The URI of this bucket."
+ },
+ "softDeletePolicy": {
+ "type": "object",
+ "description": "The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted.",
+ "properties": {
+ "retentionDurationSeconds": {
+ "type": "string",
+ "description": "The period of time in seconds, that soft-deleted objects in the bucket will be retained and cannot be permanently deleted.",
+ "format": "int64"
+ },
+ "effectiveTime": {
+ "type": "string",
+ "description": "Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.",
+ "format": "date-time"
}
- },
- "website": {
- "type": "object",
- "description": "The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information.",
- "properties": {
- "mainPageSuffix": {
- "type": "string",
- "description": "If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages."
- },
- "notFoundPage": {
- "type": "string",
- "description": "If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result."
- }
+ }
+ },
+ "storageClass": {
+ "type": "string",
+ "description": "The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes."
+ },
+ "timeCreated": {
+ "type": "string",
+ "description": "The creation time of the bucket in RFC 3339 format.",
+ "format": "date-time"
+ },
+ "updated": {
+ "type": "string",
+ "description": "The modification time of the bucket in RFC 3339 format.",
+ "format": "date-time"
+ },
+ "versioning": {
+ "type": "object",
+ "description": "The bucket's versioning configuration.",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "While set to true, versioning is fully enabled for this bucket."
}
- },
- "satisfiesPZS": {
- "type": "boolean",
- "description": "Reserved for future use."
}
- }
- },
- "BucketAccessControl": {
- "id": "BucketAccessControl",
- "type": "object",
- "description": "An access-control entry.",
- "properties": {
- "bucket": {
- "type": "string",
- "description": "The name of the bucket."
- },
- "domain": {
- "type": "string",
- "description": "The domain associated with the entity, if any."
- },
- "email": {
- "type": "string",
- "description": "The email address associated with the entity, if any."
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.",
- "annotations": {
- "required": [
- "storage.bucketAccessControls.insert"
- ]
+ },
+ "website": {
+ "type": "object",
+ "description": "The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information.",
+ "properties": {
+ "mainPageSuffix": {
+ "type": "string",
+ "description": "If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages."
+ },
+ "notFoundPage": {
+ "type": "string",
+ "description": "If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result."
}
- },
- "entityId": {
- "type": "string",
- "description": "The ID for the entity, if any."
- },
- "etag": {
- "type": "string",
- "description": "HTTP 1.1 Entity tag for the access-control entry."
- },
- "id": {
- "type": "string",
- "description": "The ID of the access-control entry."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl.",
- "default": "storage#bucketAccessControl"
- },
- "projectTeam": {
- "type": "object",
- "description": "The project team associated with the entity, if any.",
- "properties": {
- "projectNumber": {
- "type": "string",
- "description": "The project number."
- },
- "team": {
- "type": "string",
- "description": "The team."
- }
- }
- },
- "role": {
- "type": "string",
- "description": "The access permission for the entity.",
- "annotations": {
- "required": [
- "storage.bucketAccessControls.insert"
- ]
+ }
+ },
+ "satisfiesPZS": {
+ "type": "boolean",
+ "description": "Reserved for future use."
+ }
+ }
+ },
+ "BucketAccessControl": {
+ "id": "BucketAccessControl",
+ "type": "object",
+ "description": "An access-control entry.",
+ "properties": {
+ "bucket": {
+ "type": "string",
+ "description": "The name of the bucket."
+ },
+ "domain": {
+ "type": "string",
+ "description": "The domain associated with the entity, if any."
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address associated with the entity, if any."
+ },
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.",
+ "annotations": {
+ "required": [
+ "storage.bucketAccessControls.insert"
+ ]
+ }
+ },
+ "entityId": {
+ "type": "string",
+ "description": "The ID for the entity, if any."
+ },
+ "etag": {
+ "type": "string",
+ "description": "HTTP 1.1 Entity tag for the access-control entry."
+ },
+ "id": {
+ "type": "string",
+ "description": "The ID of the access-control entry."
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl.",
+ "default": "storage#bucketAccessControl"
+ },
+ "projectTeam": {
+ "type": "object",
+ "description": "The project team associated with the entity, if any.",
+ "properties": {
+ "projectNumber": {
+ "type": "string",
+ "description": "The project number."
+ },
+ "team": {
+ "type": "string",
+ "description": "The team."
}
- },
- "selfLink": {
- "type": "string",
- "description": "The link to this access-control entry."
}
+ },
+ "role": {
+ "type": "string",
+ "description": "The access permission for the entity.",
+ "annotations": {
+ "required": [
+ "storage.bucketAccessControls.insert"
+ ]
+ }
+ },
+ "selfLink": {
+ "type": "string",
+ "description": "The link to this access-control entry."
}
- },
- "BucketAccessControls": {
- "id": "BucketAccessControls",
- "type": "object",
- "description": "An access-control list.",
- "properties": {
+ }
+ },
+ "BucketAccessControls": {
+ "id": "BucketAccessControls",
+ "type": "object",
+ "description": "An access-control list.",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "The list of items.",
"items": {
- "type": "array",
- "description": "The list of items.",
- "items": {
- "$ref": "BucketAccessControl"
- }
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For lists of bucket access control entries, this is always storage#bucketAccessControls.",
- "default": "storage#bucketAccessControls"
+ "$ref": "BucketAccessControl"
}
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For lists of bucket access control entries, this is always storage#bucketAccessControls.",
+ "default": "storage#bucketAccessControls"
}
- },
- "Buckets": {
- "id": "Buckets",
- "type": "object",
- "description": "A list of buckets.",
- "properties": {
+ }
+ },
+ "Buckets": {
+ "id": "Buckets",
+ "type": "object",
+ "description": "A list of buckets.",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "The list of items.",
"items": {
- "type": "array",
- "description": "The list of items.",
- "items": {
- "$ref": "Bucket"
- }
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For lists of buckets, this is always storage#buckets.",
- "default": "storage#buckets"
- },
- "nextPageToken": {
- "type": "string",
- "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
+ "$ref": "Bucket"
}
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For lists of buckets, this is always storage#buckets.",
+ "default": "storage#buckets"
+ },
+ "nextPageToken": {
+ "type": "string",
+ "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
}
- },
- "Channel": {
- "id": "Channel",
- "type": "object",
- "description": "An notification channel used to watch for resource changes.",
- "properties": {
- "address": {
- "type": "string",
- "description": "The address where notifications are delivered for this channel."
- },
- "expiration": {
- "type": "string",
- "description": "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.",
- "format": "int64"
- },
- "id": {
- "type": "string",
- "description": "A UUID or similar unique string that identifies this channel."
- },
- "kind": {
- "type": "string",
- "description": "Identifies this as a notification channel used to watch for changes to a resource, which is \"api#channel\".",
- "default": "api#channel"
- },
- "params": {
- "type": "object",
- "description": "Additional parameters controlling delivery channel behavior. Optional.",
- "additionalProperties": {
- "type": "string",
- "description": "Declares a new parameter by name."
- }
- },
- "payload": {
- "type": "boolean",
- "description": "A Boolean value to indicate whether payload is wanted. Optional."
- },
- "resourceId": {
- "type": "string",
- "description": "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions."
- },
- "resourceUri": {
- "type": "string",
- "description": "A version-specific identifier for the watched resource."
- },
- "token": {
- "type": "string",
- "description": "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional."
- },
- "type": {
+ }
+ },
+ "Channel": {
+ "id": "Channel",
+ "type": "object",
+ "description": "An notification channel used to watch for resource changes.",
+ "properties": {
+ "address": {
+ "type": "string",
+ "description": "The address where notifications are delivered for this channel."
+ },
+ "expiration": {
+ "type": "string",
+ "description": "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.",
+ "format": "int64"
+ },
+ "id": {
+ "type": "string",
+ "description": "A UUID or similar unique string that identifies this channel."
+ },
+ "kind": {
+ "type": "string",
+ "description": "Identifies this as a notification channel used to watch for changes to a resource, which is \"api#channel\".",
+ "default": "api#channel"
+ },
+ "params": {
+ "type": "object",
+ "description": "Additional parameters controlling delivery channel behavior. Optional.",
+ "additionalProperties": {
"type": "string",
- "description": "The type of delivery mechanism used for this channel."
+ "description": "Declares a new parameter by name."
}
+ },
+ "payload": {
+ "type": "boolean",
+ "description": "A Boolean value to indicate whether payload is wanted. Optional."
+ },
+ "resourceId": {
+ "type": "string",
+ "description": "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions."
+ },
+ "resourceUri": {
+ "type": "string",
+ "description": "A version-specific identifier for the watched resource."
+ },
+ "token": {
+ "type": "string",
+ "description": "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional."
+ },
+ "type": {
+ "type": "string",
+ "description": "The type of delivery mechanism used for this channel."
}
- },
- "ComposeRequest": {
- "id": "ComposeRequest",
- "type": "object",
- "description": "A Compose request.",
- "properties": {
- "destination": {
- "$ref": "Object",
- "description": "Properties of the resulting object."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is.",
- "default": "storage#composeRequest"
- },
- "sourceObjects": {
- "type": "array",
- "description": "The list of source objects that will be concatenated into a single object.",
- "items": {
- "type": "object",
- "properties": {
- "generation": {
- "type": "string",
- "description": "The generation of this object to use as the source.",
- "format": "int64"
- },
- "name": {
- "type": "string",
- "description": "The source object's name. All source objects must reside in the same bucket.",
- "annotations": {
- "required": [
- "storage.objects.compose"
- ]
- }
- },
- "objectPreconditions": {
- "type": "object",
- "description": "Conditions that must be met for this operation to execute.",
- "properties": {
- "ifGenerationMatch": {
- "type": "string",
- "description": "Only perform the composition if the generation of the source object that would be used matches this value. If this value and a generation are both specified, they must be the same value or the call will fail.",
- "format": "int64"
- }
+ }
+ },
+ "ComposeRequest": {
+ "id": "ComposeRequest",
+ "type": "object",
+ "description": "A Compose request.",
+ "properties": {
+ "destination": {
+ "$ref": "Object",
+ "description": "Properties of the resulting object."
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is.",
+ "default": "storage#composeRequest"
+ },
+ "sourceObjects": {
+ "type": "array",
+ "description": "The list of source objects that will be concatenated into a single object.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "generation": {
+ "type": "string",
+ "description": "The generation of this object to use as the source.",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string",
+ "description": "The source object's name. All source objects must reside in the same bucket.",
+ "annotations": {
+ "required": [
+ "storage.objects.compose"
+ ]
+ }
+ },
+ "objectPreconditions": {
+ "type": "object",
+ "description": "Conditions that must be met for this operation to execute.",
+ "properties": {
+ "ifGenerationMatch": {
+ "type": "string",
+ "description": "Only perform the composition if the generation of the source object that would be used matches this value. If this value and a generation are both specified, they must be the same value or the call will fail.",
+ "format": "int64"
}
}
}
- },
- "annotations": {
- "required": [
- "storage.objects.compose"
- ]
}
- }
- }
- },
- "Expr": {
- "id": "Expr",
- "type": "object",
- "description": "Represents an expression text. Example: title: \"User account presence\" description: \"Determines whether the request has a user account\" expression: \"size(request.user) > 0\"",
- "properties": {
- "description": {
- "type": "string",
- "description": "An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI."
},
- "expression": {
- "type": "string",
- "description": "Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported."
- },
- "location": {
- "type": "string",
- "description": "An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file."
- },
- "title": {
- "type": "string",
- "description": "An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression."
+ "annotations": {
+ "required": [
+ "storage.objects.compose"
+ ]
}
}
- },
- "HmacKey": {
- "id": "HmacKey",
- "type": "object",
- "description": "JSON template to produce a JSON-style HMAC Key resource for Create responses.",
- "properties": {
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For HMAC keys, this is always storage#hmacKey.",
- "default": "storage#hmacKey"
- },
- "metadata": {
- "$ref": "HmacKeyMetadata",
- "description": "Key metadata."
- },
- "secret": {
- "type": "string",
- "description": "HMAC secret key material."
- }
+ }
+ },
+ "Expr": {
+ "id": "Expr",
+ "type": "object",
+ "description": "Represents an expression text. Example: title: \"User account presence\" description: \"Determines whether the request has a user account\" expression: \"size(request.user) > 0\"",
+ "properties": {
+ "description": {
+ "type": "string",
+ "description": "An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI."
+ },
+ "expression": {
+ "type": "string",
+ "description": "Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported."
+ },
+ "location": {
+ "type": "string",
+ "description": "An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file."
+ },
+ "title": {
+ "type": "string",
+ "description": "An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression."
}
- },
- "HmacKeyMetadata": {
- "id": "HmacKeyMetadata",
- "type": "object",
- "description": "JSON template to produce a JSON-style HMAC Key metadata resource.",
- "properties": {
- "accessId": {
- "type": "string",
- "description": "The ID of the HMAC Key."
- },
- "etag": {
- "type": "string",
- "description": "HTTP 1.1 Entity tag for the HMAC key."
- },
- "id": {
- "type": "string",
- "description": "The ID of the HMAC key, including the Project ID and the Access ID."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For HMAC Key metadata, this is always storage#hmacKeyMetadata.",
- "default": "storage#hmacKeyMetadata"
- },
- "projectId": {
- "type": "string",
- "description": "Project ID owning the service account to which the key authenticates."
- },
- "selfLink": {
- "type": "string",
- "description": "The link to this resource."
- },
- "serviceAccountEmail": {
- "type": "string",
- "description": "The email address of the key's associated service account."
- },
- "state": {
- "type": "string",
- "description": "The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED."
+ }
+ },
+ "GoogleLongrunningOperation": {
+ "description": "This resource represents a long-running operation that is the result of a network API call.",
+ "id": "GoogleLongrunningOperation",
+ "properties": {
+ "done": {
+ "description": "If the value is \"false\", it means the operation is still in progress. If \"true\", the operation is completed, and either \"error\" or \"response\" is available.",
+ "type": "boolean"
+ },
+ "error": {
+ "$ref": "GoogleRpcStatus",
+ "description": "The error result of the operation in case of failure or cancellation."
+ },
+ "metadata": {
+ "additionalProperties": {
+ "description": "Properties of the object. Contains field @type with type URL.",
+ "type": "any"
},
- "timeCreated": {
- "type": "string",
- "description": "The creation time of the HMAC key in RFC 3339 format.",
- "format": "date-time"
+ "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.",
+ "type": "object"
+ },
+ "name": {
+ "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the \"name\" should be a resource name ending with \"operations/{operationId}\".",
+ "type": "string"
+ },
+ "response": {
+ "additionalProperties": {
+ "description": "Properties of the object. Contains field @type with type URL.",
+ "type": "any"
},
- "updated": {
- "type": "string",
- "description": "The last modification time of the HMAC key metadata in RFC 3339 format.",
- "format": "date-time"
- }
+ "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as \"Delete\", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type \"XxxResponse\", where \"Xxx\" is the original method name. For example, if the original method name is \"TakeSnapshot()\", the inferred response type is \"TakeSnapshotResponse\".",
+ "type": "object"
}
},
- "HmacKeysMetadata": {
- "id": "HmacKeysMetadata",
- "type": "object",
- "description": "A list of hmacKeys.",
- "properties": {
+ "type": "object"
+ },
+ "GoogleLongrunningListOperationsResponse": {
+ "description": "The response message for storage.buckets.operations.list.",
+ "id": "GoogleLongrunningListOperationsResponse",
+ "properties": {
+ "nextPageToken": {
+ "type": "string",
+ "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
+ },
+ "operations": {
+ "description": "A list of operations that matches the specified filter in the request.",
"items": {
- "type": "array",
- "description": "The list of items.",
- "items": {
- "$ref": "HmacKeyMetadata"
- }
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For lists of hmacKeys, this is always storage#hmacKeysMetadata.",
- "default": "storage#hmacKeysMetadata"
+ "$ref": "GoogleLongrunningOperation"
},
- "nextPageToken": {
- "type": "string",
- "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
- }
+ "type": "array"
}
},
- "Notification": {
- "id": "Notification",
- "type": "object",
- "description": "A subscription to receive Google PubSub notifications.",
- "properties": {
- "custom_attributes": {
- "type": "object",
- "description": "An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.",
+ "type": "object"
+ },
+ "GoogleRpcStatus": {
+ "description": "The \"Status\" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each \"Status\" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).",
+ "id": "GoogleRpcStatus",
+ "properties": {
+ "code": {
+ "description": "The status code, which should be an enum value of google.rpc.Code.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "details": {
+ "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
+ "items": {
"additionalProperties": {
- "type": "string"
- }
- },
- "etag": {
- "type": "string",
- "description": "HTTP 1.1 Entity tag for this subscription notification."
- },
- "event_types": {
- "type": "array",
- "description": "If present, only send notifications about listed event types. If empty, sent notifications for all event types.",
- "items": {
- "type": "string"
- }
- },
- "id": {
- "type": "string",
- "description": "The ID of the notification."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For notifications, this is always storage#notification.",
- "default": "storage#notification"
- },
- "object_name_prefix": {
- "type": "string",
- "description": "If present, only apply this notification configuration to object names that begin with this prefix."
- },
- "payload_format": {
- "type": "string",
- "description": "The desired content of the Payload.",
- "default": "JSON_API_V1",
- "annotations": {
- "required": [
- "storage.notifications.insert"
- ]
- }
- },
- "selfLink": {
- "type": "string",
- "description": "The canonical URL of this notification."
+ "description": "Properties of the object. Contains field @type with type URL.",
+ "type": "any"
+ },
+ "type": "object"
},
- "topic": {
- "type": "string",
- "description": "The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'",
- "annotations": {
- "required": [
- "storage.notifications.insert"
- ]
- }
- }
+ "type": "array"
+ },
+ "message": {
+ "description": "A developer-facing error message, which should be in English.",
+ "type": "string"
}
},
- "Notifications": {
- "id": "Notifications",
- "type": "object",
- "description": "A list of notification subscriptions.",
- "properties": {
+ "type": "object"
+ },
+ "HmacKey": {
+ "id": "HmacKey",
+ "type": "object",
+ "description": "JSON template to produce a JSON-style HMAC Key resource for Create responses.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For HMAC keys, this is always storage#hmacKey.",
+ "default": "storage#hmacKey"
+ },
+ "metadata": {
+ "$ref": "HmacKeyMetadata",
+ "description": "Key metadata."
+ },
+ "secret": {
+ "type": "string",
+ "description": "HMAC secret key material."
+ }
+ }
+ },
+ "HmacKeyMetadata": {
+ "id": "HmacKeyMetadata",
+ "type": "object",
+ "description": "JSON template to produce a JSON-style HMAC Key metadata resource.",
+ "properties": {
+ "accessId": {
+ "type": "string",
+ "description": "The ID of the HMAC Key."
+ },
+ "etag": {
+ "type": "string",
+ "description": "HTTP 1.1 Entity tag for the HMAC key."
+ },
+ "id": {
+ "type": "string",
+ "description": "The ID of the HMAC key, including the Project ID and the Access ID."
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For HMAC Key metadata, this is always storage#hmacKeyMetadata.",
+ "default": "storage#hmacKeyMetadata"
+ },
+ "projectId": {
+ "type": "string",
+ "description": "Project ID owning the service account to which the key authenticates."
+ },
+ "selfLink": {
+ "type": "string",
+ "description": "The link to this resource."
+ },
+ "serviceAccountEmail": {
+ "type": "string",
+ "description": "The email address of the key's associated service account."
+ },
+ "state": {
+ "type": "string",
+ "description": "The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED."
+ },
+ "timeCreated": {
+ "type": "string",
+ "description": "The creation time of the HMAC key in RFC 3339 format.",
+ "format": "date-time"
+ },
+ "updated": {
+ "type": "string",
+ "description": "The last modification time of the HMAC key metadata in RFC 3339 format.",
+ "format": "date-time"
+ }
+ }
+ },
+ "HmacKeysMetadata": {
+ "id": "HmacKeysMetadata",
+ "type": "object",
+ "description": "A list of hmacKeys.",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "The list of items.",
"items": {
- "type": "array",
- "description": "The list of items.",
- "items": {
- "$ref": "Notification"
- }
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For lists of notifications, this is always storage#notifications.",
- "default": "storage#notifications"
+ "$ref": "HmacKeyMetadata"
}
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For lists of hmacKeys, this is always storage#hmacKeysMetadata.",
+ "default": "storage#hmacKeysMetadata"
+ },
+ "nextPageToken": {
+ "type": "string",
+ "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
}
- },
- "Object": {
- "id": "Object",
- "type": "object",
- "description": "An object.",
- "properties": {
- "acl": {
- "type": "array",
- "description": "Access controls on the object.",
- "items": {
- "$ref": "ObjectAccessControl"
- },
- "annotations": {
- "required": [
- "storage.objects.update"
- ]
- }
- },
- "bucket": {
- "type": "string",
- "description": "The name of the bucket containing this object."
- },
- "cacheControl": {
- "type": "string",
- "description": "Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600."
- },
- "componentCount": {
- "type": "integer",
- "description": "Number of underlying components that make up this object. Components are accumulated by compose operations.",
- "format": "int32"
- },
- "contentDisposition": {
- "type": "string",
- "description": "Content-Disposition of the object data."
- },
- "contentEncoding": {
- "type": "string",
- "description": "Content-Encoding of the object data."
- },
- "contentLanguage": {
- "type": "string",
- "description": "Content-Language of the object data."
- },
- "contentType": {
- "type": "string",
- "description": "Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream."
- },
- "crc32c": {
- "type": "string",
- "description": "CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices."
- },
- "customTime": {
- "type": "string",
- "description": "A timestamp in RFC 3339 format specified by the user for an object.",
- "format": "date-time"
- },
- "customerEncryption": {
- "type": "object",
- "description": "Metadata of customer-supplied encryption key, if the object is encrypted by such a key.",
- "properties": {
- "encryptionAlgorithm": {
- "type": "string",
- "description": "The encryption algorithm."
- },
- "keySha256": {
- "type": "string",
- "description": "SHA256 hash value of the encryption key."
- }
+ }
+ },
+ "ManagedFolder": {
+ "id": "ManagedFolder",
+ "type": "object",
+ "description": "A managed folder.",
+ "properties": {
+ "bucket": {
+ "type": "string",
+ "description": "The name of the bucket containing this managed folder."
+ },
+ "id": {
+ "type": "string",
+ "description": "The ID of the managed folder, including the bucket name and managed folder name."
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For managed folders, this is always storage#managedFolder.",
+ "default": "storage#managedFolder"
+ },
+ "metageneration": {
+ "type": "string",
+ "description": "The version of the metadata for this managed folder. Used for preconditions and for detecting changes in metadata.",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the managed folder. Required if not specified by URL parameter."
+ },
+ "selfLink": {
+ "type": "string",
+ "description": "The link to this managed folder."
+ },
+ "createTime": {
+ "type": "string",
+ "description": "The creation time of the managed folder in RFC 3339 format.",
+ "format": "date-time"
+ },
+ "updateTime": {
+ "type": "string",
+ "description": "The last update time of the managed folder metadata in RFC 3339 format.",
+ "format": "date-time"
+ }
+ }
+ },
+ "ManagedFolders": {
+ "id": "ManagedFolders",
+ "type": "object",
+ "description": "A list of managed folders.",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "The list of items.",
+ "items": {
+ "$ref": "ManagedFolder"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For lists of managed folders, this is always storage#managedFolders.",
+ "default": "storage#managedFolders"
+ },
+ "nextPageToken": {
+ "type": "string",
+ "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
+ }
+ }
+ },
+ "Notification": {
+ "id": "Notification",
+ "type": "object",
+ "description": "A subscription to receive Google PubSub notifications.",
+ "properties": {
+ "custom_attributes": {
+ "type": "object",
+ "description": "An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "etag": {
+ "type": "string",
+ "description": "HTTP 1.1 Entity tag for this subscription notification."
+ },
+ "event_types": {
+ "type": "array",
+ "description": "If present, only send notifications about listed event types. If empty, sent notifications for all event types.",
+ "items": {
+ "type": "string"
+ }
+ },
+ "id": {
+ "type": "string",
+ "description": "The ID of the notification."
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For notifications, this is always storage#notification.",
+ "default": "storage#notification"
+ },
+ "object_name_prefix": {
+ "type": "string",
+ "description": "If present, only apply this notification configuration to object names that begin with this prefix."
+ },
+ "payload_format": {
+ "type": "string",
+ "description": "The desired content of the Payload.",
+ "default": "JSON_API_V1",
+ "annotations": {
+ "required": [
+ "storage.notifications.insert"
+ ]
+ }
+ },
+ "selfLink": {
+ "type": "string",
+ "description": "The canonical URL of this notification."
+ },
+ "topic": {
+ "type": "string",
+ "description": "The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'",
+ "annotations": {
+ "required": [
+ "storage.notifications.insert"
+ ]
+ }
+ }
+ }
+ },
+ "Notifications": {
+ "id": "Notifications",
+ "type": "object",
+ "description": "A list of notification subscriptions.",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "The list of items.",
+ "items": {
+ "$ref": "Notification"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For lists of notifications, this is always storage#notifications.",
+ "default": "storage#notifications"
+ }
+ }
+ },
+ "Object": {
+ "id": "Object",
+ "type": "object",
+ "description": "An object.",
+ "properties": {
+ "acl": {
+ "type": "array",
+ "description": "Access controls on the object.",
+ "items": {
+ "$ref": "ObjectAccessControl"
+ },
+ "annotations": {
+ "required": [
+ "storage.objects.update"
+ ]
+ }
+ },
+ "bucket": {
+ "type": "string",
+ "description": "The name of the bucket containing this object."
+ },
+ "cacheControl": {
+ "type": "string",
+ "description": "Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600."
+ },
+ "componentCount": {
+ "type": "integer",
+ "description": "Number of underlying components that make up this object. Components are accumulated by compose operations.",
+ "format": "int32"
+ },
+ "contentDisposition": {
+ "type": "string",
+ "description": "Content-Disposition of the object data."
+ },
+ "contentEncoding": {
+ "type": "string",
+ "description": "Content-Encoding of the object data."
+ },
+ "contentLanguage": {
+ "type": "string",
+ "description": "Content-Language of the object data."
+ },
+ "contentType": {
+ "type": "string",
+ "description": "Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream."
+ },
+ "crc32c": {
+ "type": "string",
+ "description": "CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices."
+ },
+ "customTime": {
+ "type": "string",
+ "description": "A timestamp in RFC 3339 format specified by the user for an object.",
+ "format": "date-time"
+ },
+ "customerEncryption": {
+ "type": "object",
+ "description": "Metadata of customer-supplied encryption key, if the object is encrypted by such a key.",
+ "properties": {
+ "encryptionAlgorithm": {
+ "type": "string",
+ "description": "The encryption algorithm."
+ },
+ "keySha256": {
+ "type": "string",
+ "description": "SHA256 hash value of the encryption key."
+ }
+ }
+ },
+ "etag": {
+ "type": "string",
+ "description": "HTTP 1.1 Entity tag for the object."
+ },
+ "eventBasedHold": {
+ "type": "boolean",
+ "description": "Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false."
+ },
+ "generation": {
+ "type": "string",
+ "description": "The content generation of this object. Used for object versioning.",
+ "format": "int64"
+ },
+ "id": {
+ "type": "string",
+ "description": "The ID of the object, including the bucket name, object name, and generation number."
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For objects, this is always storage#object.",
+ "default": "storage#object"
+ },
+ "kmsKeyName": {
+ "type": "string",
+ "description": "Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request."
+ },
+ "md5Hash": {
+ "type": "string",
+ "description": "MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices."
+ },
+ "mediaLink": {
+ "type": "string",
+ "description": "Media download link."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "User-provided metadata, in key/value pairs.",
+ "additionalProperties": {
+ "type": "string",
+ "description": "An individual metadata entry."
+ }
+ },
+ "metageneration": {
+ "type": "string",
+ "description": "The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string",
+ "description": "The name of the object. Required if not specified by URL parameter."
+ },
+ "owner": {
+ "type": "object",
+ "description": "The owner of the object. This will always be the uploader of the object.",
+ "properties": {
+ "entity": {
+ "type": "string",
+ "description": "The entity, in the form user-userId."
+ },
+ "entityId": {
+ "type": "string",
+ "description": "The ID for the entity."
+ }
+ }
+ },
+ "retentionExpirationTime": {
+ "type": "string",
+ "description": "A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).",
+ "format": "date-time"
+ },
+ "retention": {
+ "type": "object",
+ "description": "A collection of object level retention parameters.",
+ "properties": {
+ "retainUntilTime": {
+ "type": "string",
+ "description": "A time in RFC 3339 format until which object retention protects this object.",
+ "format": "date-time"
+ },
+ "mode": {
+ "type": "string",
+ "description": "The bucket's object retention mode, can only be Unlocked or Locked."
+ }
+ }
+ },
+ "selfLink": {
+ "type": "string",
+ "description": "The link to this object."
+ },
+ "size": {
+ "type": "string",
+ "description": "Content-Length of the data in bytes.",
+ "format": "uint64"
+ },
+ "storageClass": {
+ "type": "string",
+ "description": "Storage class of the object."
+ },
+ "temporaryHold": {
+ "type": "boolean",
+ "description": "Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object."
+ },
+ "timeCreated": {
+ "type": "string",
+ "description": "The creation time of the object in RFC 3339 format.",
+ "format": "date-time"
+ },
+ "timeDeleted": {
+ "type": "string",
+ "description": "The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.",
+ "format": "date-time"
+ },
+ "softDeleteTime": {
+ "type": "string",
+ "description": "The time at which the object became soft-deleted in RFC 3339 format.",
+ "format": "date-time"
+ },
+ "hardDeleteTime": {
+ "type": "string",
+ "description": "This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket.",
+ "format": "date-time"
+ },
+ "timeStorageClassUpdated": {
+ "type": "string",
+ "description": "The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.",
+ "format": "date-time"
+ },
+ "updated": {
+ "type": "string",
+ "description": "The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration.",
+ "format": "date-time"
+ }
+ }
+ },
+ "ObjectAccessControl": {
+ "id": "ObjectAccessControl",
+ "type": "object",
+ "description": "An access-control entry.",
+ "properties": {
+ "bucket": {
+ "type": "string",
+ "description": "The name of the bucket."
+ },
+ "domain": {
+ "type": "string",
+ "description": "The domain associated with the entity, if any."
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address associated with the entity, if any."
+ },
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.",
+ "annotations": {
+ "required": [
+ "storage.defaultObjectAccessControls.insert",
+ "storage.objectAccessControls.insert"
+ ]
+ }
+ },
+ "entityId": {
+ "type": "string",
+ "description": "The ID for the entity, if any."
+ },
+ "etag": {
+ "type": "string",
+ "description": "HTTP 1.1 Entity tag for the access-control entry."
+ },
+ "generation": {
+ "type": "string",
+ "description": "The content generation of the object, if applied to an object.",
+ "format": "int64"
+ },
+ "id": {
+ "type": "string",
+ "description": "The ID of the access-control entry."
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For object access control entries, this is always storage#objectAccessControl.",
+ "default": "storage#objectAccessControl"
+ },
+ "object": {
+ "type": "string",
+ "description": "The name of the object, if applied to an object."
+ },
+ "projectTeam": {
+ "type": "object",
+ "description": "The project team associated with the entity, if any.",
+ "properties": {
+ "projectNumber": {
+ "type": "string",
+ "description": "The project number."
+ },
+ "team": {
+ "type": "string",
+ "description": "The team."
+ }
+ }
+ },
+ "role": {
+ "type": "string",
+ "description": "The access permission for the entity.",
+ "annotations": {
+ "required": [
+ "storage.defaultObjectAccessControls.insert",
+ "storage.objectAccessControls.insert"
+ ]
+ }
+ },
+ "selfLink": {
+ "type": "string",
+ "description": "The link to this access-control entry."
+ }
+ }
+ },
+ "ObjectAccessControls": {
+ "id": "ObjectAccessControls",
+ "type": "object",
+ "description": "An access-control list.",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "The list of items.",
+ "items": {
+ "$ref": "ObjectAccessControl"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls.",
+ "default": "storage#objectAccessControls"
+ }
+ }
+ },
+ "Objects": {
+ "id": "Objects",
+ "type": "object",
+ "description": "A list of objects.",
+ "properties": {
+ "items": {
+ "type": "array",
+ "description": "The list of items.",
+ "items": {
+ "$ref": "Object"
+ }
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For lists of objects, this is always storage#objects.",
+ "default": "storage#objects"
+ },
+ "nextPageToken": {
+ "type": "string",
+ "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
+ },
+ "prefixes": {
+ "type": "array",
+ "description": "The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "type": "object",
+ "description": "A bucket/object/managedFolder IAM policy.",
+ "properties": {
+ "bindings": {
+ "type": "array",
+ "description": "An association between a role, which comes with a set of permissions, and members who may assume that role.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "condition": {
+ "$ref": "Expr",
+ "description": "The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently."
+ },
+ "members": {
+ "type": "array",
+ "description": "A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: \n- allUsers \u2014 A special identifier that represents anyone on the internet; with or without a Google account. \n- allAuthenticatedUsers \u2014 A special identifier that represents anyone who is authenticated with a Google account or a service account. \n- user:emailid \u2014 An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. \n- serviceAccount:emailid \u2014 An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . \n- group:emailid \u2014 An email address that represents a Google group. For example, group:admins@example.com. \n- domain:domain \u2014 A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. \n- projectOwner:projectid \u2014 Owners of the given project. For example, projectOwner:my-example-project \n- projectEditor:projectid \u2014 Editors of the given project. For example, projectEditor:my-example-project \n- projectViewer:projectid \u2014 Viewers of the given project. For example, projectViewer:my-example-project",
+ "items": {
+ "type": "string"
+ },
+ "annotations": {
+ "required": [
+ "storage.buckets.setIamPolicy",
+ "storage.objects.setIamPolicy",
+ "storage.managedFolders.setIamPolicy"
+ ]
+ }
+ },
+ "role": {
+ "type": "string",
+ "description": "The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole.\nThe new IAM roles are: \n- roles/storage.admin \u2014 Full control of Google Cloud Storage resources. \n- roles/storage.objectViewer \u2014 Read-Only access to Google Cloud Storage objects. \n- roles/storage.objectCreator \u2014 Access to create objects in Google Cloud Storage. \n- roles/storage.objectAdmin \u2014 Full control of Google Cloud Storage objects. The legacy IAM roles are: \n- roles/storage.legacyObjectReader \u2014 Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. \n- roles/storage.legacyObjectOwner \u2014 Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. \n- roles/storage.legacyBucketReader \u2014 Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. \n- roles/storage.legacyBucketWriter \u2014 Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. \n- roles/storage.legacyBucketOwner \u2014 Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role.",
+ "annotations": {
+ "required": [
+ "storage.buckets.setIamPolicy",
+ "storage.objects.setIamPolicy",
+ "storage.managedFolders.setIamPolicy"
+ ]
+ }
+ }
+ }
+ },
+ "annotations": {
+ "required": [
+ "storage.buckets.setIamPolicy",
+ "storage.objects.setIamPolicy",
+ "storage.managedFolders.setIamPolicy"
+ ]
+ }
+ },
+ "etag": {
+ "type": "string",
+ "description": "HTTP 1.1 Entity tag for the policy.",
+ "format": "byte"
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.",
+ "default": "storage#policy"
+ },
+ "resourceId": {
+ "type": "string",
+ "description": "The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, projects/_/buckets/bucket/objects/object for objects, and projects/_/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input."
+ },
+ "version": {
+ "type": "integer",
+ "description": "The IAM policy format version.",
+ "format": "int32"
+ }
+ }
+ },
+ "RewriteResponse": {
+ "id": "RewriteResponse",
+ "type": "object",
+ "description": "A rewrite response.",
+ "properties": {
+ "done": {
+ "type": "boolean",
+ "description": "true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response."
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is.",
+ "default": "storage#rewriteResponse"
+ },
+ "objectSize": {
+ "type": "string",
+ "description": "The total size of the object being copied in bytes. This property is always present in the response.",
+ "format": "int64"
+ },
+ "resource": {
+ "$ref": "Object",
+ "description": "A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes."
+ },
+ "rewriteToken": {
+ "type": "string",
+ "description": "A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy."
+ },
+ "totalBytesRewritten": {
+ "type": "string",
+ "description": "The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response.",
+ "format": "int64"
+ }
+ }
+ },
+ "ServiceAccount": {
+ "id": "ServiceAccount",
+ "type": "object",
+ "description": "A subscription to receive Google PubSub notifications.",
+ "properties": {
+ "email_address": {
+ "type": "string",
+ "description": "The ID of the notification."
+ },
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is. For notifications, this is always storage#notification.",
+ "default": "storage#serviceAccount"
+ }
+ }
+ },
+ "TestIamPermissionsResponse": {
+ "id": "TestIamPermissionsResponse",
+ "type": "object",
+ "description": "A storage.(buckets|objects|managedFolders).testIamPermissions response.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "description": "The kind of item this is.",
+ "default": "storage#testIamPermissionsResponse"
+ },
+ "permissions": {
+ "type": "array",
+ "description": "The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows: \n- storage.buckets.delete \u2014 Delete bucket. \n- storage.buckets.get \u2014 Read bucket metadata. \n- storage.buckets.getIamPolicy \u2014 Read bucket IAM policy. \n- storage.buckets.create \u2014 Create bucket. \n- storage.buckets.list \u2014 List buckets. \n- storage.buckets.setIamPolicy \u2014 Update bucket IAM policy. \n- storage.buckets.update \u2014 Update bucket metadata. \n- storage.objects.delete \u2014 Delete object. \n- storage.objects.get \u2014 Read object data and metadata. \n- storage.objects.getIamPolicy \u2014 Read object IAM policy. \n- storage.objects.create \u2014 Create object. \n- storage.objects.list \u2014 List objects. \n- storage.objects.setIamPolicy \u2014 Update object IAM policy. \n- storage.objects.update \u2014 Update object metadata. \n- storage.managedFolders.delete \u2014 Delete managed folder. \n- storage.managedFolders.get \u2014 Read managed folder metadata. \n- storage.managedFolders.getIamPolicy \u2014 Read managed folder IAM policy. \n- storage.managedFolders.create \u2014 Create managed folder. \n- storage.managedFolders.list \u2014 List managed folders. \n- storage.managedFolders.setIamPolicy \u2014 Update managed folder IAM policy.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "BulkRestoreObjectsRequest": {
+ "id": "BulkRestoreObjectsRequest",
+ "type": "object",
+ "description": "A bulk restore objects request.",
+ "properties": {
+ "allowOverwrite": {
+ "type": "boolean",
+ "description": "If false (default), the restore will not overwrite live objects with the same name at the destination. This means some deleted objects may be skipped. If true, live objects will be overwritten resulting in a noncurrent object (if versioning is enabled). If versioning is not enabled, overwriting the object will result in a soft-deleted object. In either case, if a noncurrent object already exists with the same name, a live version can be written without issue."
+ },
+ "softDeletedAfterTime": {
+ "type": "string",
+ "description": "Restores only the objects that were soft-deleted after this time.",
+ "format": "date-time"
+ },
+ "softDeletedBeforeTime": {
+ "type": "string",
+ "description": "Restores only the objects that were soft-deleted before this time.",
+ "format": "date-time"
+ },
+ "matchGlobs": {
+ "type": "array",
+ "description": "Restores only the objects matching any of the specified glob(s). If this parameter is not specified, all objects will be restored within the specified time range.",
+ "items": {
+ "type": "string"
+ }
+ },
+ "copySourceAcl": {
+ "type": "boolean",
+ "description": "If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false."
+ }
+ }
+ }
+ },
+ "resources": {
+ "bucketAccessControls": {
+ "methods": {
+ "delete": {
+ "id": "storage.bucketAccessControls.delete",
+ "path": "b/{bucket}/acl/{entity}",
+ "httpMethod": "DELETE",
+ "description": "Permanently deletes the ACL entry for the specified entity on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket",
+ "entity"
+ ],
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "get": {
+ "id": "storage.bucketAccessControls.get",
+ "path": "b/{bucket}/acl/{entity}",
+ "httpMethod": "GET",
+ "description": "Returns the ACL entry for the specified entity on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket",
+ "entity"
+ ],
+ "response": {
+ "$ref": "BucketAccessControl"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "insert": {
+ "id": "storage.bucketAccessControls.insert",
+ "path": "b/{bucket}/acl",
+ "httpMethod": "POST",
+ "description": "Creates a new ACL entry on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket"
+ ],
+ "request": {
+ "$ref": "BucketAccessControl"
+ },
+ "response": {
+ "$ref": "BucketAccessControl"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "list": {
+ "id": "storage.bucketAccessControls.list",
+ "path": "b/{bucket}/acl",
+ "httpMethod": "GET",
+ "description": "Retrieves ACL entries on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket"
+ ],
+ "response": {
+ "$ref": "BucketAccessControls"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "patch": {
+ "id": "storage.bucketAccessControls.patch",
+ "path": "b/{bucket}/acl/{entity}",
+ "httpMethod": "PATCH",
+ "description": "Patches an ACL entry on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket",
+ "entity"
+ ],
+ "request": {
+ "$ref": "BucketAccessControl"
+ },
+ "response": {
+ "$ref": "BucketAccessControl"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "update": {
+ "id": "storage.bucketAccessControls.update",
+ "path": "b/{bucket}/acl/{entity}",
+ "httpMethod": "PUT",
+ "description": "Updates an ACL entry on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket",
+ "entity"
+ ],
+ "request": {
+ "$ref": "BucketAccessControl"
+ },
+ "response": {
+ "$ref": "BucketAccessControl"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ }
+ }
+ },
+ "buckets": {
+ "methods": {
+ "delete": {
+ "id": "storage.buckets.delete",
+ "path": "b/{bucket}",
+ "httpMethod": "DELETE",
+ "description": "Permanently deletes an empty bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "If set, only deletes the bucket if its metageneration matches this value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "If set, only deletes the bucket if its metageneration does not match this value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket"
+ ],
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "get": {
+ "id": "storage.buckets.get",
+ "path": "b/{bucket}",
+ "httpMethod": "GET",
+ "description": "Returns metadata for the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to noAcl.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit owner, acl and defaultObjectAcl properties."
+ ],
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket"
+ ],
+ "response": {
+ "$ref": "Bucket"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "getIamPolicy": {
+ "id": "storage.buckets.getIamPolicy",
+ "path": "b/{bucket}/iam",
+ "httpMethod": "GET",
+ "description": "Returns an IAM policy for the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "optionsRequestedPolicyVersion": {
+ "type": "integer",
+ "description": "The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.",
+ "format": "int32",
+ "minimum": "1",
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
}
},
- "etag": {
- "type": "string",
- "description": "HTTP 1.1 Entity tag for the object."
+ "parameterOrder": [
+ "bucket"
+ ],
+ "response": {
+ "$ref": "Policy"
},
- "eventBasedHold": {
- "type": "boolean",
- "description": "Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false."
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "insert": {
+ "id": "storage.buckets.insert",
+ "path": "b",
+ "httpMethod": "POST",
+ "description": "Creates a new bucket.",
+ "parameters": {
+ "predefinedAcl": {
+ "type": "string",
+ "description": "Apply a predefined set of access controls to this bucket.",
+ "enum": [
+ "authenticatedRead",
+ "private",
+ "projectPrivate",
+ "publicRead",
+ "publicReadWrite"
+ ],
+ "enumDescriptions": [
+ "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.",
+ "Project team owners get OWNER access.",
+ "Project team members get access according to their roles.",
+ "Project team owners get OWNER access, and allUsers get READER access.",
+ "Project team owners get OWNER access, and allUsers get WRITER access."
+ ],
+ "location": "query"
+ },
+ "predefinedDefaultObjectAcl": {
+ "type": "string",
+ "description": "Apply a predefined set of default object access controls to this bucket.",
+ "enum": [
+ "authenticatedRead",
+ "bucketOwnerFullControl",
+ "bucketOwnerRead",
+ "private",
+ "projectPrivate",
+ "publicRead"
+ ],
+ "enumDescriptions": [
+ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
+ "Object owner gets OWNER access, and project team owners get OWNER access.",
+ "Object owner gets OWNER access, and project team owners get READER access.",
+ "Object owner gets OWNER access.",
+ "Object owner gets OWNER access, and project team members get access according to their roles.",
+ "Object owner gets OWNER access, and allUsers get READER access."
+ ],
+ "location": "query"
+ },
+ "project": {
+ "type": "string",
+ "description": "A valid API project identifier.",
+ "required": true,
+ "location": "query"
+ },
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit owner, acl and defaultObjectAcl properties."
+ ],
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request.",
+ "location": "query"
+ },
+ "enableObjectRetention": {
+ "type": "boolean",
+ "description": "When set to true, object retention is enabled for this bucket.",
+ "default": "false",
+ "location": "query"
+ }
},
- "generation": {
- "type": "string",
- "description": "The content generation of this object. Used for object versioning.",
- "format": "int64"
+ "parameterOrder": [
+ "project"
+ ],
+ "request": {
+ "$ref": "Bucket"
},
- "id": {
- "type": "string",
- "description": "The ID of the object, including the bucket name, object name, and generation number."
+ "response": {
+ "$ref": "Bucket"
},
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For objects, this is always storage#object.",
- "default": "storage#object"
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "list": {
+ "id": "storage.buckets.list",
+ "path": "b",
+ "httpMethod": "GET",
+ "description": "Retrieves a list of buckets for a given project.",
+ "parameters": {
+ "maxResults": {
+ "type": "integer",
+ "description": "Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.",
+ "default": "1000",
+ "format": "uint32",
+ "minimum": "0",
+ "location": "query"
+ },
+ "pageToken": {
+ "type": "string",
+ "description": "A previously-returned page token representing part of the larger set of results to view.",
+ "location": "query"
+ },
+ "prefix": {
+ "type": "string",
+ "description": "Filter results to buckets whose names begin with this prefix.",
+ "location": "query"
+ },
+ "project": {
+ "type": "string",
+ "description": "A valid API project identifier.",
+ "required": true,
+ "location": "query"
+ },
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to noAcl.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit owner, acl and defaultObjectAcl properties."
+ ],
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request.",
+ "location": "query"
+ }
},
- "kmsKeyName": {
- "type": "string",
- "description": "Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request."
+ "parameterOrder": [
+ "project"
+ ],
+ "response": {
+ "$ref": "Buckets"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "lockRetentionPolicy": {
+ "id": "storage.buckets.lockRetentionPolicy",
+ "path": "b/{bucket}/lockRetentionPolicy",
+ "httpMethod": "POST",
+ "description": "Locks retention policy on a bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether bucket's current metageneration matches the given value.",
+ "required": true,
+ "format": "int64",
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "md5Hash": {
- "type": "string",
- "description": "MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices."
+ "parameterOrder": [
+ "bucket",
+ "ifMetagenerationMatch"
+ ],
+ "response": {
+ "$ref": "Bucket"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "patch": {
+ "id": "storage.buckets.patch",
+ "path": "b/{bucket}",
+ "httpMethod": "PATCH",
+ "description": "Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "predefinedAcl": {
+ "type": "string",
+ "description": "Apply a predefined set of access controls to this bucket.",
+ "enum": [
+ "authenticatedRead",
+ "private",
+ "projectPrivate",
+ "publicRead",
+ "publicReadWrite"
+ ],
+ "enumDescriptions": [
+ "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.",
+ "Project team owners get OWNER access.",
+ "Project team members get access according to their roles.",
+ "Project team owners get OWNER access, and allUsers get READER access.",
+ "Project team owners get OWNER access, and allUsers get WRITER access."
+ ],
+ "location": "query"
+ },
+ "predefinedDefaultObjectAcl": {
+ "type": "string",
+ "description": "Apply a predefined set of default object access controls to this bucket.",
+ "enum": [
+ "authenticatedRead",
+ "bucketOwnerFullControl",
+ "bucketOwnerRead",
+ "private",
+ "projectPrivate",
+ "publicRead"
+ ],
+ "enumDescriptions": [
+ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
+ "Object owner gets OWNER access, and project team owners get OWNER access.",
+ "Object owner gets OWNER access, and project team owners get READER access.",
+ "Object owner gets OWNER access.",
+ "Object owner gets OWNER access, and project team members get access according to their roles.",
+ "Object owner gets OWNER access, and allUsers get READER access."
+ ],
+ "location": "query"
+ },
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to full.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit owner, acl and defaultObjectAcl properties."
+ ],
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "mediaLink": {
- "type": "string",
- "description": "Media download link."
+ "parameterOrder": [
+ "bucket"
+ ],
+ "request": {
+ "$ref": "Bucket"
},
- "metadata": {
- "type": "object",
- "description": "User-provided metadata, in key/value pairs.",
- "additionalProperties": {
+ "response": {
+ "$ref": "Bucket"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "setIamPolicy": {
+ "id": "storage.buckets.setIamPolicy",
+ "path": "b/{bucket}/iam",
+ "httpMethod": "PUT",
+ "description": "Updates an IAM policy for the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
"type": "string",
- "description": "An individual metadata entry."
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
}
},
- "metageneration": {
- "type": "string",
- "description": "The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.",
- "format": "int64"
+ "parameterOrder": [
+ "bucket"
+ ],
+ "request": {
+ "$ref": "Policy"
},
- "name": {
- "type": "string",
- "description": "The name of the object. Required if not specified by URL parameter."
+ "response": {
+ "$ref": "Policy"
},
- "owner": {
- "type": "object",
- "description": "The owner of the object. This will always be the uploader of the object.",
- "properties": {
- "entity": {
- "type": "string",
- "description": "The entity, in the form user-userId."
- },
- "entityId": {
- "type": "string",
- "description": "The ID for the entity."
- }
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "testIamPermissions": {
+ "id": "storage.buckets.testIamPermissions",
+ "path": "b/{bucket}/iam/testPermissions",
+ "httpMethod": "GET",
+ "description": "Tests a set of permissions on the given bucket to see which, if any, are held by the caller.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "permissions": {
+ "type": "string",
+ "description": "Permissions to test.",
+ "required": true,
+ "repeated": true,
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
}
},
- "retentionExpirationTime": {
- "type": "string",
- "description": "A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).",
- "format": "date-time"
+ "parameterOrder": [
+ "bucket",
+ "permissions"
+ ],
+ "response": {
+ "$ref": "TestIamPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "update": {
+ "id": "storage.buckets.update",
+ "path": "b/{bucket}",
+ "httpMethod": "PUT",
+ "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "predefinedAcl": {
+ "type": "string",
+ "description": "Apply a predefined set of access controls to this bucket.",
+ "enum": [
+ "authenticatedRead",
+ "private",
+ "projectPrivate",
+ "publicRead",
+ "publicReadWrite"
+ ],
+ "enumDescriptions": [
+ "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.",
+ "Project team owners get OWNER access.",
+ "Project team members get access according to their roles.",
+ "Project team owners get OWNER access, and allUsers get READER access.",
+ "Project team owners get OWNER access, and allUsers get WRITER access."
+ ],
+ "location": "query"
+ },
+ "predefinedDefaultObjectAcl": {
+ "type": "string",
+ "description": "Apply a predefined set of default object access controls to this bucket.",
+ "enum": [
+ "authenticatedRead",
+ "bucketOwnerFullControl",
+ "bucketOwnerRead",
+ "private",
+ "projectPrivate",
+ "publicRead"
+ ],
+ "enumDescriptions": [
+ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
+ "Object owner gets OWNER access, and project team owners get OWNER access.",
+ "Object owner gets OWNER access, and project team owners get READER access.",
+ "Object owner gets OWNER access.",
+ "Object owner gets OWNER access, and project team members get access according to their roles.",
+ "Object owner gets OWNER access, and allUsers get READER access."
+ ],
+ "location": "query"
+ },
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to full.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit owner, acl and defaultObjectAcl properties."
+ ],
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "selfLink": {
- "type": "string",
- "description": "The link to this object."
+ "parameterOrder": [
+ "bucket"
+ ],
+ "request": {
+ "$ref": "Bucket"
},
- "size": {
- "type": "string",
- "description": "Content-Length of the data in bytes.",
- "format": "uint64"
+ "response": {
+ "$ref": "Bucket"
},
- "storageClass": {
- "type": "string",
- "description": "Storage class of the object."
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ }
+ }
+ },
+ "operations": {
+ "methods": {
+ "cancel": {
+ "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.",
+ "path": "b/{bucket}/operations/{operationId}/cancel",
+ "httpMethod": "POST",
+ "id": "storage.buckets.operations.cancel",
+ "parameterOrder": [
+ "bucket",
+ "operationId"
+ ],
+ "parameters": {
+ "bucket": {
+ "description": "The parent bucket of the operation resource.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "operationId": {
+ "description": "The ID of the operation resource.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
},
- "temporaryHold": {
- "type": "boolean",
- "description": "Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object."
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "get": {
+ "description": "Gets the latest state of a long-running operation.",
+ "path": "b/{bucket}/operations/{operationId}",
+ "httpMethod": "GET",
+ "id": "storage.buckets.operations.get",
+ "parameterOrder": [
+ "bucket",
+ "operationId"
+ ],
+ "parameters": {
+ "bucket": {
+ "description": "The parent bucket of the operation resource.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "operationId": {
+ "description": "The ID of the operation resource.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ }
},
- "timeCreated": {
- "type": "string",
- "description": "The creation time of the object in RFC 3339 format.",
- "format": "date-time"
+ "response": {
+ "$ref": "GoogleLongrunningOperation"
},
- "timeDeleted": {
- "type": "string",
- "description": "The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.",
- "format": "date-time"
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "list": {
+ "description": "Lists operations that match the specified filter in the request.",
+ "path": "b/{bucket}/operations",
+ "httpMethod": "GET",
+ "id": "storage.buckets.operations.list",
+ "parameterOrder": [
+ "bucket"
+ ],
+ "parameters": {
+ "filter": {
+ "description": "A filter to narrow down results to a preferred subset. The filtering language is documented in more detail in [AIP-160](https://google.aip.dev/160).",
+ "location": "query",
+ "type": "string"
+ },
+ "bucket": {
+ "description": "Name of the bucket in which to look for operations.",
+ "location": "path",
+ "required": true,
+ "type": "string"
+ },
+ "pageSize": {
+ "description": "Maximum number of items to return in a single page of responses. Fewer total results may be returned than requested. The service uses this parameter or 100 items, whichever is smaller.",
+ "minimum": "0",
+ "format": "int32",
+ "location": "query",
+ "type": "integer"
+ },
+ "pageToken": {
+ "description": "A previously-returned page token representing part of the larger set of results to view.",
+ "location": "query",
+ "type": "string"
+ }
},
- "timeStorageClassUpdated": {
- "type": "string",
- "description": "The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.",
- "format": "date-time"
+ "response": {
+ "$ref": "GoogleLongrunningListOperationsResponse"
},
- "updated": {
- "type": "string",
- "description": "The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration.",
- "format": "date-time"
- }
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
}
- },
- "ObjectAccessControl": {
- "id": "ObjectAccessControl",
- "type": "object",
- "description": "An access-control entry.",
- "properties": {
- "bucket": {
- "type": "string",
- "description": "The name of the bucket."
- },
- "domain": {
- "type": "string",
- "description": "The domain associated with the entity, if any."
+ }
+ },
+ "channels": {
+ "methods": {
+ "stop": {
+ "id": "storage.channels.stop",
+ "path": "channels/stop",
+ "httpMethod": "POST",
+ "description": "Stop watching resources through this channel",
+ "request": {
+ "$ref": "Channel",
+ "parameterName": "resource"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ }
+ }
+ },
+ "defaultObjectAccessControls": {
+ "methods": {
+ "delete": {
+ "id": "storage.defaultObjectAccessControls.delete",
+ "path": "b/{bucket}/defaultObjectAcl/{entity}",
+ "httpMethod": "DELETE",
+ "description": "Permanently deletes the default object ACL entry for the specified entity on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "email": {
- "type": "string",
- "description": "The email address associated with the entity, if any."
+ "parameterOrder": [
+ "bucket",
+ "entity"
+ ],
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "get": {
+ "id": "storage.defaultObjectAccessControls.get",
+ "path": "b/{bucket}/defaultObjectAcl/{entity}",
+ "httpMethod": "GET",
+ "description": "Returns the default object ACL entry for the specified entity on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "entity": {
- "type": "string",
- "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.",
- "annotations": {
- "required": [
- "storage.defaultObjectAccessControls.insert",
- "storage.objectAccessControls.insert"
- ]
+ "parameterOrder": [
+ "bucket",
+ "entity"
+ ],
+ "response": {
+ "$ref": "ObjectAccessControl"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "insert": {
+ "id": "storage.defaultObjectAccessControls.insert",
+ "path": "b/{bucket}/defaultObjectAcl",
+ "httpMethod": "POST",
+ "description": "Creates a new default object ACL entry on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
}
},
- "entityId": {
- "type": "string",
- "description": "The ID for the entity, if any."
+ "parameterOrder": [
+ "bucket"
+ ],
+ "request": {
+ "$ref": "ObjectAccessControl"
},
- "etag": {
- "type": "string",
- "description": "HTTP 1.1 Entity tag for the access-control entry."
+ "response": {
+ "$ref": "ObjectAccessControl"
},
- "generation": {
- "type": "string",
- "description": "The content generation of the object, if applied to an object.",
- "format": "int64"
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "list": {
+ "id": "storage.defaultObjectAccessControls.list",
+ "path": "b/{bucket}/defaultObjectAcl",
+ "httpMethod": "GET",
+ "description": "Retrieves default object ACL entries on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "If present, only return default ACL listing if the bucket's current metageneration matches this value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "If present, only return default ACL listing if the bucket's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "id": {
- "type": "string",
- "description": "The ID of the access-control entry."
+ "parameterOrder": [
+ "bucket"
+ ],
+ "response": {
+ "$ref": "ObjectAccessControls"
},
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For object access control entries, this is always storage#objectAccessControl.",
- "default": "storage#objectAccessControl"
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "patch": {
+ "id": "storage.defaultObjectAccessControls.patch",
+ "path": "b/{bucket}/defaultObjectAcl/{entity}",
+ "httpMethod": "PATCH",
+ "description": "Patches a default object ACL entry on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "object": {
- "type": "string",
- "description": "The name of the object, if applied to an object."
+ "parameterOrder": [
+ "bucket",
+ "entity"
+ ],
+ "request": {
+ "$ref": "ObjectAccessControl"
},
- "projectTeam": {
- "type": "object",
- "description": "The project team associated with the entity, if any.",
- "properties": {
- "projectNumber": {
- "type": "string",
- "description": "The project number."
- },
- "team": {
- "type": "string",
- "description": "The team."
- }
- }
+ "response": {
+ "$ref": "ObjectAccessControl"
},
- "role": {
- "type": "string",
- "description": "The access permission for the entity.",
- "annotations": {
- "required": [
- "storage.defaultObjectAccessControls.insert",
- "storage.objectAccessControls.insert"
- ]
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "update": {
+ "id": "storage.defaultObjectAccessControls.update",
+ "path": "b/{bucket}/defaultObjectAcl/{entity}",
+ "httpMethod": "PUT",
+ "description": "Updates a default object ACL entry on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
}
},
- "selfLink": {
- "type": "string",
- "description": "The link to this access-control entry."
- }
- }
- },
- "ObjectAccessControls": {
- "id": "ObjectAccessControls",
- "type": "object",
- "description": "An access-control list.",
- "properties": {
- "items": {
- "type": "array",
- "description": "The list of items.",
- "items": {
- "$ref": "ObjectAccessControl"
- }
+ "parameterOrder": [
+ "bucket",
+ "entity"
+ ],
+ "request": {
+ "$ref": "ObjectAccessControl"
},
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls.",
- "default": "storage#objectAccessControls"
- }
+ "response": {
+ "$ref": "ObjectAccessControl"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
}
- },
- "Objects": {
- "id": "Objects",
- "type": "object",
- "description": "A list of objects.",
- "properties": {
- "items": {
- "type": "array",
- "description": "The list of items.",
- "items": {
- "$ref": "Object"
+ }
+ },
+ "managedFolders": {
+ "methods": {
+ "delete": {
+ "id": "storage.managedFolders.delete",
+ "path": "b/{bucket}/managedFolders/{managedFolder}",
+ "httpMethod": "DELETE",
+ "description": "Permanently deletes a managed folder.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket containing the managed folder.",
+ "required": true,
+ "location": "path"
+ },
+ "managedFolder": {
+ "type": "string",
+ "description": "The managed folder name/path.",
+ "required": true,
+ "location": "path"
+ },
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "If set, only deletes the managed folder if its metageneration matches this value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "If set, only deletes the managed folder if its metageneration does not match this value.",
+ "format": "int64",
+ "location": "query"
}
},
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For lists of objects, this is always storage#objects.",
- "default": "storage#objects"
- },
- "nextPageToken": {
- "type": "string",
- "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results."
- },
- "prefixes": {
- "type": "array",
- "description": "The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.",
- "items": {
- "type": "string"
+ "parameterOrder": [
+ "bucket",
+ "managedFolder"
+ ],
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "get": {
+ "id": "storage.managedFolders.get",
+ "path": "b/{bucket}/managedFolders/{managedFolder}",
+ "httpMethod": "GET",
+ "description": "Returns metadata of the specified managed folder.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket containing the managed folder.",
+ "required": true,
+ "location": "path"
+ },
+ "managedFolder": {
+ "type": "string",
+ "description": "The managed folder name/path.",
+ "required": true,
+ "location": "path"
+ },
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
}
- }
- }
- },
- "Policy": {
- "id": "Policy",
- "type": "object",
- "description": "A bucket/object IAM policy.",
- "properties": {
- "bindings": {
- "type": "array",
- "description": "An association between a role, which comes with a set of permissions, and members who may assume that role.",
- "items": {
- "type": "object",
- "properties": {
- "condition": {
- "$ref": "Expr",
- "description": "The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently."
- },
- "members": {
- "type": "array",
- "description": "A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: \n- allUsers \u2014 A special identifier that represents anyone on the internet; with or without a Google account. \n- allAuthenticatedUsers \u2014 A special identifier that represents anyone who is authenticated with a Google account or a service account. \n- user:emailid \u2014 An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. \n- serviceAccount:emailid \u2014 An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . \n- group:emailid \u2014 An email address that represents a Google group. For example, group:admins@example.com. \n- domain:domain \u2014 A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. \n- projectOwner:projectid \u2014 Owners of the given project. For example, projectOwner:my-example-project \n- projectEditor:projectid \u2014 Editors of the given project. For example, projectEditor:my-example-project \n- projectViewer:projectid \u2014 Viewers of the given project. For example, projectViewer:my-example-project",
- "items": {
- "type": "string"
- },
- "annotations": {
- "required": [
- "storage.buckets.setIamPolicy",
- "storage.objects.setIamPolicy"
- ]
- }
- },
- "role": {
- "type": "string",
- "description": "The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole.\nThe new IAM roles are: \n- roles/storage.admin \u2014 Full control of Google Cloud Storage resources. \n- roles/storage.objectViewer \u2014 Read-Only access to Google Cloud Storage objects. \n- roles/storage.objectCreator \u2014 Access to create objects in Google Cloud Storage. \n- roles/storage.objectAdmin \u2014 Full control of Google Cloud Storage objects. The legacy IAM roles are: \n- roles/storage.legacyObjectReader \u2014 Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. \n- roles/storage.legacyObjectOwner \u2014 Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. \n- roles/storage.legacyBucketReader \u2014 Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. \n- roles/storage.legacyBucketWriter \u2014 Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. \n- roles/storage.legacyBucketOwner \u2014 Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role.",
- "annotations": {
- "required": [
- "storage.buckets.setIamPolicy",
- "storage.objects.setIamPolicy"
- ]
- }
- }
- }
+ },
+ "parameterOrder": [
+ "bucket",
+ "managedFolder"
+ ],
+ "response": {
+ "$ref": "ManagedFolder"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "getIamPolicy": {
+ "id": "storage.managedFolders.getIamPolicy",
+ "path": "b/{bucket}/managedFolders/{managedFolder}/iam",
+ "httpMethod": "GET",
+ "description": "Returns an IAM policy for the specified managed folder.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket containing the managed folder.",
+ "required": true,
+ "location": "path"
+ },
+ "optionsRequestedPolicyVersion": {
+ "type": "integer",
+ "description": "The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.",
+ "format": "int32",
+ "minimum": "1",
+ "location": "query"
+ },
+ "managedFolder": {
+ "type": "string",
+ "description": "The managed folder name/path.",
+ "required": true,
+ "location": "path"
},
- "annotations": {
- "required": [
- "storage.buckets.setIamPolicy",
- "storage.objects.setIamPolicy"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket",
+ "managedFolder"
+ ],
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "insert": {
+ "id": "storage.managedFolders.insert",
+ "path": "b/{bucket}/managedFolders",
+ "httpMethod": "POST",
+ "description": "Creates a new managed folder.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket containing the managed folder.",
+ "required": true,
+ "location": "path"
}
},
- "etag": {
- "type": "string",
- "description": "HTTP 1.1 Entity tag for the policy.",
- "format": "byte"
+ "parameterOrder": [
+ "bucket"
+ ],
+ "request": {
+ "$ref": "ManagedFolder"
},
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.",
- "default": "storage#policy"
+ "response": {
+ "$ref": "ManagedFolder"
},
- "resourceId": {
- "type": "string",
- "description": "The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input."
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "list": {
+ "id": "storage.managedFolders.list",
+ "path": "b/{bucket}/managedFolders",
+ "httpMethod": "GET",
+ "description": "Lists managed folders in the given bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket containing the managed folder.",
+ "required": true,
+ "location": "path"
+ },
+ "pageSize": {
+ "type": "integer",
+ "description": "Maximum number of items return in a single page of responses.",
+ "format": "int32",
+ "minimum": "0",
+ "location": "query"
+ },
+ "pageToken": {
+ "type": "string",
+ "description": "A previously-returned page token representing part of the larger set of results to view.",
+ "location": "query"
+ },
+ "prefix": {
+ "type": "string",
+ "description": "The managed folder name/path prefix to filter the output list of results.",
+ "location": "query"
+ }
},
- "version": {
- "type": "integer",
- "description": "The IAM policy format version.",
- "format": "int32"
- }
- }
- },
- "RewriteResponse": {
- "id": "RewriteResponse",
- "type": "object",
- "description": "A rewrite response.",
- "properties": {
- "done": {
- "type": "boolean",
- "description": "true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response."
- },
- "kind": {
- "type": "string",
- "description": "The kind of item this is.",
- "default": "storage#rewriteResponse"
+ "parameterOrder": [
+ "bucket"
+ ],
+ "response": {
+ "$ref": "ManagedFolders"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "setIamPolicy": {
+ "id": "storage.managedFolders.setIamPolicy",
+ "path": "b/{bucket}/managedFolders/{managedFolder}/iam",
+ "httpMethod": "PUT",
+ "description": "Updates an IAM policy for the specified managed folder.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket containing the managed folder.",
+ "required": true,
+ "location": "path"
+ },
+ "managedFolder": {
+ "type": "string",
+ "description": "The managed folder name/path.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "objectSize": {
- "type": "string",
- "description": "The total size of the object being copied in bytes. This property is always present in the response.",
- "format": "int64"
+ "parameterOrder": [
+ "bucket",
+ "managedFolder"
+ ],
+ "request": {
+ "$ref": "Policy"
},
- "resource": {
- "$ref": "Object",
- "description": "A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes."
+ "response": {
+ "$ref": "Policy"
},
- "rewriteToken": {
- "type": "string",
- "description": "A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy."
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "testIamPermissions": {
+ "id": "storage.managedFolders.testIamPermissions",
+ "path": "b/{bucket}/managedFolders/{managedFolder}/iam/testPermissions",
+ "httpMethod": "GET",
+ "description": "Tests a set of permissions on the given managed folder to see which, if any, are held by the caller.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket containing the managed folder.",
+ "required": true,
+ "location": "path"
+ },
+ "managedFolder": {
+ "type": "string",
+ "description": "The managed folder name/path.",
+ "required": true,
+ "location": "path"
+ },
+ "permissions": {
+ "type": "string",
+ "description": "Permissions to test.",
+ "required": true,
+ "repeated": true,
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "totalBytesRewritten": {
- "type": "string",
- "description": "The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response.",
- "format": "int64"
- }
+ "parameterOrder": [
+ "bucket",
+ "managedFolder",
+ "permissions"
+ ],
+ "response": {
+ "$ref": "TestIamPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
}
- },
- "ServiceAccount": {
- "id": "ServiceAccount",
- "type": "object",
- "description": "A subscription to receive Google PubSub notifications.",
- "properties": {
- "email_address": {
- "type": "string",
- "description": "The ID of the notification."
+ }
+ },
+ "notifications": {
+ "methods": {
+ "delete": {
+ "id": "storage.notifications.delete",
+ "path": "b/{bucket}/notificationConfigs/{notification}",
+ "httpMethod": "DELETE",
+ "description": "Permanently deletes a notification subscription.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "The parent bucket of the notification.",
+ "required": true,
+ "location": "path"
+ },
+ "notification": {
+ "type": "string",
+ "description": "ID of the notification to delete.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "kind": {
- "type": "string",
- "description": "The kind of item this is. For notifications, this is always storage#notification.",
- "default": "storage#serviceAccount"
- }
- }
- },
- "TestIamPermissionsResponse": {
- "id": "TestIamPermissionsResponse",
- "type": "object",
- "description": "A storage.(buckets|objects).testIamPermissions response.",
- "properties": {
- "kind": {
- "type": "string",
- "description": "The kind of item this is.",
- "default": "storage#testIamPermissionsResponse"
+ "parameterOrder": [
+ "bucket",
+ "notification"
+ ],
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "get": {
+ "id": "storage.notifications.get",
+ "path": "b/{bucket}/notificationConfigs/{notification}",
+ "httpMethod": "GET",
+ "description": "View a notification configuration.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "The parent bucket of the notification.",
+ "required": true,
+ "location": "path"
+ },
+ "notification": {
+ "type": "string",
+ "description": "Notification ID",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "permissions": {
- "type": "array",
- "description": "The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets or objects. The supported permissions are as follows: \n- storage.buckets.delete \u2014 Delete bucket. \n- storage.buckets.get \u2014 Read bucket metadata. \n- storage.buckets.getIamPolicy \u2014 Read bucket IAM policy. \n- storage.buckets.create \u2014 Create bucket. \n- storage.buckets.list \u2014 List buckets. \n- storage.buckets.setIamPolicy \u2014 Update bucket IAM policy. \n- storage.buckets.update \u2014 Update bucket metadata. \n- storage.objects.delete \u2014 Delete object. \n- storage.objects.get \u2014 Read object data and metadata. \n- storage.objects.getIamPolicy \u2014 Read object IAM policy. \n- storage.objects.create \u2014 Create object. \n- storage.objects.list \u2014 List objects. \n- storage.objects.setIamPolicy \u2014 Update object IAM policy. \n- storage.objects.update \u2014 Update object metadata.",
- "items": {
- "type": "string"
+ "parameterOrder": [
+ "bucket",
+ "notification"
+ ],
+ "response": {
+ "$ref": "Notification"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "insert": {
+ "id": "storage.notifications.insert",
+ "path": "b/{bucket}/notificationConfigs",
+ "httpMethod": "POST",
+ "description": "Creates a notification subscription for a given bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "The parent bucket of the notification.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
}
- }
+ },
+ "parameterOrder": [
+ "bucket"
+ ],
+ "request": {
+ "$ref": "Notification"
+ },
+ "response": {
+ "$ref": "Notification"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "list": {
+ "id": "storage.notifications.list",
+ "path": "b/{bucket}/notificationConfigs",
+ "httpMethod": "GET",
+ "description": "Retrieves a list of notification subscriptions for a given bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a Google Cloud Storage bucket.",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket"
+ ],
+ "response": {
+ "$ref": "Notifications"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
}
}
},
- "resources": {
- "bucketAccessControls": {
- "methods": {
- "delete": {
- "id": "storage.bucketAccessControls.delete",
- "path": "b/{bucket}/acl/{entity}",
- "httpMethod": "DELETE",
- "description": "Permanently deletes the ACL entry for the specified entity on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
+ "objectAccessControls": {
+ "methods": {
+ "delete": {
+ "id": "storage.objectAccessControls.delete",
+ "path": "b/{bucket}/o/{object}/acl/{entity}",
+ "httpMethod": "DELETE",
+ "description": "Permanently deletes the ACL entry for the specified entity on the specified object.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "generation": {
+ "type": "string",
+ "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
+ },
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "get": {
- "id": "storage.bucketAccessControls.get",
- "path": "b/{bucket}/acl/{entity}",
- "httpMethod": "GET",
- "description": "Returns the ACL entry for the specified entity on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
+ "parameterOrder": [
+ "bucket",
+ "object",
+ "entity"
+ ],
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "get": {
+ "id": "storage.objectAccessControls.get",
+ "path": "b/{bucket}/o/{object}/acl/{entity}",
+ "httpMethod": "GET",
+ "description": "Returns the ACL entry for the specified entity on the specified object.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "response": {
- "$ref": "BucketAccessControl"
+ "generation": {
+ "type": "string",
+ "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "insert": {
- "id": "storage.bucketAccessControls.insert",
- "path": "b/{bucket}/acl",
- "httpMethod": "POST",
- "description": "Creates a new ACL entry on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket",
+ "object",
+ "entity"
+ ],
+ "response": {
+ "$ref": "ObjectAccessControl"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "insert": {
+ "id": "storage.objectAccessControls.insert",
+ "path": "b/{bucket}/o/{object}/acl",
+ "httpMethod": "POST",
+ "description": "Creates a new ACL entry on the specified object.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "bucket"
- ],
- "request": {
- "$ref": "BucketAccessControl"
+ "generation": {
+ "type": "string",
+ "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "BucketAccessControl"
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "list": {
- "id": "storage.bucketAccessControls.list",
- "path": "b/{bucket}/acl",
- "httpMethod": "GET",
- "description": "Retrieves ACL entries on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
+ "parameterOrder": [
+ "bucket",
+ "object"
+ ],
+ "request": {
+ "$ref": "ObjectAccessControl"
+ },
+ "response": {
+ "$ref": "ObjectAccessControl"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "list": {
+ "id": "storage.objectAccessControls.list",
+ "path": "b/{bucket}/o/{object}/acl",
+ "httpMethod": "GET",
+ "description": "Retrieves ACL entries on the specified object.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "generation": {
+ "type": "string",
+ "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket"
- ],
- "response": {
- "$ref": "BucketAccessControls"
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "patch": {
- "id": "storage.bucketAccessControls.patch",
- "path": "b/{bucket}/acl/{entity}",
- "httpMethod": "PATCH",
- "description": "Patches an ACL entry on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
+ "parameterOrder": [
+ "bucket",
+ "object"
+ ],
+ "response": {
+ "$ref": "ObjectAccessControls"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "patch": {
+ "id": "storage.objectAccessControls.patch",
+ "path": "b/{bucket}/o/{object}/acl/{entity}",
+ "httpMethod": "PATCH",
+ "description": "Patches an ACL entry on the specified object.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "request": {
- "$ref": "BucketAccessControl"
+ "generation": {
+ "type": "string",
+ "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "BucketAccessControl"
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "update": {
- "id": "storage.bucketAccessControls.update",
- "path": "b/{bucket}/acl/{entity}",
- "httpMethod": "PUT",
- "description": "Updates an ACL entry on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
+ "parameterOrder": [
+ "bucket",
+ "object",
+ "entity"
+ ],
+ "request": {
+ "$ref": "ObjectAccessControl"
+ },
+ "response": {
+ "$ref": "ObjectAccessControl"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "update": {
+ "id": "storage.objectAccessControls.update",
+ "path": "b/{bucket}/o/{object}/acl/{entity}",
+ "httpMethod": "PUT",
+ "description": "Updates an ACL entry on the specified object.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of a bucket.",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "entity": {
+ "type": "string",
+ "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "request": {
- "$ref": "BucketAccessControl"
+ "generation": {
+ "type": "string",
+ "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "BucketAccessControl"
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- }
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket",
+ "object",
+ "entity"
+ ],
+ "request": {
+ "$ref": "ObjectAccessControl"
+ },
+ "response": {
+ "$ref": "ObjectAccessControl"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
}
- },
- "buckets": {
- "methods": {
- "delete": {
- "id": "storage.buckets.delete",
- "path": "b/{bucket}",
- "httpMethod": "DELETE",
- "description": "Permanently deletes an empty bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "If set, only deletes the bucket if its metageneration matches this value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "If set, only deletes the bucket if its metageneration does not match this value.",
- "format": "int64",
- "location": "query"
+ }
+ },
+ "objects": {
+ "methods": {
+ "compose": {
+ "id": "storage.objects.compose",
+ "path": "b/{destinationBucket}/o/{destinationObject}/compose",
+ "httpMethod": "POST",
+ "description": "Concatenates a list of existing objects into a new object in the same bucket.",
+ "parameters": {
+ "destinationBucket": {
+ "type": "string",
+ "description": "Name of the bucket containing the source objects. The destination object is stored in this bucket.",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "destinationObject": {
+ "type": "string",
+ "description": "Name of the new object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "bucket"
- ],
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
- },
- "get": {
- "id": "storage.buckets.get",
- "path": "b/{bucket}",
- "httpMethod": "GET",
- "description": "Returns metadata for the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit owner, acl and defaultObjectAcl properties."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "destinationPredefinedAcl": {
+ "type": "string",
+ "description": "Apply a predefined set of access controls to the destination object.",
+ "enum": [
+ "authenticatedRead",
+ "bucketOwnerFullControl",
+ "bucketOwnerRead",
+ "private",
+ "projectPrivate",
+ "publicRead"
+ ],
+ "enumDescriptions": [
+ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
+ "Object owner gets OWNER access, and project team owners get OWNER access.",
+ "Object owner gets OWNER access, and project team owners get READER access.",
+ "Object owner gets OWNER access.",
+ "Object owner gets OWNER access, and project team members get access according to their roles.",
+ "Object owner gets OWNER access, and allUsers get READER access."
+ ],
+ "location": "query"
},
- "parameterOrder": [
- "bucket"
- ],
- "response": {
- "$ref": "Bucket"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
- },
- "getIamPolicy": {
- "id": "storage.buckets.getIamPolicy",
- "path": "b/{bucket}/iam",
- "httpMethod": "GET",
- "description": "Returns an IAM policy for the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "optionsRequestedPolicyVersion": {
- "type": "integer",
- "description": "The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.",
- "format": "int32",
- "minimum": "1",
- "location": "query"
+ "ifGenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
+ "format": "int64",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket"
- ],
- "response": {
- "$ref": "Policy"
+ "kmsKeyName": {
+ "type": "string",
+ "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "insert": {
- "id": "storage.buckets.insert",
- "path": "b",
- "httpMethod": "POST",
- "description": "Creates a new bucket.",
- "parameters": {
- "predefinedAcl": {
- "type": "string",
- "description": "Apply a predefined set of access controls to this bucket.",
- "enum": [
- "authenticatedRead",
- "private",
- "projectPrivate",
- "publicRead",
- "publicReadWrite"
- ],
- "enumDescriptions": [
- "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.",
- "Project team owners get OWNER access.",
- "Project team members get access according to their roles.",
- "Project team owners get OWNER access, and allUsers get READER access.",
- "Project team owners get OWNER access, and allUsers get WRITER access."
- ],
- "location": "query"
- },
- "predefinedDefaultObjectAcl": {
- "type": "string",
- "description": "Apply a predefined set of default object access controls to this bucket.",
- "enum": [
- "authenticatedRead",
- "bucketOwnerFullControl",
- "bucketOwnerRead",
- "private",
- "projectPrivate",
- "publicRead"
- ],
- "enumDescriptions": [
- "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
- "Object owner gets OWNER access, and project team owners get OWNER access.",
- "Object owner gets OWNER access, and project team owners get READER access.",
- "Object owner gets OWNER access.",
- "Object owner gets OWNER access, and project team members get access according to their roles.",
- "Object owner gets OWNER access, and allUsers get READER access."
- ],
- "location": "query"
- },
- "project": {
- "type": "string",
- "description": "A valid API project identifier.",
- "required": true,
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit owner, acl and defaultObjectAcl properties."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "project"
- ],
- "request": {
- "$ref": "Bucket"
+ "parameterOrder": [
+ "destinationBucket",
+ "destinationObject"
+ ],
+ "request": {
+ "$ref": "ComposeRequest"
+ },
+ "response": {
+ "$ref": "Object"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "copy": {
+ "id": "storage.objects.copy",
+ "path": "b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}",
+ "httpMethod": "POST",
+ "description": "Copies a source object to a destination object. Optionally overrides metadata.",
+ "parameters": {
+ "destinationBucket": {
+ "type": "string",
+ "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "response": {
- "$ref": "Bucket"
+ "destinationKmsKeyName": {
+ "type": "string",
+ "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
- },
- "list": {
- "id": "storage.buckets.list",
- "path": "b",
- "httpMethod": "GET",
- "description": "Retrieves a list of buckets for a given project.",
- "parameters": {
- "maxResults": {
- "type": "integer",
- "description": "Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.",
- "default": "1000",
- "format": "uint32",
- "minimum": "0",
- "location": "query"
- },
- "pageToken": {
- "type": "string",
- "description": "A previously-returned page token representing part of the larger set of results to view.",
- "location": "query"
- },
- "prefix": {
- "type": "string",
- "description": "Filter results to buckets whose names begin with this prefix.",
- "location": "query"
- },
- "project": {
- "type": "string",
- "description": "A valid API project identifier.",
- "required": true,
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit owner, acl and defaultObjectAcl properties."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request.",
- "location": "query"
- }
+ "destinationObject": {
+ "type": "string",
+ "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "project"
- ],
- "response": {
- "$ref": "Buckets"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
- },
- "lockRetentionPolicy": {
- "id": "storage.buckets.lockRetentionPolicy",
- "path": "b/{bucket}/lockRetentionPolicy",
- "httpMethod": "POST",
- "description": "Locks retention policy on a bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether bucket's current metageneration matches the given value.",
- "required": true,
- "format": "int64",
- "location": "query"
+ "destinationPredefinedAcl": {
+ "type": "string",
+ "description": "Apply a predefined set of access controls to the destination object.",
+ "enum": [
+ "authenticatedRead",
+ "bucketOwnerFullControl",
+ "bucketOwnerRead",
+ "private",
+ "projectPrivate",
+ "publicRead"
+ ],
+ "enumDescriptions": [
+ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
+ "Object owner gets OWNER access, and project team owners get OWNER access.",
+ "Object owner gets OWNER access, and project team owners get READER access.",
+ "Object owner gets OWNER access.",
+ "Object owner gets OWNER access, and project team members get access according to their roles.",
+ "Object owner gets OWNER access, and allUsers get READER access."
+ ],
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "ifGenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "ifMetagenerationMatch"
- ],
- "response": {
- "$ref": "Bucket"
+ "ifGenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
+ "format": "int64",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
- },
- "patch": {
- "id": "storage.buckets.patch",
- "path": "b/{bucket}",
- "httpMethod": "PATCH",
- "description": "Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "predefinedAcl": {
- "type": "string",
- "description": "Apply a predefined set of access controls to this bucket.",
- "enum": [
- "authenticatedRead",
- "private",
- "projectPrivate",
- "publicRead",
- "publicReadWrite"
- ],
- "enumDescriptions": [
- "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.",
- "Project team owners get OWNER access.",
- "Project team members get access according to their roles.",
- "Project team owners get OWNER access, and allUsers get READER access.",
- "Project team owners get OWNER access, and allUsers get WRITER access."
- ],
- "location": "query"
- },
- "predefinedDefaultObjectAcl": {
- "type": "string",
- "description": "Apply a predefined set of default object access controls to this bucket.",
- "enum": [
- "authenticatedRead",
- "bucketOwnerFullControl",
- "bucketOwnerRead",
- "private",
- "projectPrivate",
- "publicRead"
- ],
- "enumDescriptions": [
- "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
- "Object owner gets OWNER access, and project team owners get OWNER access.",
- "Object owner gets OWNER access, and project team owners get READER access.",
- "Object owner gets OWNER access.",
- "Object owner gets OWNER access, and project team members get access according to their roles.",
- "Object owner gets OWNER access, and allUsers get READER access."
- ],
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to full.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit owner, acl and defaultObjectAcl properties."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket"
- ],
- "request": {
- "$ref": "Bucket"
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "Bucket"
+ "ifSourceGenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the source object's current generation matches the given value.",
+ "format": "int64",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "setIamPolicy": {
- "id": "storage.buckets.setIamPolicy",
- "path": "b/{bucket}/iam",
- "httpMethod": "PUT",
- "description": "Updates an IAM policy for the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
+ "ifSourceGenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.",
+ "format": "int64",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "ifSourceMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket"
- ],
- "request": {
- "$ref": "Policy"
+ "ifSourceMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit the owner, acl property."
+ ],
+ "location": "query"
},
- "response": {
- "$ref": "Policy"
+ "sourceBucket": {
+ "type": "string",
+ "description": "Name of the bucket in which to find the source object.",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "testIamPermissions": {
- "id": "storage.buckets.testIamPermissions",
- "path": "b/{bucket}/iam/testPermissions",
- "httpMethod": "GET",
- "description": "Tests a set of permissions on the given bucket to see which, if any, are held by the caller.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "permissions": {
- "type": "string",
- "description": "Permissions to test.",
- "required": true,
- "repeated": true,
- "location": "query"
+ "sourceGeneration": {
+ "type": "string",
+ "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "sourceObject": {
+ "type": "string",
+ "description": "Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "bucket",
- "permissions"
- ],
- "response": {
- "$ref": "TestIamPermissionsResponse"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "update": {
- "id": "storage.buckets.update",
- "path": "b/{bucket}",
- "httpMethod": "PUT",
- "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "predefinedAcl": {
- "type": "string",
- "description": "Apply a predefined set of access controls to this bucket.",
- "enum": [
- "authenticatedRead",
- "private",
- "projectPrivate",
- "publicRead",
- "publicReadWrite"
- ],
- "enumDescriptions": [
- "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.",
- "Project team owners get OWNER access.",
- "Project team members get access according to their roles.",
- "Project team owners get OWNER access, and allUsers get READER access.",
- "Project team owners get OWNER access, and allUsers get WRITER access."
- ],
- "location": "query"
- },
- "predefinedDefaultObjectAcl": {
- "type": "string",
- "description": "Apply a predefined set of default object access controls to this bucket.",
- "enum": [
- "authenticatedRead",
- "bucketOwnerFullControl",
- "bucketOwnerRead",
- "private",
- "projectPrivate",
- "publicRead"
- ],
- "enumDescriptions": [
- "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
- "Object owner gets OWNER access, and project team owners get OWNER access.",
- "Object owner gets OWNER access, and project team owners get READER access.",
- "Object owner gets OWNER access.",
- "Object owner gets OWNER access, and project team members get access according to their roles.",
- "Object owner gets OWNER access, and allUsers get READER access."
- ],
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to full.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit owner, acl and defaultObjectAcl properties."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "parameterOrder": [
+ "sourceBucket",
+ "sourceObject",
+ "destinationBucket",
+ "destinationObject"
+ ],
+ "request": {
+ "$ref": "Object"
+ },
+ "response": {
+ "$ref": "Object"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "delete": {
+ "id": "storage.objects.delete",
+ "path": "b/{bucket}/o/{object}",
+ "httpMethod": "DELETE",
+ "description": "Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket in which the object resides.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "bucket"
- ],
- "request": {
- "$ref": "Bucket"
+ "generation": {
+ "type": "string",
+ "description": "If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "Bucket"
+ "ifGenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
+ "format": "int64",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- }
- }
- },
- "channels": {
- "methods": {
- "stop": {
- "id": "storage.channels.stop",
- "path": "channels/stop",
- "httpMethod": "POST",
- "description": "Stop watching resources through this channel",
- "request": {
- "$ref": "Channel",
- "parameterName": "resource"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
- }
- }
- },
- "defaultObjectAccessControls": {
- "methods": {
- "delete": {
- "id": "storage.defaultObjectAccessControls.delete",
- "path": "b/{bucket}/defaultObjectAcl/{entity}",
- "httpMethod": "DELETE",
- "description": "Permanently deletes the default object ACL entry for the specified entity on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
+ "ifGenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
+ "format": "int64",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "get": {
- "id": "storage.defaultObjectAccessControls.get",
- "path": "b/{bucket}/defaultObjectAcl/{entity}",
- "httpMethod": "GET",
- "description": "Returns the default object ACL entry for the specified entity on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
+ "parameterOrder": [
+ "bucket",
+ "object"
+ ],
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "get": {
+ "id": "storage.objects.get",
+ "path": "b/{bucket}/o/{object}",
+ "httpMethod": "GET",
+ "description": "Retrieves an object or its metadata.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket in which the object resides.",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "generation": {
+ "type": "string",
+ "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "response": {
- "$ref": "ObjectAccessControl"
+ "ifGenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
+ "format": "int64",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "insert": {
- "id": "storage.defaultObjectAccessControls.insert",
- "path": "b/{bucket}/defaultObjectAcl",
- "httpMethod": "POST",
- "description": "Creates a new default object ACL entry on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
+ "ifGenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
+ "format": "int64",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket"
- ],
- "request": {
- "$ref": "ObjectAccessControl"
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "ObjectAccessControl"
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to noAcl.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit the owner, acl property."
+ ],
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ },
+ "softDeleted": {
+ "type": "boolean",
+ "description": "If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.",
+ "location": "query"
+ }
},
- "list": {
- "id": "storage.defaultObjectAccessControls.list",
- "path": "b/{bucket}/defaultObjectAcl",
- "httpMethod": "GET",
- "description": "Retrieves default object ACL entries on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "If present, only return default ACL listing if the bucket's current metageneration matches this value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "If present, only return default ACL listing if the bucket's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
+ "parameterOrder": [
+ "bucket",
+ "object"
+ ],
+ "response": {
+ "$ref": "Object"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ],
+ "supportsMediaDownload": true,
+ "useMediaDownloadService": true
+ },
+ "getIamPolicy": {
+ "id": "storage.objects.getIamPolicy",
+ "path": "b/{bucket}/o/{object}/iam",
+ "httpMethod": "GET",
+ "description": "Returns an IAM policy for the specified object.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket in which the object resides.",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "generation": {
+ "type": "string",
+ "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket"
- ],
- "response": {
- "$ref": "ObjectAccessControls"
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "patch": {
- "id": "storage.defaultObjectAccessControls.patch",
- "path": "b/{bucket}/defaultObjectAcl/{entity}",
- "httpMethod": "PATCH",
- "description": "Patches a default object ACL entry on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
+ "parameterOrder": [
+ "bucket",
+ "object"
+ ],
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "insert": {
+ "id": "storage.objects.insert",
+ "path": "b/{bucket}/o",
+ "httpMethod": "POST",
+ "description": "Stores a new object and metadata.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "contentEncoding": {
+ "type": "string",
+ "description": "If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded.",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "request": {
- "$ref": "ObjectAccessControl"
+ "ifGenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "ObjectAccessControl"
+ "ifGenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
+ "format": "int64",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "update": {
- "id": "storage.defaultObjectAccessControls.update",
- "path": "b/{bucket}/defaultObjectAcl/{entity}",
- "httpMethod": "PUT",
- "description": "Updates a default object ACL entry on the specified bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "entity"
- ],
- "request": {
- "$ref": "ObjectAccessControl"
+ "kmsKeyName": {
+ "type": "string",
+ "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.",
+ "location": "query"
},
- "response": {
- "$ref": "ObjectAccessControl"
+ "name": {
+ "type": "string",
+ "description": "Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- }
- }
- },
- "notifications": {
- "methods": {
- "delete": {
- "id": "storage.notifications.delete",
- "path": "b/{bucket}/notificationConfigs/{notification}",
- "httpMethod": "DELETE",
- "description": "Permanently deletes a notification subscription.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "The parent bucket of the notification.",
- "required": true,
- "location": "path"
- },
- "notification": {
- "type": "string",
- "description": "ID of the notification to delete.",
- "required": true,
- "location": "path"
+ "predefinedAcl": {
+ "type": "string",
+ "description": "Apply a predefined set of access controls to this object.",
+ "enum": [
+ "authenticatedRead",
+ "bucketOwnerFullControl",
+ "bucketOwnerRead",
+ "private",
+ "projectPrivate",
+ "publicRead"
+ ],
+ "enumDescriptions": [
+ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
+ "Object owner gets OWNER access, and project team owners get OWNER access.",
+ "Object owner gets OWNER access, and project team owners get READER access.",
+ "Object owner gets OWNER access.",
+ "Object owner gets OWNER access, and project team members get access according to their roles.",
+ "Object owner gets OWNER access, and allUsers get READER access."
+ ],
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit the owner, acl property."
+ ],
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "notification"
- ],
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "get": {
- "id": "storage.notifications.get",
- "path": "b/{bucket}/notificationConfigs/{notification}",
- "httpMethod": "GET",
- "description": "View a notification configuration.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "The parent bucket of the notification.",
- "required": true,
- "location": "path"
- },
- "notification": {
- "type": "string",
- "description": "Notification ID",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
+ "parameterOrder": [
+ "bucket"
+ ],
+ "request": {
+ "$ref": "Object"
+ },
+ "response": {
+ "$ref": "Object"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ],
+ "supportsMediaUpload": true,
+ "mediaUpload": {
+ "accept": [
+ "*/*"
+ ],
+ "protocols": {
+ "simple": {
+ "multipart": true,
+ "path": "/upload/storage/v1/b/{bucket}/o"
+ },
+ "resumable": {
+ "multipart": true,
+ "path": "/resumable/upload/storage/v1/b/{bucket}/o"
}
+ }
+ }
+ },
+ "list": {
+ "id": "storage.objects.list",
+ "path": "b/{bucket}/o",
+ "httpMethod": "GET",
+ "description": "Retrieves a list of objects matching the criteria.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket in which to look for objects.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "bucket",
- "notification"
- ],
- "response": {
- "$ref": "Notification"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
- },
- "insert": {
- "id": "storage.notifications.insert",
- "path": "b/{bucket}/notificationConfigs",
- "httpMethod": "POST",
- "description": "Creates a notification subscription for a given bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "The parent bucket of the notification.",
- "required": true,
- "location": "path"
+ "delimiter": {
+ "type": "string",
+ "description": "Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "endOffset": {
+ "type": "string",
+ "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
+ "location": "query"
+ },
+ "includeTrailingDelimiter": {
+ "type": "boolean",
+ "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.",
+ "location": "query"
+ },
+ "maxResults": {
+ "type": "integer",
+ "description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.",
+ "default": "1000",
+ "format": "uint32",
+ "minimum": "0",
+ "location": "query"
+ },
+ "pageToken": {
+ "type": "string",
+ "description": "A previously-returned page token representing part of the larger set of results to view.",
+ "location": "query"
},
- "parameterOrder": [
- "bucket"
- ],
- "request": {
- "$ref": "Notification"
+ "prefix": {
+ "type": "string",
+ "description": "Filter results to objects whose names begin with this prefix.",
+ "location": "query"
+ },
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to noAcl.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit the owner, acl property."
+ ],
+ "location": "query"
},
- "response": {
- "$ref": "Notification"
+ "startOffset": {
+ "type": "string",
+ "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ },
+ "versions": {
+ "type": "boolean",
+ "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.",
+ "location": "query"
+ },
+ "matchGlob": {
+ "type": "string",
+ "description": "Filter results to objects and prefixes that match this glob pattern.",
+ "location": "query"
+ },
+ "softDeleted": {
+ "type": "boolean",
+ "description": "If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.",
+ "location": "query"
+ },
+ "includeFoldersAsPrefixes": {
+ "type": "boolean",
+ "description": "Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes.",
+ "location": "query"
+ }
},
- "list": {
- "id": "storage.notifications.list",
- "path": "b/{bucket}/notificationConfigs",
- "httpMethod": "GET",
- "description": "Retrieves a list of notification subscriptions for a given bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a Google Cloud Storage bucket.",
- "required": true,
- "location": "path"
+ "parameterOrder": [
+ "bucket"
+ ],
+ "response": {
+ "$ref": "Objects"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ],
+ "supportsSubscription": true
+ },
+ "patch": {
+ "id": "storage.objects.patch",
+ "path": "b/{bucket}/o/{object}",
+ "httpMethod": "PATCH",
+ "description": "Patches an object's metadata.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket in which the object resides.",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "generation": {
+ "type": "string",
+ "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket"
- ],
- "response": {
- "$ref": "Notifications"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
- }
- }
- },
- "objectAccessControls": {
- "methods": {
- "delete": {
- "id": "storage.objectAccessControls.delete",
- "path": "b/{bucket}/o/{object}/acl/{entity}",
- "httpMethod": "DELETE",
- "description": "Permanently deletes the ACL entry for the specified entity on the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "ifGenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
+ "format": "int64",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "ifGenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "object",
- "entity"
- ],
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "get": {
- "id": "storage.objectAccessControls.get",
- "path": "b/{bucket}/o/{object}/acl/{entity}",
- "httpMethod": "GET",
- "description": "Returns the ACL entry for the specified entity on the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "object",
- "entity"
- ],
- "response": {
- "$ref": "ObjectAccessControl"
+ "overrideUnlockedRetention": {
+ "type": "boolean",
+ "description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "insert": {
- "id": "storage.objectAccessControls.insert",
- "path": "b/{bucket}/o/{object}/acl",
- "httpMethod": "POST",
- "description": "Creates a new ACL entry on the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "predefinedAcl": {
+ "type": "string",
+ "description": "Apply a predefined set of access controls to this object.",
+ "enum": [
+ "authenticatedRead",
+ "bucketOwnerFullControl",
+ "bucketOwnerRead",
+ "private",
+ "projectPrivate",
+ "publicRead"
+ ],
+ "enumDescriptions": [
+ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
+ "Object owner gets OWNER access, and project team owners get OWNER access.",
+ "Object owner gets OWNER access, and project team owners get READER access.",
+ "Object owner gets OWNER access.",
+ "Object owner gets OWNER access, and project team members get access according to their roles.",
+ "Object owner gets OWNER access, and allUsers get READER access."
+ ],
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "request": {
- "$ref": "ObjectAccessControl"
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to full.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit the owner, acl property."
+ ],
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request, for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket",
+ "object"
+ ],
+ "request": {
+ "$ref": "Object"
+ },
+ "response": {
+ "$ref": "Object"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "rewrite": {
+ "id": "storage.objects.rewrite",
+ "path": "b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}",
+ "httpMethod": "POST",
+ "description": "Rewrites a source object to a destination object. Optionally overrides metadata.",
+ "parameters": {
+ "destinationBucket": {
+ "type": "string",
+ "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.",
+ "required": true,
+ "location": "path"
+ },
+ "destinationKmsKeyName": {
+ "type": "string",
+ "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.",
+ "location": "query"
},
- "response": {
- "$ref": "ObjectAccessControl"
+ "destinationObject": {
+ "type": "string",
+ "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "list": {
- "id": "storage.objectAccessControls.list",
- "path": "b/{bucket}/o/{object}/acl",
- "httpMethod": "GET",
- "description": "Retrieves ACL entries on the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "destinationPredefinedAcl": {
+ "type": "string",
+ "description": "Apply a predefined set of access controls to the destination object.",
+ "enum": [
+ "authenticatedRead",
+ "bucketOwnerFullControl",
+ "bucketOwnerRead",
+ "private",
+ "projectPrivate",
+ "publicRead"
+ ],
+ "enumDescriptions": [
+ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
+ "Object owner gets OWNER access, and project team owners get OWNER access.",
+ "Object owner gets OWNER access, and project team owners get READER access.",
+ "Object owner gets OWNER access.",
+ "Object owner gets OWNER access, and project team members get access according to their roles.",
+ "Object owner gets OWNER access, and allUsers get READER access."
+ ],
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "ifGenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "response": {
- "$ref": "ObjectAccessControls"
+ "ifGenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
+ "format": "int64",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "patch": {
- "id": "storage.objectAccessControls.patch",
- "path": "b/{bucket}/o/{object}/acl/{entity}",
- "httpMethod": "PATCH",
- "description": "Patches an ACL entry on the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "object",
- "entity"
- ],
- "request": {
- "$ref": "ObjectAccessControl"
+ "ifSourceGenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the source object's current generation matches the given value.",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "ObjectAccessControl"
+ "ifSourceGenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.",
+ "format": "int64",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "update": {
- "id": "storage.objectAccessControls.update",
- "path": "b/{bucket}/o/{object}/acl/{entity}",
- "httpMethod": "PUT",
- "description": "Updates an ACL entry on the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of a bucket.",
- "required": true,
- "location": "path"
- },
- "entity": {
- "type": "string",
- "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "ifSourceMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "ifSourceMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "object",
- "entity"
- ],
- "request": {
- "$ref": "ObjectAccessControl"
+ "maxBytesRewrittenPerCall": {
+ "type": "string",
+ "description": "The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid.",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "ObjectAccessControl"
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit the owner, acl property."
+ ],
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- }
- }
- },
- "objects": {
- "methods": {
- "compose": {
- "id": "storage.objects.compose",
- "path": "b/{destinationBucket}/o/{destinationObject}/compose",
- "httpMethod": "POST",
- "description": "Concatenates a list of existing objects into a new object in the same bucket.",
- "parameters": {
- "destinationBucket": {
- "type": "string",
- "description": "Name of the bucket containing the source objects. The destination object is stored in this bucket.",
- "required": true,
- "location": "path"
- },
- "destinationObject": {
- "type": "string",
- "description": "Name of the new object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "destinationPredefinedAcl": {
- "type": "string",
- "description": "Apply a predefined set of access controls to the destination object.",
- "enum": [
- "authenticatedRead",
- "bucketOwnerFullControl",
- "bucketOwnerRead",
- "private",
- "projectPrivate",
- "publicRead"
- ],
- "enumDescriptions": [
- "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
- "Object owner gets OWNER access, and project team owners get OWNER access.",
- "Object owner gets OWNER access, and project team owners get READER access.",
- "Object owner gets OWNER access.",
- "Object owner gets OWNER access, and project team members get access according to their roles.",
- "Object owner gets OWNER access, and allUsers get READER access."
- ],
- "location": "query"
- },
- "ifGenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "kmsKeyName": {
- "type": "string",
- "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.",
- "location": "query"
+ "rewriteToken": {
+ "type": "string",
+ "description": "Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "sourceBucket": {
+ "type": "string",
+ "description": "Name of the bucket in which to find the source object.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "destinationBucket",
- "destinationObject"
- ],
- "request": {
- "$ref": "ComposeRequest"
+ "sourceGeneration": {
+ "type": "string",
+ "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "Object"
+ "sourceObject": {
+ "type": "string",
+ "description": "Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "copy": {
- "id": "storage.objects.copy",
- "path": "b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}",
- "httpMethod": "POST",
- "description": "Copies a source object to a destination object. Optionally overrides metadata.",
- "parameters": {
- "destinationBucket": {
- "type": "string",
- "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "destinationKmsKeyName": {
- "type": "string",
- "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.",
- "location": "query"
- },
- "destinationObject": {
- "type": "string",
- "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.",
- "required": true,
- "location": "path"
- },
- "destinationPredefinedAcl": {
- "type": "string",
- "description": "Apply a predefined set of access controls to the destination object.",
- "enum": [
- "authenticatedRead",
- "bucketOwnerFullControl",
- "bucketOwnerRead",
- "private",
- "projectPrivate",
- "publicRead"
- ],
- "enumDescriptions": [
- "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
- "Object owner gets OWNER access, and project team owners get OWNER access.",
- "Object owner gets OWNER access, and project team owners get READER access.",
- "Object owner gets OWNER access.",
- "Object owner gets OWNER access, and project team members get access according to their roles.",
- "Object owner gets OWNER access, and allUsers get READER access."
- ],
- "location": "query"
- },
- "ifGenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceGenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current generation matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceGenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
- },
- "sourceBucket": {
- "type": "string",
- "description": "Name of the bucket in which to find the source object.",
- "required": true,
- "location": "path"
- },
- "sourceGeneration": {
- "type": "string",
- "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "sourceObject": {
- "type": "string",
- "description": "Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "parameterOrder": [
+ "sourceBucket",
+ "sourceObject",
+ "destinationBucket",
+ "destinationObject"
+ ],
+ "request": {
+ "$ref": "Object"
+ },
+ "response": {
+ "$ref": "RewriteResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "setIamPolicy": {
+ "id": "storage.objects.setIamPolicy",
+ "path": "b/{bucket}/o/{object}/iam",
+ "httpMethod": "PUT",
+ "description": "Updates an IAM policy for the specified object.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket in which the object resides.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "sourceBucket",
- "sourceObject",
- "destinationBucket",
- "destinationObject"
- ],
- "request": {
- "$ref": "Object"
+ "generation": {
+ "type": "string",
+ "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "Object"
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "delete": {
- "id": "storage.objects.delete",
- "path": "b/{bucket}/o/{object}",
- "httpMethod": "DELETE",
- "description": "Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "parameterOrder": [
+ "bucket",
+ "object"
+ ],
+ "request": {
+ "$ref": "Policy"
+ },
+ "response": {
+ "$ref": "Policy"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "testIamPermissions": {
+ "id": "storage.objects.testIamPermissions",
+ "path": "b/{bucket}/o/{object}/iam/testPermissions",
+ "httpMethod": "GET",
+ "description": "Tests a set of permissions on the given object to see which, if any, are held by the caller.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket in which the object resides.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
- },
- "get": {
- "id": "storage.objects.get",
- "path": "b/{bucket}/o/{object}",
- "httpMethod": "GET",
- "description": "Retrieves an object or its metadata.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "generation": {
+ "type": "string",
+ "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "response": {
- "$ref": "Object"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ],
- "supportsMediaDownload": true,
- "useMediaDownloadService": true
- },
- "getIamPolicy": {
- "id": "storage.objects.getIamPolicy",
- "path": "b/{bucket}/o/{object}/iam",
- "httpMethod": "GET",
- "description": "Returns an IAM policy for the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "permissions": {
+ "type": "string",
+ "description": "Permissions to test.",
+ "required": true,
+ "repeated": true,
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "response": {
- "$ref": "Policy"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "insert": {
- "id": "storage.objects.insert",
- "path": "b/{bucket}/o",
- "httpMethod": "POST",
- "description": "Stores a new object and metadata.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.",
- "required": true,
- "location": "path"
- },
- "contentEncoding": {
- "type": "string",
- "description": "If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded.",
- "location": "query"
- },
- "ifGenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "kmsKeyName": {
- "type": "string",
- "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.",
- "location": "query"
- },
- "name": {
- "type": "string",
- "description": "Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "location": "query"
- },
- "predefinedAcl": {
- "type": "string",
- "description": "Apply a predefined set of access controls to this object.",
- "enum": [
- "authenticatedRead",
- "bucketOwnerFullControl",
- "bucketOwnerRead",
- "private",
- "projectPrivate",
- "publicRead"
- ],
- "enumDescriptions": [
- "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
- "Object owner gets OWNER access, and project team owners get OWNER access.",
- "Object owner gets OWNER access, and project team owners get READER access.",
- "Object owner gets OWNER access.",
- "Object owner gets OWNER access, and project team members get access according to their roles.",
- "Object owner gets OWNER access, and allUsers get READER access."
- ],
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "parameterOrder": [
+ "bucket",
+ "object",
+ "permissions"
+ ],
+ "response": {
+ "$ref": "TestIamPermissionsResponse"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "update": {
+ "id": "storage.objects.update",
+ "path": "b/{bucket}/o/{object}",
+ "httpMethod": "PUT",
+ "description": "Updates an object's metadata.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket in which the object resides.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "bucket"
- ],
- "request": {
- "$ref": "Object"
+ "generation": {
+ "type": "string",
+ "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "Object"
+ "ifGenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
+ "format": "int64",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ],
- "supportsMediaUpload": true,
- "mediaUpload": {
- "accept": [
- "*/*"
- ],
- "protocols": {
- "simple": {
- "multipart": true,
- "path": "/upload/storage/v1/b/{bucket}/o"
- },
- "resumable": {
- "multipart": true,
- "path": "/resumable/upload/storage/v1/b/{bucket}/o"
- }
- }
- }
- },
- "list": {
- "id": "storage.objects.list",
- "path": "b/{bucket}/o",
- "httpMethod": "GET",
- "description": "Retrieves a list of objects matching the criteria.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which to look for objects.",
- "required": true,
- "location": "path"
- },
- "delimiter": {
- "type": "string",
- "description": "Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.",
- "location": "query"
- },
- "endOffset": {
- "type": "string",
- "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
- "location": "query"
- },
- "includeTrailingDelimiter": {
- "type": "boolean",
- "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.",
- "location": "query"
- },
- "maxResults": {
- "type": "integer",
- "description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.",
- "default": "1000",
- "format": "uint32",
- "minimum": "0",
- "location": "query"
- },
- "pageToken": {
- "type": "string",
- "description": "A previously-returned page token representing part of the larger set of results to view.",
- "location": "query"
- },
- "prefix": {
- "type": "string",
- "description": "Filter results to objects whose names begin with this prefix.",
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
- },
- "startOffset": {
- "type": "string",
- "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- },
- "versions": {
- "type": "boolean",
- "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.",
- "location": "query"
- }
+ "ifGenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket"
- ],
- "response": {
- "$ref": "Objects"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ],
- "supportsSubscription": true
- },
- "patch": {
- "id": "storage.objects.patch",
- "path": "b/{bucket}/o/{object}",
- "httpMethod": "PATCH",
- "description": "Patches an object's metadata.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "predefinedAcl": {
- "type": "string",
- "description": "Apply a predefined set of access controls to this object.",
- "enum": [
- "authenticatedRead",
- "bucketOwnerFullControl",
- "bucketOwnerRead",
- "private",
- "projectPrivate",
- "publicRead"
- ],
- "enumDescriptions": [
- "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
- "Object owner gets OWNER access, and project team owners get OWNER access.",
- "Object owner gets OWNER access, and project team owners get READER access.",
- "Object owner gets OWNER access.",
- "Object owner gets OWNER access, and project team members get access according to their roles.",
- "Object owner gets OWNER access, and allUsers get READER access."
- ],
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to full.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request, for Requester Pays buckets.",
- "location": "query"
- }
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "overrideUnlockedRetention": {
+ "type": "boolean",
+ "description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "request": {
- "$ref": "Object"
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).",
+ "required": true,
+ "location": "path"
},
- "response": {
- "$ref": "Object"
+ "predefinedAcl": {
+ "type": "string",
+ "description": "Apply a predefined set of access controls to this object.",
+ "enum": [
+ "authenticatedRead",
+ "bucketOwnerFullControl",
+ "bucketOwnerRead",
+ "private",
+ "projectPrivate",
+ "publicRead"
+ ],
+ "enumDescriptions": [
+ "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
+ "Object owner gets OWNER access, and project team owners get OWNER access.",
+ "Object owner gets OWNER access, and project team owners get READER access.",
+ "Object owner gets OWNER access.",
+ "Object owner gets OWNER access, and project team members get access according to their roles.",
+ "Object owner gets OWNER access, and allUsers get READER access."
+ ],
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to full.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit the owner, acl property."
+ ],
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
},
- "rewrite": {
- "id": "storage.objects.rewrite",
- "path": "b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}",
- "httpMethod": "POST",
- "description": "Rewrites a source object to a destination object. Optionally overrides metadata.",
- "parameters": {
- "destinationBucket": {
- "type": "string",
- "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.",
- "required": true,
- "location": "path"
- },
- "destinationKmsKeyName": {
- "type": "string",
- "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.",
- "location": "query"
- },
- "destinationObject": {
- "type": "string",
- "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "destinationPredefinedAcl": {
- "type": "string",
- "description": "Apply a predefined set of access controls to the destination object.",
- "enum": [
- "authenticatedRead",
- "bucketOwnerFullControl",
- "bucketOwnerRead",
- "private",
- "projectPrivate",
- "publicRead"
- ],
- "enumDescriptions": [
- "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
- "Object owner gets OWNER access, and project team owners get OWNER access.",
- "Object owner gets OWNER access, and project team owners get READER access.",
- "Object owner gets OWNER access.",
- "Object owner gets OWNER access, and project team members get access according to their roles.",
- "Object owner gets OWNER access, and allUsers get READER access."
- ],
- "location": "query"
- },
- "ifGenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceGenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current generation matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceGenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifSourceMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "maxBytesRewrittenPerCall": {
- "type": "string",
- "description": "The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid.",
- "format": "int64",
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
- },
- "rewriteToken": {
- "type": "string",
- "description": "Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.",
- "location": "query"
- },
- "sourceBucket": {
- "type": "string",
- "description": "Name of the bucket in which to find the source object.",
- "required": true,
- "location": "path"
- },
- "sourceGeneration": {
- "type": "string",
- "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "sourceObject": {
- "type": "string",
- "description": "Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "parameterOrder": [
+ "bucket",
+ "object"
+ ],
+ "request": {
+ "$ref": "Object"
+ },
+ "response": {
+ "$ref": "Object"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "watchAll": {
+ "id": "storage.objects.watchAll",
+ "path": "b/{bucket}/o/watch",
+ "httpMethod": "POST",
+ "description": "Watch for changes on all objects in a bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket in which to look for objects.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "sourceBucket",
- "sourceObject",
- "destinationBucket",
- "destinationObject"
- ],
- "request": {
- "$ref": "Object"
+ "delimiter": {
+ "type": "string",
+ "description": "Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.",
+ "location": "query"
},
- "response": {
- "$ref": "RewriteResponse"
+ "endOffset": {
+ "type": "string",
+ "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
+ "location": "query"
+ },
+ "includeTrailingDelimiter": {
+ "type": "boolean",
+ "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.",
+ "location": "query"
+ },
+ "maxResults": {
+ "type": "integer",
+ "description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.",
+ "default": "1000",
+ "format": "uint32",
+ "minimum": "0",
+ "location": "query"
+ },
+ "pageToken": {
+ "type": "string",
+ "description": "A previously-returned page token representing part of the larger set of results to view.",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
- },
- "setIamPolicy": {
- "id": "storage.objects.setIamPolicy",
- "path": "b/{bucket}/o/{object}/iam",
- "httpMethod": "PUT",
- "description": "Updates an IAM policy for the specified object.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
+ "prefix": {
+ "type": "string",
+ "description": "Filter results to objects whose names begin with this prefix.",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to noAcl.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit the owner, acl property."
+ ],
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "request": {
- "$ref": "Policy"
+ "startOffset": {
+ "type": "string",
+ "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
+ "location": "query"
},
- "response": {
- "$ref": "Policy"
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
+ "versions": {
+ "type": "boolean",
+ "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.",
+ "location": "query"
+ }
},
- "testIamPermissions": {
- "id": "storage.objects.testIamPermissions",
- "path": "b/{bucket}/o/{object}/iam/testPermissions",
- "httpMethod": "GET",
- "description": "Tests a set of permissions on the given object to see which, if any, are held by the caller.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "permissions": {
- "type": "string",
- "description": "Permissions to test.",
- "required": true,
- "repeated": true,
- "location": "query"
+ "parameterOrder": [
+ "bucket"
+ ],
+ "request": {
+ "$ref": "Channel",
+ "parameterName": "resource"
+ },
+ "response": {
+ "$ref": "Channel"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ],
+ "supportsSubscription": true
+ },
+ "restore": {
+ "id": "storage.objects.restore",
+ "path": "b/{bucket}/o/{object}/restore",
+ "httpMethod": "POST",
+ "description": "Restores a soft-deleted object.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket in which the object resides.",
+ "required": true,
+ "location": "path"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "generation": {
+ "type": "string",
+ "description": "Selects a specific revision of this object.",
+ "required": true,
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket",
- "object",
- "permissions"
- ],
- "response": {
- "$ref": "TestIamPermissionsResponse"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
- },
- "update": {
- "id": "storage.objects.update",
- "path": "b/{bucket}/o/{object}",
- "httpMethod": "PUT",
- "description": "Updates an object's metadata.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which the object resides.",
- "required": true,
- "location": "path"
- },
- "generation": {
- "type": "string",
- "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifGenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.",
- "format": "int64",
- "location": "query"
- },
- "ifMetagenerationNotMatch": {
- "type": "string",
- "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.",
- "format": "int64",
- "location": "query"
- },
- "object": {
- "type": "string",
- "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
- "required": true,
- "location": "path"
- },
- "predefinedAcl": {
- "type": "string",
- "description": "Apply a predefined set of access controls to this object.",
- "enum": [
- "authenticatedRead",
- "bucketOwnerFullControl",
- "bucketOwnerRead",
- "private",
- "projectPrivate",
- "publicRead"
- ],
- "enumDescriptions": [
- "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.",
- "Object owner gets OWNER access, and project team owners get OWNER access.",
- "Object owner gets OWNER access, and project team owners get READER access.",
- "Object owner gets OWNER access.",
- "Object owner gets OWNER access, and project team members get access according to their roles.",
- "Object owner gets OWNER access, and allUsers get READER access."
- ],
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to full.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- }
+ "object": {
+ "type": "string",
+ "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "bucket",
- "object"
- ],
- "request": {
- "$ref": "Object"
+ "ifGenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's one live generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.",
+ "format": "int64",
+ "location": "query"
},
- "response": {
- "$ref": "Object"
+ "ifGenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether none of the object's live generations match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.",
+ "format": "int64",
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- },
- "watchAll": {
- "id": "storage.objects.watchAll",
- "path": "b/{bucket}/o/watch",
- "httpMethod": "POST",
- "description": "Watch for changes on all objects in a bucket.",
- "parameters": {
- "bucket": {
- "type": "string",
- "description": "Name of the bucket in which to look for objects.",
- "required": true,
- "location": "path"
- },
- "delimiter": {
- "type": "string",
- "description": "Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.",
- "location": "query"
- },
- "endOffset": {
- "type": "string",
- "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
- "location": "query"
- },
- "includeTrailingDelimiter": {
- "type": "boolean",
- "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.",
- "location": "query"
- },
- "maxResults": {
- "type": "integer",
- "description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.",
- "default": "1000",
- "format": "uint32",
- "minimum": "0",
- "location": "query"
- },
- "pageToken": {
- "type": "string",
- "description": "A previously-returned page token representing part of the larger set of results to view.",
- "location": "query"
- },
- "prefix": {
- "type": "string",
- "description": "Filter results to objects whose names begin with this prefix.",
- "location": "query"
- },
- "projection": {
- "type": "string",
- "description": "Set of properties to return. Defaults to noAcl.",
- "enum": [
- "full",
- "noAcl"
- ],
- "enumDescriptions": [
- "Include all properties.",
- "Omit the owner, acl property."
- ],
- "location": "query"
- },
- "startOffset": {
- "type": "string",
- "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).",
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request. Required for Requester Pays buckets.",
- "location": "query"
- },
- "versions": {
- "type": "boolean",
- "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.",
- "location": "query"
- }
+ "ifMetagenerationMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether the object's one live metageneration matches the given value.",
+ "format": "int64",
+ "location": "query"
},
- "parameterOrder": [
- "bucket"
- ],
- "request": {
- "$ref": "Channel",
- "parameterName": "resource"
- },
- "response": {
- "$ref": "Channel"
- },
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ],
- "supportsSubscription": true
- }
+ "ifMetagenerationNotMatch": {
+ "type": "string",
+ "description": "Makes the operation conditional on whether none of the object's live metagenerations match the given value.",
+ "format": "int64",
+ "location": "query"
+ },
+ "copySourceAcl": {
+ "type": "boolean",
+ "description": "If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.",
+ "location": "query"
+ },
+ "projection": {
+ "type": "string",
+ "description": "Set of properties to return. Defaults to full.",
+ "enum": [
+ "full",
+ "noAcl"
+ ],
+ "enumDescriptions": [
+ "Include all properties.",
+ "Omit the owner, acl property."
+ ],
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request. Required for Requester Pays buckets.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "bucket",
+ "object"
+ ],
+ "request": {
+ "$ref": "Object"
+ },
+ "response": {
+ "$ref": "Object"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "bulkRestore": {
+ "id": "storage.objects.bulkRestore",
+ "path": "b/{bucket}/o/bulkRestore",
+ "httpMethod": "POST",
+ "description": "Initiates a long-running bulk restore operation on the specified bucket.",
+ "parameters": {
+ "bucket": {
+ "type": "string",
+ "description": "Name of the bucket in which the object resides.",
+ "required": true,
+ "location": "path"
+ }
+ },
+ "parameterOrder": [
+ "bucket"
+ ],
+ "request": {
+ "$ref": "BulkRestoreObjectsRequest"
+ },
+ "response": {
+ "$ref": "GoogleLongrunningOperation"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
}
- },
- "projects": {
- "resources": {
- "hmacKeys": {
- "methods": {
- "create": {
- "id": "storage.projects.hmacKeys.create",
- "path": "projects/{projectId}/hmacKeys",
- "httpMethod": "POST",
- "description": "Creates a new HMAC key for the specified service account.",
- "parameters": {
- "projectId": {
- "type": "string",
- "description": "Project ID owning the service account.",
- "required": true,
- "location": "path"
- },
- "serviceAccountEmail": {
- "type": "string",
- "description": "Email address of the service account.",
- "required": true,
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request.",
- "location": "query"
- }
+ }
+ },
+ "projects": {
+ "resources": {
+ "hmacKeys": {
+ "methods": {
+ "create": {
+ "id": "storage.projects.hmacKeys.create",
+ "path": "projects/{projectId}/hmacKeys",
+ "httpMethod": "POST",
+ "description": "Creates a new HMAC key for the specified service account.",
+ "parameters": {
+ "projectId": {
+ "type": "string",
+ "description": "Project ID owning the service account.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "projectId",
- "serviceAccountEmail"
- ],
- "response": {
- "$ref": "HmacKey"
+ "serviceAccountEmail": {
+ "type": "string",
+ "description": "Email address of the service account.",
+ "required": true,
+ "location": "query"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request.",
+ "location": "query"
+ }
},
- "delete": {
- "id": "storage.projects.hmacKeys.delete",
- "path": "projects/{projectId}/hmacKeys/{accessId}",
- "httpMethod": "DELETE",
- "description": "Deletes an HMAC key.",
- "parameters": {
- "accessId": {
- "type": "string",
- "description": "Name of the HMAC key to be deleted.",
- "required": true,
- "location": "path"
- },
- "projectId": {
- "type": "string",
- "description": "Project ID owning the requested key",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request.",
- "location": "query"
- }
- },
- "parameterOrder": [
- "projectId",
- "accessId"
- ],
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
+ "parameterOrder": [
+ "projectId",
+ "serviceAccountEmail"
+ ],
+ "response": {
+ "$ref": "HmacKey"
},
- "get": {
- "id": "storage.projects.hmacKeys.get",
- "path": "projects/{projectId}/hmacKeys/{accessId}",
- "httpMethod": "GET",
- "description": "Retrieves an HMAC key's metadata",
- "parameters": {
- "accessId": {
- "type": "string",
- "description": "Name of the HMAC key.",
- "required": true,
- "location": "path"
- },
- "projectId": {
- "type": "string",
- "description": "Project ID owning the service account of the requested key.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request.",
- "location": "query"
- }
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ },
+ "delete": {
+ "id": "storage.projects.hmacKeys.delete",
+ "path": "projects/{projectId}/hmacKeys/{accessId}",
+ "httpMethod": "DELETE",
+ "description": "Deletes an HMAC key.",
+ "parameters": {
+ "accessId": {
+ "type": "string",
+ "description": "Name of the HMAC key to be deleted.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "projectId",
- "accessId"
- ],
- "response": {
- "$ref": "HmacKeyMetadata"
+ "projectId": {
+ "type": "string",
+ "description": "Project ID owning the requested key",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request.",
+ "location": "query"
+ }
},
- "list": {
- "id": "storage.projects.hmacKeys.list",
- "path": "projects/{projectId}/hmacKeys",
- "httpMethod": "GET",
- "description": "Retrieves a list of HMAC keys matching the criteria.",
- "parameters": {
- "maxResults": {
- "type": "integer",
- "description": "Maximum number of items to return in a single page of responses. The service uses this parameter or 250 items, whichever is smaller. The max number of items per page will also be limited by the number of distinct service accounts in the response. If the number of service accounts in a single response is too high, the page will truncated and a next page token will be returned.",
- "default": "250",
- "format": "uint32",
- "minimum": "0",
- "location": "query"
- },
- "pageToken": {
- "type": "string",
- "description": "A previously-returned page token representing part of the larger set of results to view.",
- "location": "query"
- },
- "projectId": {
- "type": "string",
- "description": "Name of the project in which to look for HMAC keys.",
- "required": true,
- "location": "path"
- },
- "serviceAccountEmail": {
- "type": "string",
- "description": "If present, only keys for the given service account are returned.",
- "location": "query"
- },
- "showDeletedKeys": {
- "type": "boolean",
- "description": "Whether or not to show keys in the DELETED state.",
- "location": "query"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request.",
- "location": "query"
- }
+ "parameterOrder": [
+ "projectId",
+ "accessId"
+ ],
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
+ },
+ "get": {
+ "id": "storage.projects.hmacKeys.get",
+ "path": "projects/{projectId}/hmacKeys/{accessId}",
+ "httpMethod": "GET",
+ "description": "Retrieves an HMAC key's metadata",
+ "parameters": {
+ "accessId": {
+ "type": "string",
+ "description": "Name of the HMAC key.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "projectId"
- ],
- "response": {
- "$ref": "HmacKeysMetadata"
+ "projectId": {
+ "type": "string",
+ "description": "Project ID owning the service account of the requested key.",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only"
- ]
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request.",
+ "location": "query"
+ }
},
- "update": {
- "id": "storage.projects.hmacKeys.update",
- "path": "projects/{projectId}/hmacKeys/{accessId}",
- "httpMethod": "PUT",
- "description": "Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states.",
- "parameters": {
- "accessId": {
- "type": "string",
- "description": "Name of the HMAC key being updated.",
- "required": true,
- "location": "path"
- },
- "projectId": {
- "type": "string",
- "description": "Project ID owning the service account of the updated key.",
- "required": true,
- "location": "path"
- },
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request.",
- "location": "query"
- }
+ "parameterOrder": [
+ "projectId",
+ "accessId"
+ ],
+ "response": {
+ "$ref": "HmacKeyMetadata"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only"
+ ]
+ },
+ "list": {
+ "id": "storage.projects.hmacKeys.list",
+ "path": "projects/{projectId}/hmacKeys",
+ "httpMethod": "GET",
+ "description": "Retrieves a list of HMAC keys matching the criteria.",
+ "parameters": {
+ "maxResults": {
+ "type": "integer",
+ "description": "Maximum number of items to return in a single page of responses. The service uses this parameter or 250 items, whichever is smaller. The max number of items per page will also be limited by the number of distinct service accounts in the response. If the number of service accounts in a single response is too high, the page will truncated and a next page token will be returned.",
+ "default": "250",
+ "format": "uint32",
+ "minimum": "0",
+ "location": "query"
},
- "parameterOrder": [
- "projectId",
- "accessId"
- ],
- "request": {
- "$ref": "HmacKeyMetadata"
+ "pageToken": {
+ "type": "string",
+ "description": "A previously-returned page token representing part of the larger set of results to view.",
+ "location": "query"
},
- "response": {
- "$ref": "HmacKeyMetadata"
+ "projectId": {
+ "type": "string",
+ "description": "Name of the project in which to look for HMAC keys.",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/devstorage.full_control"
- ]
- }
- }
- },
- "serviceAccount": {
- "methods": {
- "get": {
- "id": "storage.projects.serviceAccount.get",
- "path": "projects/{projectId}/serviceAccount",
- "httpMethod": "GET",
- "description": "Get the email address of this project's Google Cloud Storage service account.",
- "parameters": {
- "projectId": {
- "type": "string",
- "description": "Project ID",
- "required": true,
- "location": "path"
+ "serviceAccountEmail": {
+ "type": "string",
+ "description": "If present, only keys for the given service account are returned.",
+ "location": "query"
},
- "userProject": {
- "type": "string",
- "description": "The project to be billed for this request.",
- "location": "query"
- }
+ "showDeletedKeys": {
+ "type": "boolean",
+ "description": "Whether or not to show keys in the DELETED state.",
+ "location": "query"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "projectId"
+ ],
+ "response": {
+ "$ref": "HmacKeysMetadata"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only"
+ ]
+ },
+ "update": {
+ "id": "storage.projects.hmacKeys.update",
+ "path": "projects/{projectId}/hmacKeys/{accessId}",
+ "httpMethod": "PUT",
+ "description": "Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states.",
+ "parameters": {
+ "accessId": {
+ "type": "string",
+ "description": "Name of the HMAC key being updated.",
+ "required": true,
+ "location": "path"
},
- "parameterOrder": [
- "projectId"
- ],
- "response": {
- "$ref": "ServiceAccount"
+ "projectId": {
+ "type": "string",
+ "description": "Project ID owning the service account of the updated key.",
+ "required": true,
+ "location": "path"
},
- "scopes": [
- "https://www.googleapis.com/auth/cloud-platform",
- "https://www.googleapis.com/auth/cloud-platform.read-only",
- "https://www.googleapis.com/auth/devstorage.full_control",
- "https://www.googleapis.com/auth/devstorage.read_only",
- "https://www.googleapis.com/auth/devstorage.read_write"
- ]
- }
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "projectId",
+ "accessId"
+ ],
+ "request": {
+ "$ref": "HmacKeyMetadata"
+ },
+ "response": {
+ "$ref": "HmacKeyMetadata"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/devstorage.full_control"
+ ]
+ }
+ }
+ },
+ "serviceAccount": {
+ "methods": {
+ "get": {
+ "id": "storage.projects.serviceAccount.get",
+ "path": "projects/{projectId}/serviceAccount",
+ "httpMethod": "GET",
+ "description": "Get the email address of this project's Google Cloud Storage service account.",
+ "parameters": {
+ "projectId": {
+ "type": "string",
+ "description": "Project ID",
+ "required": true,
+ "location": "path"
+ },
+ "userProject": {
+ "type": "string",
+ "description": "The project to be billed for this request.",
+ "location": "query"
+ }
+ },
+ "parameterOrder": [
+ "projectId"
+ ],
+ "response": {
+ "$ref": "ServiceAccount"
+ },
+ "scopes": [
+ "https://www.googleapis.com/auth/cloud-platform",
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
+ "https://www.googleapis.com/auth/devstorage.full_control",
+ "https://www.googleapis.com/auth/devstorage.read_only",
+ "https://www.googleapis.com/auth/devstorage.read_write"
+ ]
}
}
}
}
- },
- "revision": "20220718",
- "etag": "\"33383537313931303639303633323338353436\""
+ }
+ },
+ "revision": "20231012",
+ "etag": "\"3133333835393639383131353638313238353437\""
}
diff --git a/lib/Google/vendor/google/cloud-storage/src/HmacKey.php b/lib/Google/vendor/google/cloud-storage/src/HmacKey.php
index e23f3de39..b64dd3d6c 100644
--- a/lib/Google/vendor/google/cloud-storage/src/HmacKey.php
+++ b/lib/Google/vendor/google/cloud-storage/src/HmacKey.php
@@ -34,6 +34,7 @@ class HmacKey
{
/**
* @var ConnectionInterface
+ * @internal
*/
private $connection;
@@ -54,6 +55,8 @@ class HmacKey
/**
* @param ConnectionInterface $connection A connection to Cloud Storage.
+ * This object is created by StorageClient,
+ * and should not be instantiated outside of this client.
* @param string $projectId The current project ID.
* @param string $accessId The key identifier.
* @param array|null $info The key metadata.
@@ -170,7 +173,7 @@ public function update($state, array $options = [])
* Delete the HMAC Key.
*
* Key state must be set to `INACTIVE` prior to deletion. See
- * {@see Google\Cloud\Storage\HmacKey::update()} for details.
+ * {@see HmacKey::update()} for details.
*
* Example:
* ```
diff --git a/lib/Google/vendor/google/cloud-storage/src/Lifecycle.php b/lib/Google/vendor/google/cloud-storage/src/Lifecycle.php
index 14f45d0ab..88a9966a3 100644
--- a/lib/Google/vendor/google/cloud-storage/src/Lifecycle.php
+++ b/lib/Google/vendor/google/cloud-storage/src/Lifecycle.php
@@ -26,8 +26,8 @@
*
* This builder does not execute any network requests and is intended to be used
* in combination with either
- * {@see Google\Cloud\Storage\StorageClient::createBucket()}
- * or {@see Google\Cloud\Storage\Bucket::update()}.
+ * {@see StorageClient::createBucket()}
+ * or {@see Bucket::update()}.
*
* Example:
* ```
diff --git a/lib/Google/vendor/google/cloud-storage/src/Notification.php b/lib/Google/vendor/google/cloud-storage/src/Notification.php
index 67ab58a5a..3caa2b128 100644
--- a/lib/Google/vendor/google/cloud-storage/src/Notification.php
+++ b/lib/Google/vendor/google/cloud-storage/src/Notification.php
@@ -30,7 +30,7 @@
* and the object that changed.
*
* To utilize this class and see more examples, please see the relevant
- * notifications based methods exposed on {@see Google\Cloud\Storage\Bucket}.
+ * notifications based methods exposed on {@see Bucket}.
*
* Example:
* ```
@@ -55,6 +55,7 @@ class Notification
/**
* @var ConnectionInterface Represents a connection to Cloud Storage.
+ * @internal
*/
private $connection;
@@ -70,7 +71,8 @@ class Notification
/**
* @param ConnectionInterface $connection Represents a connection to Cloud
- * Storage.
+ * Storage. This object is created by StorageClient,
+ * and should not be instantiated outside of this client.
* @param string $id The notification's ID.
* @param string $bucket The name of the bucket associated with this
* notification.
diff --git a/lib/Google/vendor/google/cloud-storage/src/ObjectIterator.php b/lib/Google/vendor/google/cloud-storage/src/ObjectIterator.php
index 0490e3c3c..254bc5e70 100644
--- a/lib/Google/vendor/google/cloud-storage/src/ObjectIterator.php
+++ b/lib/Google/vendor/google/cloud-storage/src/ObjectIterator.php
@@ -20,7 +20,9 @@
use Google\Cloud\Core\Iterator\ItemIteratorTrait;
/**
- * Iterates over a set of {@see Google\Cloud\Storage\StorageObject} items.
+ * ObjectIterator
+ *
+ * Iterates over a set of {@see StorageObject} items.
*/
class ObjectIterator implements \Iterator
{
diff --git a/lib/Google/vendor/google/cloud-storage/src/ObjectPageIterator.php b/lib/Google/vendor/google/cloud-storage/src/ObjectPageIterator.php
index 0d8afb3d9..11ba03dc4 100644
--- a/lib/Google/vendor/google/cloud-storage/src/ObjectPageIterator.php
+++ b/lib/Google/vendor/google/cloud-storage/src/ObjectPageIterator.php
@@ -20,8 +20,10 @@
use Google\Cloud\Core\Iterator\PageIteratorTrait;
/**
+ * ObjectPageIterator
+ *
* Iterates over a set of pages containing
- * {@see Google\Cloud\Storage\StorageObject} items.
+ * {@see StorageObject} items.
*/
class ObjectPageIterator implements \Iterator
{
diff --git a/lib/Google/vendor/google/cloud-storage/src/ReadStream.php b/lib/Google/vendor/google/cloud-storage/src/ReadStream.php
index 33e55094c..cfae74d8e 100644
--- a/lib/Google/vendor/google/cloud-storage/src/ReadStream.php
+++ b/lib/Google/vendor/google/cloud-storage/src/ReadStream.php
@@ -47,7 +47,7 @@ public function __construct(StreamInterface $stream)
*
* @return int The size of the stream.
*/
- public function getSize()
+ public function getSize(): ?int
{
return $this->stream->getSize() ?: $this->getSizeFromMetadata();
}
@@ -58,7 +58,7 @@ public function getSize()
*
* @return int The Size of the stream
*/
- private function getSizeFromMetadata()
+ private function getSizeFromMetadata(): int
{
foreach ($this->stream->getMetadata('wrapper_data') as $value) {
if (substr($value, 0, 15) == "Content-Length:") {
@@ -78,7 +78,7 @@ private function getSizeFromMetadata()
* @param int $length The number of bytes to read.
* @return string Read bytes from the underlying stream.
*/
- public function read($length)
+ public function read($length): string
{
$data = '';
do {
diff --git a/lib/Google/vendor/google/cloud-storage/src/SigningHelper.php b/lib/Google/vendor/google/cloud-storage/src/SigningHelper.php
index 33f6df6c9..bf48ab81f 100644
--- a/lib/Google/vendor/google/cloud-storage/src/SigningHelper.php
+++ b/lib/Google/vendor/google/cloud-storage/src/SigningHelper.php
@@ -60,14 +60,15 @@ public static function getHelper()
* Sign using the version inferred from `$options.version`.
*
* @param ConnectionInterface $connection A connection to the Cloud Storage
- * API.
+ * API. This object is created by StorageClient,
+ * and should not be instantiated outside of this client.
* @param Timestamp|\DateTimeInterface|int $expires The signed URL
* expiration.
* @param string $resource The URI to the storage resource, preceded by a
* leading slash.
* @param int|null $generation The resource generation.
* @param array $options Configuration options. See
- * {@see Google\Cloud\Storage\StorageObject::signedUrl()} for
+ * {@see StorageObject::signedUrl()} for
* details.
* @return string
* @throws \InvalidArgumentException
@@ -110,14 +111,15 @@ public function sign(ConnectionInterface $connection, $expires, $resource, $gene
* This method will be deprecated in the future.
*
* @param ConnectionInterface $connection A connection to the Cloud Storage
- * API.
+ * API. This object is created by StorageClient,
+ * and should not be instantiated outside of this client.
* @param Timestamp|\DateTimeInterface|int $expires The signed URL
* expiration.
* @param string $resource The URI to the storage resource, preceded by a
* leading slash.
* @param int|null $generation The resource generation.
* @param array $options Configuration options. See
- * {@see Google\Cloud\Storage\StorageObject::signedUrl()} for
+ * {@see StorageObject::signedUrl()} for
* details.
* @return string
* @throws \InvalidArgumentException
@@ -206,14 +208,15 @@ public function v2Sign(ConnectionInterface $connection, $expires, $resource, $ge
* Sign a storage URL using Google Signed URLs v4.
*
* @param ConnectionInterface $connection A connection to the Cloud Storage
- * API.
+ * API. This object is created by StorageClient,
+ * and should not be instantiated outside of this client.
* @param Timestamp|\DateTimeInterface|int $expires The signed URL
* expiration.
* @param string $resource The URI to the storage resource, preceded by a
* leading slash.
* @param int|null $generation The resource generation.
* @param array $options Configuration options. See
- * {@see Google\Cloud\Storage\StorageObject::signedUrl()} for
+ * {@see StorageObject::signedUrl()} for
* details.
* @return string
* @throws \InvalidArgumentException
@@ -362,12 +365,14 @@ public function v4Sign(ConnectionInterface $connection, $expires, $resource, $ge
* Create an HTTP POST policy using v4 signing.
*
* @param ConnectionInterface $connection A Connection to Google Cloud Storage.
+ * This object is created by StorageClient,
+ * and should not be instantiated outside of this client.
* @param Timestamp|\DateTimeInterface|int $expires The signed URL
* expiration.
* @param string $resource The URI to the storage resource, preceded by a
* leading slash.
* @param array $options Configuration options. See
- * {@see Google\Cloud\Storage\Bucket::generateSignedPostPolicyV4()} for details.
+ * {@see Bucket::generateSignedPostPolicyV4()} for details.
* @return array An associative array, containing (string) `uri` and
* (array) `fields` keys.
*/
@@ -780,6 +785,8 @@ private function normalizeCanonicalRequestResource($resource, $bucketBoundHostna
* Get the credentials for use with signing.
*
* @param ConnectionInterface $connection A Storage connection object.
+ * This object is created by StorageClient,
+ * and should not be instantiated outside of this client.
* @param array $options Configuration options.
* @return array A list containing a credentials object at index 0 and the
* modified options at index 1.
diff --git a/lib/Google/vendor/google/cloud-storage/src/StorageClient.php b/lib/Google/vendor/google/cloud-storage/src/StorageClient.php
index 723c1a0b3..8613e0a5e 100644
--- a/lib/Google/vendor/google/cloud-storage/src/StorageClient.php
+++ b/lib/Google/vendor/google/cloud-storage/src/StorageClient.php
@@ -47,7 +47,7 @@ class StorageClient
use ArrayTrait;
use ClientTrait;
- const VERSION = '1.31.2';
+ const VERSION = '1.34.0';
const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/devstorage.full_control';
const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/devstorage.read_only';
@@ -73,6 +73,7 @@ class StorageClient
/**
* @var ConnectionInterface Represents a connection to Storage.
+ * @internal
*/
protected $connection;
@@ -126,9 +127,10 @@ public function __construct(array $config = [])
}
/**
- * Lazily instantiates a bucket. There are no network requests made at this
- * point. To see the operations that can be performed on a bucket please
- * see {@see Google\Cloud\Storage\Bucket}.
+ * Lazily instantiates a bucket.
+ *
+ * There are no network requests made at this point. To see the operations
+ * that can be performed on a bucket please see {@see Bucket}.
*
* If `$userProject` is set to true, the current project ID (used to
* instantiate the client) will be billed for all requests. If
@@ -306,6 +308,8 @@ function (array $bucket) use ($userProject) {
* Buckets can have either StorageClass OLM rules or Autoclass,
* but not both. When Autoclass is enabled on a bucket, adding
* StorageClass OLM rules will result in failure.
+ * For more information, refer to
+ * [Storage Autoclass](https://cloud.google.com/storage/docs/autoclass)
* @type array $versioning The bucket's versioning configuration.
* @type array $website The bucket's website configuration.
* @type array $billing The bucket's billing configuration.
@@ -335,7 +339,7 @@ function (array $bucket) use ($userProject) {
* occurs, signified by the hold's release.
* @type array $retentionPolicy Defines the retention policy for a
* bucket. In order to lock a retention policy, please see
- * {@see Google\Cloud\Storage\Bucket::lockRetentionPolicy()}.
+ * {@see Bucket::lockRetentionPolicy()}.
* @type int $retentionPolicy.retentionPeriod Specifies the retention
* period for objects in seconds. During the retention period an
* object cannot be overwritten or deleted. Retention period must
@@ -415,7 +419,7 @@ public function unregisterStreamWrapper($protocol = null)
* @param string $uri The URI to accept an upload request.
* @param string|resource|StreamInterface $data The data to be uploaded
* @param array $options [optional] Configuration Options. Refer to
- * {@see Google\Cloud\Core\Upload\AbstractUploader::__construct()}.
+ * {@see \Google\Cloud\Core\Upload\AbstractUploader::__construct()}.
* @return SignedUrlUploader
*/
public function signedUrlUploader($uri, $data, array $options = [])
diff --git a/lib/Google/vendor/google/cloud-storage/src/StorageObject.php b/lib/Google/vendor/google/cloud-storage/src/StorageObject.php
index c910aa2e6..724782b3b 100644
--- a/lib/Google/vendor/google/cloud-storage/src/StorageObject.php
+++ b/lib/Google/vendor/google/cloud-storage/src/StorageObject.php
@@ -57,6 +57,7 @@ class StorageObject
/**
* @var ConnectionInterface Represents a connection to Cloud Storage.
+ * @internal
*/
protected $connection;
@@ -77,7 +78,8 @@ class StorageObject
/**
* @param ConnectionInterface $connection Represents a connection to Cloud
- * Storage.
+ * Storage. This object is created by StorageClient,
+ * and should not be instantiated outside of this client.
* @param string $name The object's name.
* @param string $bucket The name of the bucket the object is contained in.
* @param string $generation [optional] The generation of the object.
@@ -546,7 +548,7 @@ public function rename($name, array $options = [])
* Download an object as a string.
*
* For an example of setting the range header to download a subrange of the
- * object please see {@see Google\Cloud\Storage\StorageObject::downloadAsStream()}.
+ * object please see {@see StorageObject::downloadAsStream()}.
*
* Example:
* ```
@@ -580,7 +582,7 @@ public function downloadAsString(array $options = [])
* Download an object to a specified location.
*
* For an example of setting the range header to download a subrange of the
- * object please see {@see Google\Cloud\Storage\StorageObject::downloadAsStream()}.
+ * object please see {@see StorageObject::downloadAsStream()}.
*
* Example:
* ```
@@ -684,7 +686,7 @@ public function downloadAsStream(array $options = [])
* Asynchronously download an object as a stream.
*
* For an example of setting the range header to download a subrange of the
- * object please see {@see Google\Cloud\Storage\StorageObject::downloadAsStream()}.
+ * object please see {@see StorageObject::downloadAsStream()}.
*
* Example:
* ```
@@ -700,7 +702,7 @@ public function downloadAsStream(array $options = [])
*
* ```
* // Download all objects in a bucket asynchronously.
- * use GuzzleHttp\Promise;
+ * use GuzzleHttp\Promise\Utils;
* use Psr\Http\Message\StreamInterface;
*
* $promises = [];
@@ -712,7 +714,7 @@ public function downloadAsStream(array $options = [])
* });
* }
*
- * Promise\unwrap($promises);
+ * Utils::unwrap($promises);
* ```
*
* @see https://cloud.google.com/storage/docs/json_api/v1/objects/get Objects get API documentation.
@@ -763,10 +765,10 @@ public function downloadAsStreamAsync(array $options = [])
* Token Creator" IAM role.
*
* Additionally, signing using IAM requires different scopes. When creating
- * an instance of {@see Google\Cloud\Storage\StorageClient}, provide the
+ * an instance of {@see StorageClient}, provide the
* `https://www.googleapis.com/auth/cloud-platform` scopein `$options.scopes`.
* This scope may be used entirely in place of the scopes provided in
- * {@see Google\Cloud\Storage\StorageClient}.
+ * {@see StorageClient}.
*
* App Engine and Compute Engine will attempt to sign URLs using IAM.
*
@@ -811,7 +813,7 @@ public function downloadAsStreamAsync(array $options = [])
* @see https://cloud.google.com/storage/docs/access-control/signed-urls Signed URLs
*
* @param Timestamp|\DateTimeInterface|int $expires Specifies when the URL
- * will expire. May provide an instance of {@see Google\Cloud\Core\Timestamp},
+ * will expire. May provide an instance of {@see \Google\Cloud\Core\Timestamp},
* [http://php.net/datetimeimmutable](`\DateTimeImmutable`), or a
* UNIX timestamp as an integer.
* @param array $options {
@@ -904,7 +906,7 @@ public function signedUrl($expires, array $options = [])
/**
* Create a Signed Upload URL for this object.
*
- * This method differs from {@see Google\Cloud\Storage\StorageObject::signedUrl()}
+ * This method differs from {@see StorageObject::signedUrl()}
* in that it allows you to initiate a new resumable upload session. This
* can be used to allow non-authenticated users to insert an object into a
* bucket.
@@ -915,7 +917,7 @@ public function signedUrl($expires, array $options = [])
* more information.
*
* If you prefer to skip this initial step, you may find
- * {@see Google\Cloud\Storage\StorageObject::beginSignedUploadSession()} to
+ * {@see StorageObject::beginSignedUploadSession()} to
* fit your needs. Note that `beginSignedUploadSession()` cannot be used
* with Google Cloud PHP's Signed URL Uploader, and does not support a
* configurable expiration date.
@@ -933,7 +935,7 @@ public function signedUrl($expires, array $options = [])
* ```
*
* @param Timestamp|\DateTimeInterface|int $expires Specifies when the URL
- * will expire. May provide an instance of {@see Google\Cloud\Core\Timestamp},
+ * will expire. May provide an instance of {@see \Google\Cloud\Core\Timestamp},
* [http://php.net/datetimeimmutable](`\DateTimeImmutable`), or a
* UNIX timestamp as an integer.
* @param array $options {
@@ -1014,7 +1016,7 @@ public function signedUploadUrl($expires, array $options = [])
* Create a signed URL upload session.
*
* The returned URL differs from the return value of
- * {@see Google\Cloud\Storage\StorageObject::signedUploadUrl()} in that it
+ * {@see StorageObject::signedUploadUrl()} in that it
* is ready to accept upload data immediately via an HTTP PUT request.
*
* Because an upload session is created by the client, the expiration date
diff --git a/lib/Google/vendor/google/cloud-storage/src/WriteStream.php b/lib/Google/vendor/google/cloud-storage/src/WriteStream.php
index c78bcc91a..ba5d07fbc 100644
--- a/lib/Google/vendor/google/cloud-storage/src/WriteStream.php
+++ b/lib/Google/vendor/google/cloud-storage/src/WriteStream.php
@@ -60,7 +60,7 @@ public function __construct(AbstractUploader $uploader = null, $options = [])
/**
* Close the stream. Uploads any remaining data.
*/
- public function close()
+ public function close(): void
{
if ($this->uploader && $this->hasWritten) {
$this->uploader->upload();
@@ -75,7 +75,7 @@ public function close()
* @return int The number of bytes written
* @throws \RuntimeException
*/
- public function write($data)
+ public function write($data): int
{
if (!isset($this->uploader)) {
throw new \RuntimeException("No uploader set.");
@@ -98,12 +98,12 @@ public function write($data)
*
* @param AbstractUploader $uploader The new uploader to use.
*/
- public function setUploader($uploader)
+ public function setUploader($uploader): void
{
$this->uploader = $uploader;
}
- private function getChunkedWriteSize()
+ private function getChunkedWriteSize(): int
{
return (int) floor($this->getSize() / $this->chunkSize) * $this->chunkSize;
}
diff --git a/lib/Google/vendor/google/crc32/.github/workflows/test.yml b/lib/Google/vendor/google/crc32/.github/workflows/test.yml
deleted file mode 100644
index d5a072b40..000000000
--- a/lib/Google/vendor/google/crc32/.github/workflows/test.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-name: PHP CRC32
-
-on: [push]
-
-jobs:
- lint:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- # No need to lint on every version, so pin this to the most recent version.
- php-version: ['8.2']
-
- steps:
- - uses: actions/checkout@v3
-
- - name: Setup PHP ${{ matrix.php-version }} with tools
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php-version }}
- tools: php-cs-fixer
-
- - name: Lint
- run: make lint
-
- test:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest]
- php-version: ['7.4', '8.0', '8.1', '8.2']
-
- steps:
- - uses: actions/checkout@v3
-
- - name: Setup PHP ${{ matrix.php-version }} with tools
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php-version }}
- tools: phpunit phpize php-config
-
- - name: Install dependencies
- run: composer install --prefer-dist
-
- - name: Test
- run: make test
diff --git a/lib/Google/vendor/google/crc32/.gitignore b/lib/Google/vendor/google/crc32/.gitignore
deleted file mode 100644
index c9860255d..000000000
--- a/lib/Google/vendor/google/crc32/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-vendor
-.php_cs.cache
-ext/.deps
-ext/crc32c
-*~
-composer.lock
diff --git a/lib/Google/vendor/google/crc32/CONTRIBUTING.md b/lib/Google/vendor/google/crc32/CONTRIBUTING.md
deleted file mode 100644
index ae4e04324..000000000
--- a/lib/Google/vendor/google/crc32/CONTRIBUTING.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# How to Contribute
-
-We'd love to accept your patches and contributions to this project. There are
-just a few small guidelines you need to follow.
-
-## Contributor License Agreement
-
-Contributions to this project must be accompanied by a Contributor License
-Agreement. You (or your employer) retain the copyright to your contribution;
-this simply gives us permission to use and redistribute your contributions as
-part of the project. Head over to to see
-your current agreements on file or to sign a new one.
-
-You generally only need to submit a CLA once, so if you've already submitted one
-(even if it was for a different project), you probably don't need to do it
-again.
-
-## Code reviews
-
-All submissions, including submissions by project members, require review. We
-use GitHub pull requests for this purpose. Consult
-[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
-information on using pull requests.
-
-## Community Guidelines
-
-This project follows [Google's Open Source Community
-Guidelines](https://opensource.google.com/conduct/).
\ No newline at end of file
diff --git a/lib/Google/vendor/google/crc32/LICENSE b/lib/Google/vendor/google/crc32/LICENSE
deleted file mode 100644
index 261eeb9e9..000000000
--- a/lib/Google/vendor/google/crc32/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/lib/Google/vendor/google/crc32/Makefile b/lib/Google/vendor/google/crc32/Makefile
deleted file mode 100644
index 8bd47ccc6..000000000
--- a/lib/Google/vendor/google/crc32/Makefile
+++ /dev/null
@@ -1,71 +0,0 @@
-##
-# Copyright 2019 Google Inc. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-##
-
-.PHONY : all clean benchmark test test_all lint ext ext_test
-
-COMPOSER ?= composer
-PHP_CS_FIXER ?= vendor/bin/php-cs-fixer
-PHP_UNIT ?= vendor/bin/phpunit
-
-PHP_BIN ?= $(shell php-config --prefix)/bin
-PHP ?= $(PHP_BIN)/php
-PHP_CONFIG ?= $(PHP_BIN)/php-config
-PHPIZE ?= $(PHP_BIN)/phpize
-
-all: lint test
-
-clean:
- -rm -r .php_cs.cache
- $(MAKE) -C ext clean
-
-vendor: composer.lock
-composer.lock: composer.json
- $(COMPOSER) update
- touch composer.lock
-
-lint: vendor
- $(PHP_CS_FIXER) fix --dry-run --diff src
- $(PHP_CS_FIXER) fix --dry-run --diff crc32_benchmark.php
- $(PHP_CS_FIXER) fix --dry-run --diff tests
- $(PHP_CS_FIXER) fix --dry-run --diff ext/tests
-
-benchmark: ext vendor
- $(PHP) -d extension=ext/modules/crc32c.so crc32_benchmark.php
-
-test: ext vendor
- $(PHP) -v
- $(PHP) -d extension=ext/modules/crc32c.so $(PHP_UNIT) tests/
-
-# Test all the local versions of PHP
-test_all:
- for phpize in $$(ls $$(brew --prefix)/Cellar/php*/*/bin/phpize); do \
- NO_INTERACTION=1 \
- PHP_BIN=$$(dirname $$phpize) \
- $(MAKE) clean test; \
- done
-
-ext: ext/modules/crc32c.so
-
-ext_test: ext
- NO_INTERACTION=1 $(MAKE) -C ext test
-
-ext/modules/crc32c.so: ext/hash_crc32c.c ext/php_crc32c.c ext/php_crc32c.h
- cd ext && \
- ./install_crc32c.sh && \
- $(PHPIZE) && \
- ./configure \
- --with-php-config=$(PHP_CONFIG) && \
- $(MAKE)
diff --git a/lib/Google/vendor/google/crc32/README.md b/lib/Google/vendor/google/crc32/README.md
deleted file mode 100644
index c2bbc58e3..000000000
--- a/lib/Google/vendor/google/crc32/README.md
+++ /dev/null
@@ -1,138 +0,0 @@
-# php-crc32
-
-
-
-by [Andrew Brampton](https://bramp.net)
-
-**Deprecated**: Since PHP 8.0, the crc32 algorithms within PHP are using [hardware accelerated instructions](https://github.com/php/php-src/commit/c3299d7dab15aeed52a34535f1967d426f5327de), and are surprisingly fast. Thus this extension is not needed anymore!
-
-CRC32 implementations, that support all crc32 polynomials, as well as (if you
-install the pecl extension) hardware accelerated versions of CRC32C (Castagnoli).
-
-Supports PHP 7.4 though PHP 8.2. Older PHP versions are supported with "v0.1.0".
-
-# Usage
-
-```php
-require 'vendor/autoload.php';
-
-use Google\CRC32\CRC32;
-
-$crc = CRC32::create(CRC32::CASTAGNOLI);
-$crc->update('hello');
-echo $crc->hash();
-```
-
-Depending on the environment and the polynomial, `CRC32::create` will choose
-the fastest available version, and return one of the following classes:
-
-* `Google\CRC32\PHP` - A pure PHP implementation.
-* `Google\CRC32\Builtin` - A [PHP Hash framework](http://php.net/manual/en/book.hash.php) implementation.
-* `Google\CRC32\Google` - A hardware accelerated implementation (using [google/crc32c](https://github.com/google/crc32c)).
-
-When reading 1M byte chunks, using `CRC32::CASTAGNOLI` with PHP 7.4 on a 2014 Macbook Pro we get the following performance (higher is better):
-
-```
-Google\CRC32\PHP 12.27 MB/s
-Google\CRC32\Builtin 468.74 MB/s (available since PHP 7.4)
-Google\CRC32\Google 24,684.46 MB/s (using crc32c.so)
-```
-
-# Install
-
-```shell
-$ composer require google/crc32
-```
-
-# crc32c.so
-
-To use the hardware accelerated, a custom PHP extension must be installed. This makes use of [google/crc32c](https://github.com/google/crc32c) which provides a highly optomised `CRC32C` (Castagnoli) implementation using the SSE 4.2 instruction set of Intel CPUs.
-
-The extension can be installed from pecl, or compiled from stratch.
-
-```shell
-TODO pecl install crc32c
-```
-
-Once installed or compiled, you'll need to add `extension=crc32c.so` to your php.ini file.
-
-## Compile (Linux / Mac)
-
-Ensure that [composer](https://getcomposer.org), build tools (e.g [build-essential](https://packages.debian.org/sid/devel/build-essential), [cmake](https://packages.debian.org/sid/devel/cmake), etc), and php dev headers (e.g [php-dev](https://packages.debian.org/sid/php/php-dev)) are installed.
-
-Simple (using Makefile):
-
-```shell
-make test
-```
-
-Alternatively (manually):
-
-```shell
-cd ext
-
-# Install the google/crc32c library
-./install_crc32c.sh # From source (recommended)
-
-# or use your favorite package manager, e.g.
-# brew install crc32c
-
-# Prepare the build environment
-phpize
-./configure
-
-# or if using a custom crc32c
-# ./configure --with-crc32c=$(brew --prefix crc32c)
-
-## Build and test
-make test
-```
-
-The extension will now be at `ext/modules/crc32c.so`. This file should be copied to your [extension directory](https://php.net/extension-dir) and reference in your php.ini.
-
-```
-# php.ini
-extension=crc32c.so
-```
-
-## Testing
-
-`make test` will test with the current PHP. `make test_all` will search for available
-PHP installs, and test with all of them.
-
-## Benchmark
-
-To compare the performance of the different `CRC32C` implementations, run `make benchmark`.
-
-# Related
-
-* https://bugs.php.net/bug.php?id=71890
-
-# TODO
-
-- [ ] Test if this works on 32 bit machine.
-- [x] Add php unit (or similar) testing.
-- [x] Publish to packagist
-- [ ] Publish to pecl (https://pecl.php.net/account-request.php)
-- [x] Update instructions for linux.
-
-
-# Licence (Apache 2)
-
-*This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.*
-
-```
-Copyright 2023 Google Inc. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-```
diff --git a/lib/Google/vendor/google/crc32/composer.json b/lib/Google/vendor/google/crc32/composer.json
deleted file mode 100644
index a253cd7e4..000000000
--- a/lib/Google/vendor/google/crc32/composer.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "google/crc32",
- "description": "Various CRC32 implementations",
- "homepage": "https://github.com/google/php-crc32",
- "type": "library",
- "license": "Apache-2.0",
- "authors": [
- {
- "name": "Andrew Brampton",
- "email": "bramp@google.com"
- }
- ],
- "require": {
- "php": ">=7.4"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "v3.15",
- "phpunit/phpunit": "^9"
- },
- "autoload": {
- "psr-4": {
- "Google\\CRC32\\": "src"
- }
- }
-}
diff --git a/lib/Google/vendor/google/crc32/crc32_benchmark.php b/lib/Google/vendor/google/crc32/crc32_benchmark.php
deleted file mode 100644
index 065bdc275..000000000
--- a/lib/Google/vendor/google/crc32/crc32_benchmark.php
+++ /dev/null
@@ -1,112 +0,0 @@
-update($chunk);
-
- $i++;
- $now = microtime(true);
- $duration = ($now - $start);
-
- if ($duration >= max_duration) {
- break;
- }
- if ($duration >= min_duration && $i >= min_iterations) {
- break;
- }
- }
-
- // Very quick sanity check
- if ($crc->hash() == '00000000') {
- exit($name . ' crc check failed');
- }
-
-
- $bytes = $i * $chunk_size;
-
- echo sprintf("%s\t%10d\t%5d\t%8.2f MB/s\n", $name, $chunk_size, $i, $bytes / ($now - $start) / 1000000);
-}
-
-foreach (array(256, 4096, 1048576, 16777216) as $chunk_size) {
- test(new PHP(CRC32::CASTAGNOLI), $chunk_size);
- //test(new PHPSlicedBy4(CRC32::CASTAGNOLI), $chunk_size);
- test(new Builtin(CRC32::CASTAGNOLI), $chunk_size);
- test(new Google(), $chunk_size);
-}
diff --git a/lib/Google/vendor/google/crc32/ext/.gitignore b/lib/Google/vendor/google/crc32/ext/.gitignore
deleted file mode 100644
index 91bef2522..000000000
--- a/lib/Google/vendor/google/crc32/ext/.gitignore
+++ /dev/null
@@ -1,35 +0,0 @@
-*.lo
-*.la
-.libs
-acinclude.m4
-aclocal.m4
-autom4te.cache
-build
-config.guess
-config.h
-config.h.in
-config.log
-config.nice
-config.status
-config.sub
-configure
-configure.ac
-configure.in
-include
-install-sh
-libtool
-ltmain.sh
-Makefile
-Makefile.fragments
-Makefile.global
-Makefile.objects
-missing
-mkinstalldirs
-modules
-run-tests.php
-tests/*/*.diff
-tests/*/*.out
-tests/*/*.php
-tests/*/*.exp
-tests/*/*.log
-tests/*/*.sh
diff --git a/lib/Google/vendor/google/crc32/ext/config.m4 b/lib/Google/vendor/google/crc32/ext/config.m4
deleted file mode 100644
index c3d3d2e89..000000000
--- a/lib/Google/vendor/google/crc32/ext/config.m4
+++ /dev/null
@@ -1,63 +0,0 @@
-dnl Copyright 2019 Google Inc. All Rights Reserved.
-dnl
-dnl Licensed under the Apache License, Version 2.0 (the "License");
-dnl you may not use this file except in compliance with the License.
-dnl You may obtain a copy of the License at
-dnl
-dnl http://www.apache.org/licenses/LICENSE-2.0
-dnl
-dnl Unless required by applicable law or agreed to in writing, software
-dnl distributed under the License is distributed on an "AS-IS" BASIS,
-dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-dnl See the License for the specific language governing permissions and
-dnl limitations under the License.
-dnl
-
-PHP_ARG_WITH(crc32c, for crc32c support,
-[ --with-crc32c[=DIR] Include crc32c support. File is the optional path to google/crc32c])
-
-if test "$PHP_CRC32C" != "no"; then
- PHP_REQUIRE_CXX() # The external crc32c library uses C++.
-
- if test -r $PHP_CRC32C/; then
- SEARCH_PATH=$PHP_CRC32C
- else
- SEARCH_PATH="$PWD/crc32c/build /usr/local /usr"
- fi
-
-
- AC_MSG_CHECKING([for crc32c files])
- SEARCH_FOR="include/crc32c/crc32c.h"
-
- for i in $SEARCH_PATH ; do
- if test -r $i/$SEARCH_FOR; then
- CRC32C_DIR=$i
- AC_MSG_RESULT(found in $i)
- fi
- done
-
- # --with-crc32c -> check with-path
- if test -z "$CRC32C_DIR"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR([Please install the google/crc32c package, and use --with-crc32c])
- fi
-
- # --with-crc32c -> add include path
- PHP_ADD_INCLUDE($CRC32C_DIR/include)
-
- # --with-crc32c -> check for lib and symbol presence
- LIBNAME=crc32c
- LIBSYMBOL=crc32c_extend
-
- PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL,
- [
- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $CRC32C_DIR/$PHP_LIBDIR, CRC32C_SHARED_LIBADD)
- ],[
- AC_MSG_FAILURE([wrong crc32c lib version or lib not found])
- ],[
- -L$CRC32C_DIR/$PHP_LIBDIR -lm
- ])
-
- PHP_SUBST(CRC32C_SHARED_LIBADD)
- PHP_NEW_EXTENSION(crc32c, hash_crc32c.c php_crc32c.c, $ext_shared, , -Wall -Werror)
-fi
diff --git a/lib/Google/vendor/google/crc32/ext/hash_crc32c.c b/lib/Google/vendor/google/crc32/ext/hash_crc32c.c
deleted file mode 100644
index a622a1c6f..000000000
--- a/lib/Google/vendor/google/crc32/ext/hash_crc32c.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Copyright 2019 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * crc32c hash extension for PHP
- *
- * This file contains the crc32c hash function for
- * http://php.net/manual/en/function.hash.php
- */
-#include "php_crc32c.h"
-
-#include "ext/hash/php_hash.h"
-#include "ext/hash/php_hash_crc32.h"
-
-#include "crc32c/crc32c.h"
-
-PHP_HASH_API void CRC32CInit(PHP_CRC32_CTX *context
-#if PHP_API_VERSION >= 20201213
-, ZEND_ATTRIBUTE_UNUSED HashTable *args
-#endif
-)
-{
- context->state = 0;
-}
-
-PHP_HASH_API void CRC32CUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len)
-{
- context->state = crc32c_extend(context->state, input, len);
-}
-
-PHP_HASH_API void CRC32CFinal(uint8_t crc[4], PHP_CRC32_CTX *context)
-{
- int2byte(context->state, crc);
- context->state = 0;
-}
-
-PHP_HASH_API int CRC32CCopy(const php_hash_ops *ops, PHP_CRC32_CTX *orig_context, PHP_CRC32_CTX *copy_context)
-{
- copy_context->state = orig_context->state;
- return SUCCESS;
-}
-
-const php_hash_ops crc32_ops = {
-#if PHP_API_VERSION >= 20200620
- "crc32c",
-#endif
- (php_hash_init_func_t) CRC32CInit,
- (php_hash_update_func_t) CRC32CUpdate,
- (php_hash_final_func_t) CRC32CFinal,
- (php_hash_copy_func_t) CRC32CCopy,
-#if PHP_API_VERSION >= 20200620
- php_hash_serialize,
- php_hash_unserialize,
- PHP_CRC32_SPEC,
-#endif
- 4, /* what to say here? */
- 4,
- sizeof(PHP_CRC32_CTX),
-#if PHP_API_VERSION >= 20170718
- 0
-#endif
-};
\ No newline at end of file
diff --git a/lib/Google/vendor/google/crc32/ext/install_crc32c.sh b/lib/Google/vendor/google/crc32/ext/install_crc32c.sh
deleted file mode 100755
index 96b27c52d..000000000
--- a/lib/Google/vendor/google/crc32/ext/install_crc32c.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-# Used to build and install the google/crc32c library.
-
-##
-# Copyright 2019 Google Inc. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-##
-
-git clone https://github.com/google/crc32c
-
-cd crc32c
-git submodule update --init --recursive
-
-mkdir build
-cd build
-cmake -DCRC32C_BUILD_TESTS=0 \
- -DCRC32C_BUILD_BENCHMARKS=0 \
- -DCRC32C_USE_GLOG=0 \
- -DBUILD_SHARED_LIBS=0 \
- -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
- -DCMAKE_INSTALL_PREFIX:PATH=$PWD \
- ..
-cmake --build . --target install
diff --git a/lib/Google/vendor/google/crc32/ext/php_crc32c.c b/lib/Google/vendor/google/crc32/ext/php_crc32c.c
deleted file mode 100644
index ba08657be..000000000
--- a/lib/Google/vendor/google/crc32/ext/php_crc32c.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * Copyright 2019 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * crc32c extension for PHP
- *
- * This file sets up the crc32c module, and provide the 'crc32c' function.
- */
-
-#include "php_crc32c.h"
-
-#include "ext/hash/php_hash.h"
-#include "ext/standard/info.h"
-
-#include "crc32c/crc32c.h"
-
-extern const php_hash_ops crc32_ops;
-
-static uint32_t byte2int(const uint8_t hash[4]) {
- return (hash[0] << 24) | (hash[1] << 16) | (hash[2] << 8) | hash[3];
-}
-
-/* {{{ int crc32c( string $data [, int $crc ] )
- */
-PHP_FUNCTION(crc32c)
-{
- char *data_arg = NULL;
- size_t data_len = 0;
- char *crc_arg = NULL;
- size_t crc_len = 0;
-
-#if PHP_API_VERSION >= 20151012 /* >= PHP 7.0 */
- // fast_zpp is a faster way to parse paramters.
- ZEND_PARSE_PARAMETERS_START(1, 2)
- Z_PARAM_STRING(data_arg, data_len)
- Z_PARAM_OPTIONAL
- Z_PARAM_STRING_EX(crc_arg, crc_len, /* check_null */ 1, 0)
- ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
-#else
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s!", &data_arg, &data_len, &crc_arg, &crc_len) == FAILURE) {
- RETURN_BOOL(false);
- }
-#endif
-
- uint32_t crc = 0;
-
- if (crc_len == 4) {
- crc = byte2int((uint8_t *)crc_arg);
-
- } else if (crc_arg != NULL) {
- zend_error(E_WARNING, "crc32c(): Supplied crc must be a 4 byte string");
- RETURN_BOOL(false);
- }
-
- crc = crc32c_extend(crc, (const uint8_t *)data_arg, data_len);
-
- uint8_t hash[4];
- int2byte(crc, hash);
-
-#if PHP_API_VERSION >= 20151012 /* >= PHP 7.0 */
- RETURN_STRINGL((const char *)hash, sizeof(hash));
-#else
- RETURN_STRINGL((const char *)hash, sizeof(hash), /* dup */ 1);
-#endif
-}
-/* }}}*/
-
-
-/* {{{ PHP_RINIT_FUNCTION
- */
-PHP_RINIT_FUNCTION(crc32c)
-{
-#if PHP_VERSION_ID >= 70000
-# if defined(ZTS) && defined(COMPILE_DL_CRC32C)
- ZEND_TSRMLS_CACHE_UPDATE();
-# endif
-#endif
-
- return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_MINIT_FUNCTION
- */
-PHP_MINIT_FUNCTION(crc32c)
-{
- php_hash_register_algo("crc32c", &crc32_ops);
- return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
-PHP_MSHUTDOWN_FUNCTION(crc32c)
-{
- // TODO Unregister php_hash_register_algo
- return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_MINFO_FUNCTION
- */
-PHP_MINFO_FUNCTION(crc32c)
-{
- php_info_print_table_start();
- php_info_print_table_header(2, "Google CRC32C support", "enabled");
- php_info_print_table_end();
-}
-/* }}} */
-
-/* {{{ arginfo
- */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_crc32c, 0, 0, 1)
- ZEND_ARG_INFO(0, str)
- ZEND_ARG_INFO(0, crc)
-ZEND_END_ARG_INFO()
-/* }}} */
-
-/* {{{ crc32c_functions[]
- */
-static const zend_function_entry crc32c_functions[] = {
- PHP_FE(crc32c, arginfo_crc32c)
- PHP_FE_END
-};
-/* }}} */
-
-/* {{{ crc32c_deps
- */
-static const zend_module_dep crc32c_deps[] = {
- ZEND_MOD_REQUIRED("hash")
- ZEND_MOD_END
-};
-/* }}} */
-
-/* {{{ crc32c_module_entry
- */
-zend_module_entry crc32c_module_entry = {
- STANDARD_MODULE_HEADER_EX, NULL,
- crc32c_deps, /* Module dependencies */
- "crc32c", /* Extension name */
- crc32c_functions, /* zend_function_entry */
- PHP_MINIT(crc32c), /* PHP_MINIT - Module initialization */
- PHP_MSHUTDOWN(crc32c), /* PHP_MSHUTDOWN - Module shutdown */
- PHP_RINIT(crc32c), /* PHP_RINIT - Request initialization */
- NULL, /* PHP_RSHUTDOWN - Request shutdown */
- PHP_MINFO(crc32c), /* PHP_MINFO - Module info */
- PHP_CRC32C_VERSION, /* Version */
- STANDARD_MODULE_PROPERTIES
-};
-/* }}} */
-
-#ifdef COMPILE_DL_CRC32C
-
-# if PHP_VERSION_ID >= 70000
-# ifdef ZTS
-ZEND_TSRMLS_CACHE_DEFINE()
-# endif
-# endif /* PHP_VERSION_ID >= 70000 */
-
-ZEND_GET_MODULE(crc32c)
-#endif /* COMPILE_DL_CRC32C */
diff --git a/lib/Google/vendor/google/crc32/ext/php_crc32c.h b/lib/Google/vendor/google/crc32/ext/php_crc32c.h
deleted file mode 100644
index 661d79f20..000000000
--- a/lib/Google/vendor/google/crc32/ext/php_crc32c.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Copyright 2019 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * crc32c extension for PHP
- */
-#ifndef PHP_CRC32C_H
-# define PHP_CRC32C_H
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "php.h"
-
-#include
-#include
-
-#ifdef ZTS
-# include "TSRM.h"
-#endif
-
-extern zend_module_entry crc32c_module_entry;
-
-# define PHP_CRC32C_VERSION "1.0.0"
-
-# if PHP_VERSION_ID >= 70000
-# if defined(ZTS) && defined(COMPILE_DL_CRC32C)
-ZEND_TSRMLS_CACHE_EXTERN()
-# endif
-# endif
-
-static void int2byte(uint32_t i, uint8_t b[4]) {
- b[0] = (uint8_t) ((i >> 24) & 0xff);
- b[1] = (uint8_t) ((i >> 16) & 0xff);
- b[2] = (uint8_t) ((i >> 8) & 0xff);
- b[3] = (uint8_t) (i & 0xff);
-}
-
-#endif /* PHP_CRC32C_H */
diff --git a/lib/Google/vendor/google/crc32/ext/tests/001_loaded.phpt b/lib/Google/vendor/google/crc32/ext/tests/001_loaded.phpt
deleted file mode 100644
index 8787e9d40..000000000
--- a/lib/Google/vendor/google/crc32/ext/tests/001_loaded.phpt
+++ /dev/null
@@ -1,14 +0,0 @@
---TEST--
-crc32c() is loadable
---SKIPIF--
-
---FILE--
-
---EXPECT--
-The extension "crc32c" is available
diff --git a/lib/Google/vendor/google/crc32/ext/tests/002_basic.phpt b/lib/Google/vendor/google/crc32/ext/tests/002_basic.phpt
deleted file mode 100644
index 9d265b8b9..000000000
--- a/lib/Google/vendor/google/crc32/ext/tests/002_basic.phpt
+++ /dev/null
@@ -1,93 +0,0 @@
---TEST--
-crc32c() basic tests
---SKIPIF--
-
---FILE--
-?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"), "\n";
-?>
---EXPECT--
-00000000
-c1d04330
-e2a22936
-364b3fb7
-92c80a31
-c450d697
-53bceff1
-e627f441
-0a9421b7
-2ddc99fc
-e6599437
-9ee6ef25
-a245d57d
-477a6781
-02bd79d0
-5e405e93
-516ad412
-b2cc01fe
-0e28207f
-be93f964
-9e3be0c3
-f505ef04
-85d3dc82
-c5142380
-75eb77dd
-91ebe9f7
-f0b1168e
-572b74e2
-8a58a6d5
-9c426c50
-735400a4
-bec49c95
-a95a2079
-de2e65c5
-297a88ed
-66ed1d8b
-dcded527
-9c44184b
diff --git a/lib/Google/vendor/google/crc32/ext/tests/003_extend.phpt b/lib/Google/vendor/google/crc32/ext/tests/003_extend.phpt
deleted file mode 100644
index e1d41046b..000000000
--- a/lib/Google/vendor/google/crc32/ext/tests/003_extend.phpt
+++ /dev/null
@@ -1,47 +0,0 @@
---TEST--
-crc32c() extend tests
---SKIPIF--
-
---FILE--
-
---EXPECT--
-2c775665
-2c775665
-5e2b5be5
-319897cd
-2f6298bc
-86bd0651
-a245d57d
-a245d57d
\ No newline at end of file
diff --git a/lib/Google/vendor/google/crc32/ext/tests/004_error.phpt b/lib/Google/vendor/google/crc32/ext/tests/004_error.phpt
deleted file mode 100644
index c5da06410..000000000
--- a/lib/Google/vendor/google/crc32/ext/tests/004_error.phpt
+++ /dev/null
@@ -1,36 +0,0 @@
---TEST--
-crc32c() errors test
---SKIPIF--
-
---FILE--
-
---EXPECTF--
-string(4) ",wVe"
-
-Warning: crc32c(): Supplied crc must be a 4 byte string in %s on line %d
-bool(false)
-
-Warning: crc32c(): Supplied crc must be a 4 byte string in %s on line %d
-bool(false)
-
-Warning: crc32c(): Supplied crc must be a 4 byte string in %s on line %d
-bool(false)
-
-Warning: crc32c(): Supplied crc must be a 4 byte string in %s on line %d
-bool(false)
\ No newline at end of file
diff --git a/lib/Google/vendor/google/crc32/ext/tests/005_hash.phpt b/lib/Google/vendor/google/crc32/ext/tests/005_hash.phpt
deleted file mode 100644
index e82f4417d..000000000
--- a/lib/Google/vendor/google/crc32/ext/tests/005_hash.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-crc32c() hash tests
---SKIPIF--
-
---FILE--
-
---EXPECT--
-bool(true)
-a245d57d
\ No newline at end of file
diff --git a/lib/Google/vendor/google/crc32/ext/tests/006_serialize.phpt b/lib/Google/vendor/google/crc32/ext/tests/006_serialize.phpt
deleted file mode 100644
index 7b2b2ac45..000000000
--- a/lib/Google/vendor/google/crc32/ext/tests/006_serialize.phpt
+++ /dev/null
@@ -1,26 +0,0 @@
---TEST--
-crc32c() serialize tests
---SKIPIF--
-
---FILE--
-
---EXPECT--
-bool(true)
-a245d57d
\ No newline at end of file
diff --git a/lib/Google/vendor/google/crc32/src/Builtin.php b/lib/Google/vendor/google/crc32/src/Builtin.php
deleted file mode 100644
index 9cb10854c..000000000
--- a/lib/Google/vendor/google/crc32/src/Builtin.php
+++ /dev/null
@@ -1,88 +0,0 @@
- 'crc32b',
- CRC32::CASTAGNOLI => 'crc32c', // Added since PHP 7.4
- ];
-
- /**
- * Returns true if this $polynomial is supported by the builtin PHP hash function.
- *
- * @param integer $polynomial The polynomial
- *
- * @return boolean
- */
- public static function supports($polynomial)
- {
- if (!isset(self::$mapping[$polynomial])) {
- return false;
- }
- $algo = self::$mapping[$polynomial];
- return in_array($algo, hash_algos());
- }
-
- public function __construct($polynomial)
- {
- if (!self::supports($polynomial)) {
- throw new \InvalidArgumentException("hash_algos() does not list this polynomial.");
- }
-
- $this->algo = self::$mapping[$polynomial];
- $this->reset();
- }
-
- public function reset()
- {
- $this->hc = hash_init($this->algo);
- }
-
- public function update($data)
- {
- hash_update($this->hc, $data);
- }
-
- public function hash($raw_output = false)
- {
- // hash_final will destory the Hash Context resource, so operate on a copy.
- $hc = hash_copy($this->hc);
- return hash_final($hc, $raw_output);
- }
-
- public function version()
- {
- return $this->algo . ' PHP HASH';
- }
-
- public function __clone()
- {
- $this->hc = hash_copy($this->hc);
- }
-}
diff --git a/lib/Google/vendor/google/crc32/src/CRC32.php b/lib/Google/vendor/google/crc32/src/CRC32.php
deleted file mode 100644
index 278283c40..000000000
--- a/lib/Google/vendor/google/crc32/src/CRC32.php
+++ /dev/null
@@ -1,112 +0,0 @@
-update('hello');
- *
- * echo $crc->hash();
- * ```
- */
-class CRC32
-{
- use CRCTrait;
-
- /**
- * IEEE polynomial as used by ethernet (IEEE 802.3), v.42, fddi, gzip,
- * zip, png, ...
- */
- public const IEEE = 0xedb88320;
-
- /**
- * Castagnoli's polynomial, used in iSCSI, SCTP, Google Cloud Storage,
- * Apache Kafka, and has hardware-accelerated in modern intel CPUs.
- * https://doi.org/10.1109/26.231911
- */
- public const CASTAGNOLI = 0x82f63b78;
-
- /**
- * Koopman's polynomial.
- * https://doi.org/10.1109/DSN.2002.1028931
- */
- public const KOOPMAN = 0xeb31d82e;
-
- /**
- * The size of the checksum in bytes.
- */
- public const SIZE = 4;
-
- private static $mapping = [
- self::IEEE => 'IEEE',
- self::CASTAGNOLI => 'Castagnoli',
- self::KOOPMAN => 'Koopman',
- ];
-
- private function __construct()
- {
- // Prevent instantiation.
- }
-
- /**
- * Returns the best CRC implementation available on this machine.
- *
- * @param integer $polynomial The CRC polynomial. Use a 32-bit number,
- * or one of the supplied constants, CRC32::IEEE,
- * CRC32::CASTAGNOLI, or CRC32::KOOPMAN.
- *
- * @return CRC32Interface
- */
- public static function create($polynomial)
- {
- if (Google::supports($polynomial) && function_exists('crc32c')) {
- return new Google();
- }
-
- if (Builtin::supports($polynomial)) {
- return new Builtin($polynomial);
- }
-
- // Fallback to the pure PHP version
- return new PHP($polynomial);
- }
-
- /**
- * Prints the human friendly name for this polynomial.
- *
- * @param integer $polynomial The CRC polynomial.
- *
- * @return string
- */
- public static function string($polynomial)
- {
- if (isset(self::$mapping[$polynomial])) {
- return self::$mapping[$polynomial];
- }
- return '0x' . self::int2hex($polynomial);
- }
-}
diff --git a/lib/Google/vendor/google/crc32/src/CRCInterface.php b/lib/Google/vendor/google/crc32/src/CRCInterface.php
deleted file mode 100644
index 1d9c06312..000000000
--- a/lib/Google/vendor/google/crc32/src/CRCInterface.php
+++ /dev/null
@@ -1,59 +0,0 @@
-reset();
- }
-
- public function reset()
- {
- $this->crc = hex2bin('00000000');
- }
-
- public function update($data)
- {
- $this->crc = crc32c($data, $this->crc);
- }
-
- public function hash($raw_output = false)
- {
- if ($raw_output === true) {
- return $this->crc;
- }
- return bin2hex($this->crc);
- }
-
- public function version()
- {
- return 'Hardware accelerated (https://github.com/google/crc32c)';
- }
-}
diff --git a/lib/Google/vendor/google/crc32/src/PHP.php b/lib/Google/vendor/google/crc32/src/PHP.php
deleted file mode 100644
index 28ee3cf59..000000000
--- a/lib/Google/vendor/google/crc32/src/PHP.php
+++ /dev/null
@@ -1,80 +0,0 @@
-polynomial = $polynomial;
- $this->table = Table::get($polynomial);
- $this->reset();
- }
-
-
- public function reset()
- {
- $this->crc = ~0;
- }
-
- public function update($data)
- {
- $crc = $this->crc;
- $table = $this->table;
- $len = strlen($data);
- for ($i = 0; $i < $len; ++$i) {
- $crc = (($crc >> 8) & 0xffffff) ^ $table[($crc ^ ord($data[$i])) & 0xff];
- }
- $this->crc = $crc;
- }
-
- public function hash($raw_output = false)
- {
- return $this->crcHash(~$this->crc, $raw_output);
- }
-
- public function version()
- {
- return 'crc32(' . $this->int2hex($this->polynomial) . ') software version';
- }
-}
diff --git a/lib/Google/vendor/google/crc32/src/PHPSlicedBy4.php b/lib/Google/vendor/google/crc32/src/PHPSlicedBy4.php
deleted file mode 100644
index 9a165e725..000000000
--- a/lib/Google/vendor/google/crc32/src/PHPSlicedBy4.php
+++ /dev/null
@@ -1,108 +0,0 @@
-polynomial = $polynomial;
- $this->table = Table::create4($polynomial);
- $this->reset();
- }
-
- public function reset()
- {
- $this->crc = ~0;
- }
-
- public function update($data)
- {
- $crc = $this->crc;
- $table0 = $this->table[0];
- $table1 = $this->table[1];
- $table2 = $this->table[2];
- $table3 = $this->table[3];
-
- $len = strlen($data);
- $remain = ($len % 4);
- $len1 = $len - $remain;
- for ($i = 0; $i < $len1; $i += 4) {
- $b = (ord($data[$i+3])<<24) |
- (ord($data[$i+2])<<16) |
- (ord($data[$i+1])<<8) |
- (ord($data[$i]));
-
- $crc = ($crc ^ $b) & 0xffffffff;
-
- $crc = $table3[ $crc & 0xff] ^
- $table2[($crc>>8) & 0xff] ^
- $table1[($crc>>16) & 0xff] ^
- $table0[($crc>>24) & 0xff];
- }
-
- switch ($remain) {
- case 3:
- $crc = (($crc >> 8) & 0xffffff) ^ $table0[($crc ^ ord($data[$i])) & 0xff];
- $crc = (($crc >> 8) & 0xffffff) ^ $table0[($crc ^ ord($data[$i+1])) & 0xff];
- $crc = (($crc >> 8) & 0xffffff) ^ $table0[($crc ^ ord($data[$i+2])) & 0xff];
- break;
- case 2:
- $crc = (($crc >> 8) & 0xffffff) ^ $table0[($crc ^ ord($data[$i])) & 0xff];
- $crc = (($crc >> 8) & 0xffffff) ^ $table0[($crc ^ ord($data[$i+1])) & 0xff];
- break;
- case 1:
- $crc = (($crc >> 8) & 0xffffff) ^ $table0[($crc ^ ord($data[$i])) & 0xff];
- break;
- case 0:
- }
-
- $this->crc = $crc;
- }
-
- public function hash($raw_output = false)
- {
- return $this->crcHash(~$this->crc, $raw_output);
- }
-
- public function version()
- {
- return 'crc32(' . $this->int2hex($this->polynomial) . ') software version';
- }
-}
diff --git a/lib/Google/vendor/google/crc32/src/Table.php b/lib/Google/vendor/google/crc32/src/Table.php
deleted file mode 100644
index 3dee7c20e..000000000
--- a/lib/Google/vendor/google/crc32/src/Table.php
+++ /dev/null
@@ -1,113 +0,0 @@
- $value) {
- echo "0x" . int2hex($value) . ",";
- if ($i % 4 == 3) {
- echo "\n";
- } else {
- echo " ";
- }
- }
-
- echo "\n\n";
- }
-
- /**
- * Gets a CRC table, by creating it, or using a previously cached result.
- *
- * @param integer $polynomial The polynomial
- *
- * @return array The table
- */
- public static function get($polynomial)
- {
- if (isset(self::$tables[$polynomial])) {
- return self::$tables[$polynomial];
- }
- self::$tables[$polynomial] = self::create($polynomial);
- return self::$tables[$polynomial];
- }
-
- /**
- * Create a CRC table.
- *
- * @param integer $polynomial The polynomial.
- *
- * @return array The table.
- */
- public static function create($polynomial)
- {
- $table = array_fill(0, 256, 0);
-
- for ($i = 0; $i < 256; $i++) {
- $crc = $i;
- for ($j = 0; $j < 8; $j++) {
- if ($crc & 1 == 1) {
- $crc = ($crc >> 1) ^ $polynomial;
- } else {
- $crc >>= 1;
- }
- }
- $table[$i] = $crc;
- }
-
- return $table;
- }
-
- /**
- * Create a CRC table sliced by 4.
- *
- * @param integer $polynomial The polynomial.
- *
- * @return array The table.
- */
- public static function create4($polynomial)
- {
- $table = array_fill(0, 4, array_fill(0, 256, 0));
- $table[0] = self::create($polynomial);
-
- for ($i = 0; $i < 256; $i++) {
- // for Slicing-by-4 and Slicing-by-8
- $table[1][$i] = ($table[0][$i] >> 8) ^ $table[0][$table[0][$i] & 0xFF];
- $table[2][$i] = ($table[1][$i] >> 8) ^ $table[0][$table[1][$i] & 0xFF];
- $table[3][$i] = ($table[2][$i] >> 8) ^ $table[0][$table[2][$i] & 0xFF];
-
- /*
- // only Slicing-by-8
- $table[4][$i] = ($table[3][$i] >> 8) ^ $table[0][$table[3][$i] & 0xFF];
- $table[5][$i] = ($table[4][$i] >> 8) ^ $table[0][$table[4][$i] & 0xFF];
- $table[6][$i] = ($table[5][$i] >> 8) ^ $table[0][$table[5][$i] & 0xFF];
- $table[7][$i] = ($table[6][$i] >> 8) ^ $table[0][$table[6][$i] & 0xFF];
- */
- }
- return $table;
- }
-}
diff --git a/lib/Google/vendor/google/crc32/tests/BuiltinTest.php b/lib/Google/vendor/google/crc32/tests/BuiltinTest.php
deleted file mode 100644
index af4857ea8..000000000
--- a/lib/Google/vendor/google/crc32/tests/BuiltinTest.php
+++ /dev/null
@@ -1,50 +0,0 @@
-expectException('InvalidArgumentException');
-
- new Builtin(CRC32::KOOPMAN);
- }
-
- /**
- * @dataProvider supports
- */
- public function testSupports($algo, $expected)
- {
- $this->assertEquals($expected, Builtin::supports($algo));
- }
-
- public function supports()
- {
- return [
- 'IEEE' => [CRC32::IEEE, true],
- 'CASTAGNOLI' => [CRC32::CASTAGNOLI, true],
- 'KOOPMAN' => [CRC32::KOOPMAN, false],
- ];
- }
-}
diff --git a/lib/Google/vendor/google/crc32/tests/CRC32Test.php b/lib/Google/vendor/google/crc32/tests/CRC32Test.php
deleted file mode 100644
index 71bd31544..000000000
--- a/lib/Google/vendor/google/crc32/tests/CRC32Test.php
+++ /dev/null
@@ -1,158 +0,0 @@
-update($input);
-
- $this->assertEquals(
- $expected,
- $crc->hash(false),
- 'hash(' . $input . ')'
- );
-
- $this->assertEquals(
- $expected,
- $crc->hash(false),
- 'hash(' . $input . ') again'
- );
- }
-
- /**
- * @dataProvider data
- */
- public function testHashRaw($crc_class, $poly, $input, $expected)
- {
- $crc = new $crc_class($poly);
- $crc->update($input);
-
- $this->assertEquals(
- hex2bin($expected),
- $crc->hash(true),
- 'hash(' . $input . ', true)'
- );
- }
-
- /**
- * Extended hashing. Read increasingly sized chunks of input.
- * @dataProvider data
- */
- public function testExtendedHash($crc_class, $poly, $input, $expected)
- {
- $crc = new $crc_class($poly);
-
- $start = 0;
- $len = 1;
- while ($start < strlen($input)) {
- $chunk = substr($input, $start, $len);
- $crc->update($chunk);
-
- $start += $len;
- $len *= 2;
- }
-
- $this->assertEquals(
- $expected,
- $crc->hash(),
- 'hash(' . $input . ')'
- );
- }
-
- /**
- * @dataProvider crcs
- */
- public function testReset($crc_class, $poly)
- {
- $data = array(
- 'abc' => array(
- CRC32::IEEE => '352441c2',
- CRC32::CASTAGNOLI => '364b3fb7'),
- 'abcdef' => array(
- CRC32::IEEE => '4b8e39ef',
- CRC32::CASTAGNOLI => '53bceff1'),
- );
-
- $crc = new $crc_class($poly);
- $this->assertEquals('00000000', $crc->hash());
-
- $crc->update('abc');
- $this->assertEquals($data['abc'][$poly], $crc->hash());
-
- $crc->reset();
- $this->assertEquals('00000000', $crc->hash());
-
- $crc->update('abcdef');
- $this->assertEquals($data['abcdef'][$poly], $crc->hash());
- }
-
- /**
- * @dataProvider crcs
- */
- public function testClone($crc_class, $poly)
- {
- $data = array(
- 'abc' => array(
- CRC32::IEEE => '352441c2',
- CRC32::CASTAGNOLI => '364b3fb7'),
- 'abcdefgh' => array(
- CRC32::IEEE => 'aeef2a50',
- CRC32::CASTAGNOLI => '0a9421b7'),
- );
-
- $a = new $crc_class($poly);
- $a->update('abc');
-
- $b = clone $a;
- $b->update('defgh');
-
- // $b should be updated, but $a should stay the same.
- $this->assertEquals(
- $data['abc'][$poly],
- $a->hash(),
- '$a->update("abc")'
- );
-
- $this->assertEquals(
- $data['abcdefgh'][$poly],
- $b->hash(),
- 'clone($a)->update("abcdefgh")'
- );
- }
-}
diff --git a/lib/Google/vendor/google/crc32/tests/DataIterator.php b/lib/Google/vendor/google/crc32/tests/DataIterator.php
deleted file mode 100644
index 486d83360..000000000
--- a/lib/Google/vendor/google/crc32/tests/DataIterator.php
+++ /dev/null
@@ -1,204 +0,0 @@
-crcs, 'Google\CRC32\Google');
- }
- }
-
- public function rewind(): void
- {
- reset($this->crcs);
- reset($this->algos);
- }
-
- public function valid(): bool
- {
- return current($this->crcs) !== false &&
- current($this->algos) !== false;
- }
-
- #[\ReturnTypeWillChange]
- public function key()
- {
- return $this->count;
- }
-
- #[\ReturnTypeWillChange]
- public function current()
- {
- return [current($this->crcs), current($this->algos)];
- }
-
- public function next(): void
- {
- $this->count++;
- if (next($this->algos) === false) {
- reset($this->algos);
- next($this->crcs);
- }
-
- // Skip unsupported polynomials
- if ($this->valid()) {
- $crc_class = current($this->crcs);
- $poly = current($this->algos);
- if (!$crc_class::supports($poly)) {
- $this->next();
- }
- }
- }
-}
-
-class DataIterator implements Iterator
-{
- protected $crcs = [
- 'Google\CRC32\PHP',
- 'Google\CRC32\PHPSlicedBy4',
- 'Google\CRC32\Builtin',
- ];
-
- protected $algos = [
- CRC32::IEEE,
- CRC32::CASTAGNOLI
- ];
-
- /**
- * Various test data, taken from:
- * * https://github.com/php/php-src/blob/master/ext/hash/tests/crc32.phpt
- * * https://golang.org/src/hash/crc32/crc32_test.go
- * * https://tools.ietf.org/html/rfc3720#appendix-B.4
- *
- * @var array Hashes for CRC32::IEEE and CRC32::CASTAGNOLI
- */
- protected $data = [
- '' => array('00000000', '00000000'),
- 'a' => array('e8b7be43', 'c1d04330'),
- 'ab' => array('9e83486d', 'e2a22936'),
- 'abc' => array('352441c2', '364b3fb7'),
- 'abcd' => array('ed82cd11', '92c80a31'),
- 'abcde' => array('8587d865', 'c450d697'),
- 'abcdef' => array('4b8e39ef', '53bceff1'),
- 'abcdefg' => array('312a6aa6', 'e627f441'),
- 'abcdefgh' => array('aeef2a50', '0a9421b7'),
- 'abcdefghi' => array('8da988af', '2ddc99fc'),
- 'abcdefghij' => array('3981703a', 'e6599437'),
- 'abcdefghijklmnopqrstuvwxyz' => array('4c2750bd', '9ee6ef25'),
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' => array('1fc2e6d2', 'a245d57d'),
- '12345678901234567890123456789012345678901234567890123456789012345678901234567890' => array('7ca94a72', '477a6781'),
- 'message digest' => array('20159d7f', '02bd79d0'),
- "I can't remember anything" => array('69147a4e', '5e405e93'),
- "I can't remember anythingCan’t tell if this is true or dream" => array('3ee63999', '516ad412'),
- 'Discard medicine more than two years old.' => array('6b9cdfe7', 'b2cc01fe'),
- 'He who has a shady past knows that nice guys finish last.' => array('c90ef73f', '0e28207f'),
- "I wouldn't marry him with a ten foot pole." => array('b902341f', 'be93f964'),
- "Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave" => array('042080e8', '9e3be0c3'),
- "The days of the digital watch are numbered. -Tom Stoppard" => array('154c6d11', 'f505ef04'),
- "Nepal premier won't resign." => array('4c418325', '85d3dc82'),
- "For every action there is an equal and opposite government program." => array('33955150', 'c5142380'),
- "His money is twice tainted: 'taint yours and 'taint mine." => array('26216a4b', '75eb77dd'),
- "There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977" => array('1abbe45e', '91ebe9f7'),
- "It's a tiny change to the code and not completely disgusting. - Bob Manchek" => array('c89a94f7', 'f0b1168e'),
- "size: a.out: bad magic" => array('ab3abe14', '572b74e2'),
- "The major problem is with sendmail. -Mark Horton" => array('bab102b6', '8a58a6d5'),
- "Give me a rock, paper and scissors and I will move the world. CCFestoon" => array('999149d7', '9c426c50'),
- "If the enemy is within range, then so are you." => array('6d52a33c', '735400a4'),
- "It's well we cannot hear the screams/That we create in others' dreams." => array('90631e8d', 'bec49c95'),
- "You remind me of a TV show, but that's all right: I watch it anyway." => array('78309130', 'a95a2079'),
- "C is as portable as Stonehedge!!" => array('7d0a377f', 'de2e65c5'),
- "Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley" => array('8c79fd79', '297a88ed'),
- "The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule" => array('a20b7167', '66ed1d8b'),
- "How can you write a big system without C++? -Paul Glick" => array('8e0bb443', 'dcded527'),
- "\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#\$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" => array('29058c73', '9c44184b')
- ];
-
- protected $count = 0;
-
- public function __construct()
- {
- if (extension_loaded('crc32c')) {
- array_push($this->crcs, 'Google\CRC32\Google');
- }
- }
-
- public function rewind(): void
- {
- reset($this->crcs);
- reset($this->algos);
- reset($this->data);
- }
-
- public function valid(): bool
- {
- return current($this->crcs) !== false &&
- current($this->algos) !== false &&
- current($this->data) !== false;
- }
-
- #[\ReturnTypeWillChange]
- public function key()
- {
- return $this->count;
- }
-
- #[\ReturnTypeWillChange]
- public function current()
- {
- return [current($this->crcs), current($this->algos), key($this->data), current($this->data)[key($this->algos)]];
- }
-
- public function next(): void
- {
- $this->count++;
- if (next($this->data) === false) {
- reset($this->data);
- if (next($this->algos) === false) {
- reset($this->algos);
- next($this->crcs);
- }
- }
-
- // Skip unsupported polynomials
- if ($this->valid()) {
- $crc_class = current($this->crcs);
- $poly = current($this->algos);
- if (!$crc_class::supports($poly)) {
- $this->next();
- }
- }
- }
-}
diff --git a/lib/Google/vendor/google/crc32/tests/GoogleTest.php b/lib/Google/vendor/google/crc32/tests/GoogleTest.php
deleted file mode 100644
index b27f7b73c..000000000
--- a/lib/Google/vendor/google/crc32/tests/GoogleTest.php
+++ /dev/null
@@ -1,56 +0,0 @@
-markTestSkipped();
- return;
- }
-
- $this->expectException('InvalidArgumentException');
-
- new Google();
- }
-
- /**
- * @dataProvider supports
- */
- public function testSupports($algo, $expected)
- {
- $this->assertEquals($expected, Google::supports($algo));
- }
-
- public function supports()
- {
- return [
- 'IEEE' => [CRC32::IEEE, false],
- 'CASTAGNOLI' => [CRC32::CASTAGNOLI, true],
- 'KOOPMAN' => [CRC32::KOOPMAN, false],
- ];
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/CHANGELOG.md b/lib/Google/vendor/guzzlehttp/guzzle/CHANGELOG.md
index 1144eb763..990b86c9e 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/CHANGELOG.md
+++ b/lib/Google/vendor/guzzlehttp/guzzle/CHANGELOG.md
@@ -3,6 +3,21 @@
Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
+## 7.8.0 - 2023-08-27
+
+### Added
+
+- Support for PHP 8.3
+- Added automatic closing of handles on `CurlFactory` object destruction
+
+
+## 7.7.1 - 2023-08-27
+
+### Changed
+
+- Remove the need for `AllowDynamicProperties` in `CurlMultiHandler`
+
+
## 7.7.0 - 2023-05-21
### Added
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/UPGRADING.md b/lib/Google/vendor/guzzlehttp/guzzle/UPGRADING.md
index 45417a7e1..8fa0afb5d 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/UPGRADING.md
+++ b/lib/Google/vendor/guzzlehttp/guzzle/UPGRADING.md
@@ -27,7 +27,7 @@ Please make sure:
- Function `GuzzleHttp\Exception\RequestException::getResponseBodySummary` is removed.
Use `\GuzzleHttp\Psr7\get_message_body_summary` as an alternative.
- Function `GuzzleHttp\Cookie\CookieJar::getCookieValue` is removed.
-- Request option `exception` is removed. Please use `http_errors`.
+- Request option `exceptions` is removed. Please use `http_errors`.
- Request option `save_to` is removed. Please use `sink`.
- Pool option `pool_size` is removed. Please use `concurrency`.
- We now look for environment variables in the `$_SERVER` super global, due to thread safety issues with `getenv`. We continue to fallback to `getenv` in CLI environments, for maximum compatibility.
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/composer.json b/lib/Google/vendor/guzzlehttp/guzzle/composer.json
index 3207f8c3a..72defd614 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/composer.json
+++ b/lib/Google/vendor/guzzlehttp/guzzle/composer.json
@@ -53,8 +53,8 @@
"require": {
"php": "^7.2.5 || ^8.0",
"ext-json": "*",
- "guzzlehttp/promises": "^1.5.3 || ^2.0",
- "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
+ "guzzlehttp/promises": "^1.5.3 || ^2.0.1",
+ "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
"psr/http-client": "^1.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0"
},
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/Client.php b/lib/Google/vendor/guzzlehttp/guzzle/src/Client.php
index 9b0d71070..bc6efc90f 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/Client.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/Client.php
@@ -202,7 +202,7 @@ public function request(string $method, $uri = '', array $options = []): Respons
*
* @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0.
*/
- public function getConfig(?string $option = null)
+ public function getConfig(string $option = null)
{
return $option === null
? $this->config
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/lib/Google/vendor/guzzlehttp/guzzle/src/ClientInterface.php
index 6aaee61af..1788e16ab 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/ClientInterface.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/ClientInterface.php
@@ -80,5 +80,5 @@ public function requestAsync(string $method, $uri, array $options = []): Promise
*
* @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0.
*/
- public function getConfig(?string $option = null);
+ public function getConfig(string $option = null);
}
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/lib/Google/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
index b4ced5a1a..fa2b10a8c 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
@@ -96,9 +96,6 @@ public function getCookieByName(string $name): ?SetCookie
return null;
}
- /**
- * {@inheritDoc}
- */
public function toArray(): array
{
return \array_map(static function (SetCookie $cookie): array {
@@ -106,10 +103,7 @@ public function toArray(): array
}, $this->getIterator()->getArrayCopy());
}
- /**
- * {@inheritDoc}
- */
- public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void
+ public function clear(string $domain = null, string $path = null, string $name = null): void
{
if (!$domain) {
$this->cookies = [];
@@ -126,25 +120,22 @@ static function (SetCookie $cookie) use ($domain): bool {
$this->cookies = \array_filter(
$this->cookies,
static function (SetCookie $cookie) use ($path, $domain): bool {
- return !($cookie->matchesPath($path) &&
- $cookie->matchesDomain($domain));
+ return !($cookie->matchesPath($path)
+ && $cookie->matchesDomain($domain));
}
);
} else {
$this->cookies = \array_filter(
$this->cookies,
static function (SetCookie $cookie) use ($path, $domain, $name) {
- return !($cookie->getName() == $name &&
- $cookie->matchesPath($path) &&
- $cookie->matchesDomain($domain));
+ return !($cookie->getName() == $name
+ && $cookie->matchesPath($path)
+ && $cookie->matchesDomain($domain));
}
);
}
}
- /**
- * {@inheritDoc}
- */
public function clearSessionCookies(): void
{
$this->cookies = \array_filter(
@@ -155,9 +146,6 @@ static function (SetCookie $cookie): bool {
);
}
- /**
- * {@inheritDoc}
- */
public function setCookie(SetCookie $cookie): bool
{
// If the name string is empty (but not 0), ignore the set-cookie
@@ -182,9 +170,9 @@ public function setCookie(SetCookie $cookie): bool
foreach ($this->cookies as $i => $c) {
// Two cookies are identical, when their path, and domain are
// identical.
- if ($c->getPath() != $cookie->getPath() ||
- $c->getDomain() != $cookie->getDomain() ||
- $c->getName() != $cookie->getName()
+ if ($c->getPath() != $cookie->getPath()
+ || $c->getDomain() != $cookie->getDomain()
+ || $c->getName() != $cookie->getName()
) {
continue;
}
@@ -286,10 +274,10 @@ public function withCookieHeader(RequestInterface $request): RequestInterface
$path = $uri->getPath() ?: '/';
foreach ($this->cookies as $cookie) {
- if ($cookie->matchesPath($path) &&
- $cookie->matchesDomain($host) &&
- !$cookie->isExpired() &&
- (!$cookie->getSecure() || $scheme === 'https')
+ if ($cookie->matchesPath($path)
+ && $cookie->matchesDomain($host)
+ && !$cookie->isExpired()
+ && (!$cookie->getSecure() || $scheme === 'https')
) {
$values[] = $cookie->getName().'='
.$cookie->getValue();
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/lib/Google/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
index 50bc36398..8c55cc6f7 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
@@ -14,6 +14,7 @@
* cookies from a file, database, etc.
*
* @see https://docs.python.org/2/library/cookielib.html Inspiration
+ *
* @extends \IteratorAggregate
*/
interface CookieJarInterface extends \Countable, \IteratorAggregate
@@ -61,7 +62,7 @@ public function setCookie(SetCookie $cookie): bool;
* @param string|null $path Clears cookies matching a domain and path
* @param string|null $name Clears cookies matching a domain, path, and name
*/
- public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void;
+ public function clear(string $domain = null, string $path = null, string $name = null): void;
/**
* Discard all sessions cookies.
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php b/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
index 3a6a8db26..be88d9e49 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
@@ -367,11 +367,11 @@ private function applyHandlerOptions(EasyHandle $easy, array &$conf): void
// If it's a directory or a link to a directory use CURLOPT_CAPATH.
// If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO.
if (
- \is_dir($options['verify']) ||
- (
- \is_link($options['verify']) === true &&
- ($verifyLink = \readlink($options['verify'])) !== false &&
- \is_dir($verifyLink)
+ \is_dir($options['verify'])
+ || (
+ \is_link($options['verify']) === true
+ && ($verifyLink = \readlink($options['verify'])) !== false
+ && \is_dir($verifyLink)
)
) {
$conf[\CURLOPT_CAPATH] = $options['verify'];
@@ -627,4 +627,12 @@ private function createHeaderFn(EasyHandle $easy): callable
return \strlen($h);
};
}
+
+ public function __destruct()
+ {
+ foreach ($this->handles as $id => $handle) {
+ \curl_close($handle);
+ unset($this->handles[$id]);
+ }
+ }
}
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
index f0acde145..a64e1821a 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
@@ -15,11 +15,8 @@
* associative array of curl option constants mapping to values in the
* **curl** key of the provided request options.
*
- * @property resource|\CurlMultiHandle $_mh Internal use only. Lazy loaded multi-handle.
- *
* @final
*/
-#[\AllowDynamicProperties]
class CurlMultiHandler
{
/**
@@ -56,6 +53,9 @@ class CurlMultiHandler
*/
private $options = [];
+ /** @var resource|\CurlMultiHandle */
+ private $_mh;
+
/**
* This handler accepts the following options:
*
@@ -79,6 +79,10 @@ public function __construct(array $options = [])
}
$this->options = $options['options'] ?? [];
+
+ // unsetting the property forces the first access to go through
+ // __get().
+ unset($this->_mh);
}
/**
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/lib/Google/vendor/guzzlehttp/guzzle/src/HandlerStack.php
index 1ce9c4b19..6cb12f07a 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/HandlerStack.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/HandlerStack.php
@@ -44,7 +44,7 @@ class HandlerStack
* handler is provided, the best handler for your
* system will be utilized.
*/
- public static function create(?callable $handler = null): self
+ public static function create(callable $handler = null): self
{
$stack = new self($handler ?: Utils::chooseHandler());
$stack->push(Middleware::httpErrors(), 'http_errors');
@@ -131,7 +131,7 @@ public function hasHandler(): bool
* @param callable(callable): callable $middleware Middleware function
* @param string $name Name to register for this middleware.
*/
- public function unshift(callable $middleware, ?string $name = null): void
+ public function unshift(callable $middleware, string $name = null): void
{
\array_unshift($this->stack, [$middleware, $name]);
$this->cached = null;
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/lib/Google/vendor/guzzlehttp/guzzle/src/MessageFormatter.php
index 9b77eee83..04e9eb37a 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/MessageFormatter.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/MessageFormatter.php
@@ -68,7 +68,7 @@ public function __construct(?string $template = self::CLF)
* @param ResponseInterface|null $response Response that was received
* @param \Throwable|null $error Exception that was received
*/
- public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string
+ public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string
{
$cache = [];
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php b/lib/Google/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php
index a39ac248e..47934614a 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php
@@ -14,5 +14,5 @@ interface MessageFormatterInterface
* @param ResponseInterface|null $response Response that was received
* @param \Throwable|null $error Exception that was received
*/
- public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string;
+ public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string;
}
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/lib/Google/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php
index f32808a75..7aa21a623 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php
@@ -166,8 +166,8 @@ public function modifyRequest(RequestInterface $request, array $options, Respons
// not forcing RFC compliance, but rather emulating what all browsers
// would do.
$statusCode = $response->getStatusCode();
- if ($statusCode == 303 ||
- ($statusCode <= 302 && !$options['allow_redirects']['strict'])
+ if ($statusCode == 303
+ || ($statusCode <= 302 && !$options['allow_redirects']['strict'])
) {
$safeMethods = ['GET', 'HEAD', 'OPTIONS'];
$requestMethod = $request->getMethod();
diff --git a/lib/Google/vendor/guzzlehttp/guzzle/src/TransferStats.php b/lib/Google/vendor/guzzlehttp/guzzle/src/TransferStats.php
index 93fa334c8..2ce9e38f2 100644
--- a/lib/Google/vendor/guzzlehttp/guzzle/src/TransferStats.php
+++ b/lib/Google/vendor/guzzlehttp/guzzle/src/TransferStats.php
@@ -46,8 +46,8 @@ final class TransferStats
*/
public function __construct(
RequestInterface $request,
- ?ResponseInterface $response = null,
- ?float $transferTime = null,
+ ResponseInterface $response = null,
+ float $transferTime = null,
$handlerErrorData = null,
array $handlerStats = []
) {
diff --git a/lib/Google/vendor/guzzlehttp/promises/.editorconfig b/lib/Google/vendor/guzzlehttp/promises/.editorconfig
deleted file mode 100644
index 677e36e29..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/.editorconfig
+++ /dev/null
@@ -1,9 +0,0 @@
-root = true
-
-[*]
-charset = utf-8
-end_of_line = lf
-indent_size = 4
-indent_style = space
-insert_final_newline = true
-trim_trailing_whitespace = true
diff --git a/lib/Google/vendor/guzzlehttp/promises/.gitattributes b/lib/Google/vendor/guzzlehttp/promises/.gitattributes
deleted file mode 100644
index 4a4b968ca..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/.gitattributes
+++ /dev/null
@@ -1,12 +0,0 @@
-.editorconfig export-ignore
-.gitattributes export-ignore
-/.github/ export-ignore
-.gitignore export-ignore
-/.travis.yml export-ignore
-/.php-cs-fixer.dist.php export-ignore
-/phpstan-baseline.neon export-ignore
-/phpstan.neon.dist export-ignore
-/phpunit.xml.dist export-ignore
-/psalm.xml export-ignore
-/tests/ export-ignore
-/Makefile export-ignore
diff --git a/lib/Google/vendor/guzzlehttp/promises/.github/.editorconfig b/lib/Google/vendor/guzzlehttp/promises/.github/.editorconfig
deleted file mode 100644
index 7bd3346f2..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/.github/.editorconfig
+++ /dev/null
@@ -1,2 +0,0 @@
-[*.yml]
-indent_size = 2
diff --git a/lib/Google/vendor/guzzlehttp/promises/.github/FUNDING.yml b/lib/Google/vendor/guzzlehttp/promises/.github/FUNDING.yml
deleted file mode 100644
index d00f85ddd..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/.github/FUNDING.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-github: [Nyholm, GrahamCampbell]
-tidelift: "packagist/guzzlehttp/promises"
diff --git a/lib/Google/vendor/guzzlehttp/promises/.github/stale.yml b/lib/Google/vendor/guzzlehttp/promises/.github/stale.yml
deleted file mode 100644
index 53faa71bd..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/.github/stale.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-daysUntilStale: 120
-daysUntilClose: 14
-exemptLabels:
- - lifecycle/keep-open
- - lifecycle/ready-for-merge
-# Label to use when marking an issue as stale
-staleLabel: lifecycle/stale
-# Comment to post when marking an issue as stale. Set to `false` to disable
-markComment: >
- This issue has been automatically marked as stale because it has not had
- recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you
- for your contributions.
-# Comment to post when closing a stale issue. Set to `false` to disable
-closeComment: false
diff --git a/lib/Google/vendor/guzzlehttp/promises/.github/workflows/checks.yml b/lib/Google/vendor/guzzlehttp/promises/.github/workflows/checks.yml
deleted file mode 100644
index ec10a83e9..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/.github/workflows/checks.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-name: Checks
-
-on:
- push:
- branches:
- pull_request:
-
-permissions:
- contents: read
-
-jobs:
- composer-normalize:
- name: Composer Normalize
- runs-on: ubuntu-22.04
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v3
-
- - name: Composer normalize
- uses: docker://ergebnis/composer-normalize-action
diff --git a/lib/Google/vendor/guzzlehttp/promises/.github/workflows/ci.yml b/lib/Google/vendor/guzzlehttp/promises/.github/workflows/ci.yml
deleted file mode 100644
index bb80fb57e..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/.github/workflows/ci.yml
+++ /dev/null
@@ -1,65 +0,0 @@
-name: CI
-
-on:
- push:
- branches:
- pull_request:
-
-permissions:
- contents: read
-
-jobs:
- build:
- name: Build
- runs-on: ubuntu-22.04
- strategy:
- max-parallel: 10
- matrix:
- php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
-
- steps:
- - name: Set up PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php }}
- ini-values: error_reporting=E_ALL
- coverage: none
- tools: flex
-
- - name: Checkout code
- uses: actions/checkout@v3
-
- - name: Download dependencies
- run: composer update --no-interaction --optimize-autoloader --prefer-stable
-
- - name: Run PHP < 8 tests
- run: ./vendor/bin/simple-phpunit
- if: matrix.php < 8
-
- - name: Run PHP >= 8 tests
- run: ./vendor/bin/simple-phpunit
- env:
- SYMFONY_PHPUNIT_VERSION: 9.5
- if: matrix.php >= 8
-
- lowest:
- name: Lowest deps
- runs-on: ubuntu-22.04
- steps:
- - name: Set up PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: 7.3
- ini-values: error_reporting=E_ALL
- coverage: pcov
-
- - name: Checkout code
- uses: actions/checkout@v3
-
- - name: Download dependencies
- run: composer update --no-interaction --optimize-autoloader --prefer-stable --prefer-lowest
-
- - name: Run tests
- env:
- SYMFONY_DEPRECATIONS_HELPER: "max[self]=0"
- run: ./vendor/bin/simple-phpunit --coverage-text
diff --git a/lib/Google/vendor/guzzlehttp/promises/.github/workflows/static.yml b/lib/Google/vendor/guzzlehttp/promises/.github/workflows/static.yml
deleted file mode 100644
index 9e6e1e0a0..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/.github/workflows/static.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-name: Static analysis
-
-on:
- push:
- branches:
- pull_request:
-
-permissions:
- contents: read
-
-jobs:
- phpstan:
- name: PHPStan
- runs-on: ubuntu-22.04
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v3
-
- - name: Download dependencies
- run: |
- composer update --no-interaction --optimize-autoloader
-
- - name: PHPStan
- uses: docker://oskarstark/phpstan-ga:1.6.0
- with:
- entrypoint: /composer/vendor/bin/phpstan
- args: analyze --no-progress
-
- php-cs-fixer:
- name: PHP-CS-Fixer
- runs-on: ubuntu-22.04
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v3
-
- - name: Setup PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: '7.4'
- coverage: none
- extensions: mbstring
-
- - name: Download dependencies
- run: composer update --no-interaction --no-progress
-
- - name: Download PHP CS Fixer
- run: composer require "friendsofphp/php-cs-fixer:3.10.0"
-
- - name: Execute PHP CS Fixer
- run: vendor/bin/php-cs-fixer fix --diff --dry-run
-
- psalm:
- name: Psalm
- runs-on: ubuntu-22.04
- steps:
- - name: Checkout code
- uses: actions/checkout@v3
-
- - name: Psalm
- uses: docker://vimeo/psalm-github-actions
diff --git a/lib/Google/vendor/guzzlehttp/promises/.gitignore b/lib/Google/vendor/guzzlehttp/promises/.gitignore
deleted file mode 100644
index 09d91da6e..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-artifacts/
-vendor/
-composer.lock
-phpunit.xml
-.php-cs-fixer.php
-.php-cs-fixer.cache
-.phpunit.result.cache
diff --git a/lib/Google/vendor/guzzlehttp/promises/.php-cs-fixer.dist.php b/lib/Google/vendor/guzzlehttp/promises/.php-cs-fixer.dist.php
deleted file mode 100644
index fcfbd02b8..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/.php-cs-fixer.dist.php
+++ /dev/null
@@ -1,87 +0,0 @@
-setRiskyAllowed(true)
- ->setRules([
- '@PSR2' => true,
- 'array_syntax' => ['syntax' => 'short'],
- 'binary_operator_spaces' => ['operators' => ['=>' => null]],
- 'blank_line_after_opening_tag' => true,
- 'class_attributes_separation' => ['elements' => ['method' => 'one']],
- 'compact_nullable_typehint' => true,
- 'concat_space' => ['spacing' => 'one'],
- 'declare_equal_normalize' => ['space' => 'none'],
- 'declare_strict_types' => false,
- 'dir_constant' => true,
- 'fully_qualified_strict_types' => true,
- 'function_to_constant' => true,
- 'function_typehint_space' => true,
- 'header_comment' => false,
- 'list_syntax' => ['syntax' => 'short'],
- 'lowercase_cast' => true,
- 'magic_method_casing' => true,
- 'modernize_types_casting' => true,
- 'multiline_comment_opening_closing' => true,
- //'native_constant_invocation' => true,
- 'no_alias_functions' => true,
- 'no_alternative_syntax' => true,
- 'no_blank_lines_after_phpdoc' => true,
- 'no_empty_comment' => true,
- 'no_empty_phpdoc' => true,
- 'no_extra_blank_lines' => true,
- 'no_leading_import_slash' => true,
- 'no_leading_namespace_whitespace' => true,
- 'no_spaces_around_offset' => true,
- 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
- 'no_trailing_comma_in_singleline_array' => true,
- 'no_unneeded_control_parentheses' => true,
- 'no_unset_cast' => true,
- 'no_unused_imports' => true,
- 'no_useless_else' => true,
- 'no_useless_return' => true,
- 'no_whitespace_in_blank_line' => true,
- 'normalize_index_brace' => true,
- 'ordered_imports' => true,
- 'php_unit_construct' => true,
- 'php_unit_dedicate_assert' => ['target' => 'newest'],
- 'php_unit_dedicate_assert_internal_type' => ['target' => 'newest'],
- 'php_unit_expectation' => ['target' => 'newest'],
- 'php_unit_mock' => ['target' => 'newest'],
- 'php_unit_mock_short_will_return' => true,
- 'php_unit_no_expectation_annotation' => ['target' => 'newest'],
- 'php_unit_test_annotation' => ['style' => 'prefix'],
- //'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
- 'phpdoc_align' => ['align' => 'vertical'],
- //'phpdoc_line_span' => ['method' => 'multi', 'property' => 'multi'],
- 'phpdoc_no_package' => true,
- 'phpdoc_no_useless_inheritdoc' => true,
- 'phpdoc_scalar' => true,
- 'phpdoc_separation' => true,
- 'phpdoc_single_line_var_spacing' => true,
- 'phpdoc_trim' => true,
- 'phpdoc_trim_consecutive_blank_line_separation' => true,
- 'phpdoc_types' => true,
- 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
- 'phpdoc_var_without_name' => true,
- 'return_assignment' => true,
- 'self_static_accessor' => true,
- 'short_scalar_cast' => true,
- 'single_trait_insert_per_statement' => true,
- 'standardize_not_equals' => true,
- //'static_lambda' => true,
- 'ternary_to_null_coalescing' => true,
- 'trim_array_spaces' => true,
- 'visibility_required' => ['elements' => ['property', 'method']],
- 'yoda_style' => false,
- // 'native_function_invocation' => true,
- 'braces' => ['allow_single_line_closure'=>true],
- ])
- ->setFinder(
- PhpCsFixer\Finder::create()
- ->in(__DIR__.'/src')
- ->in(__DIR__.'/tests')
- ->name('*.php')
- )
-;
-
-return $config;
diff --git a/lib/Google/vendor/guzzlehttp/promises/.travis.yml b/lib/Google/vendor/guzzlehttp/promises/.travis.yml
deleted file mode 100644
index 04735a674..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/.travis.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-language: php
-
-dist: trusty
-
-matrix:
- include:
- - php: 5.5.9
- - php: hhvm-3.24
- fast_finish: true
-
-before_install:
- - if [[ "$TRAVIS_PHP_VERSION" != "hhvm-3.24" ]]; then echo "xdebug.overload_var_dump = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
-
-install:
- - travis_retry composer update
- - travis_retry ./vendor/bin/simple-phpunit install
-
-script:
- - ./vendor/bin/simple-phpunit
diff --git a/lib/Google/vendor/guzzlehttp/promises/CHANGELOG.md b/lib/Google/vendor/guzzlehttp/promises/CHANGELOG.md
index 2e1a2f384..eaf2af426 100644
--- a/lib/Google/vendor/guzzlehttp/promises/CHANGELOG.md
+++ b/lib/Google/vendor/guzzlehttp/promises/CHANGELOG.md
@@ -1,17 +1,43 @@
# CHANGELOG
+
+## 2.0.1 - 2023-08-03
+
+### Changed
+
+- PHP 8.3 support
+
+
+## 2.0.0 - 2023-05-21
+
+### Added
+
+- Added PHP 7 type hints
+
+### Changed
+
+- All previously non-final non-exception classes have been marked as soft-final
+
+### Removed
+
+- Dropped PHP < 7.2 support
+- All functions in the `GuzzleHttp\Promise` namespace
+
+
## 1.5.3 - 2023-05-21
### Changed
- Removed remaining usage of deprecated functions
+
## 1.5.2 - 2022-08-07
### Changed
- Officially support PHP 8.2
+
## 1.5.1 - 2021-10-22
### Fixed
@@ -19,6 +45,7 @@
- Revert "Call handler when waiting on fulfilled/rejected Promise"
- Fix pool memory leak when empty array of promises provided
+
## 1.5.0 - 2021-10-07
### Changed
@@ -30,12 +57,14 @@
- Fix manually settle promises generated with `Utils::task`
+
## 1.4.1 - 2021-02-18
### Fixed
- Fixed `each_limit` skipping promises and failing
+
## 1.4.0 - 2020-09-30
### Added
diff --git a/lib/Google/vendor/guzzlehttp/promises/Makefile b/lib/Google/vendor/guzzlehttp/promises/Makefile
deleted file mode 100644
index 8d5b3ef95..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-all: clean test
-
-test:
- vendor/bin/phpunit
-
-coverage:
- vendor/bin/phpunit --coverage-html=artifacts/coverage
-
-view-coverage:
- open artifacts/coverage/index.html
-
-clean:
- rm -rf artifacts/*
diff --git a/lib/Google/vendor/guzzlehttp/promises/README.md b/lib/Google/vendor/guzzlehttp/promises/README.md
index 1ea667ab9..a32d3d29c 100644
--- a/lib/Google/vendor/guzzlehttp/promises/README.md
+++ b/lib/Google/vendor/guzzlehttp/promises/README.md
@@ -29,6 +29,21 @@ for a general introduction to promises.
`GuzzleHttp\Promise\Coroutine::of()`.
+## Installation
+
+```shell
+composer require guzzlehttp/promises
+```
+
+
+## Version Guidance
+
+| Version | Status | PHP Version |
+|---------|------------------------|--------------|
+| 1.x | Bug and security fixes | >=5.5,<8.3 |
+| 2.x | Latest | >=7.2.5,<8.4 |
+
+
## Quick Start
A *promise* represents the eventual result of an asynchronous operation. The
@@ -430,8 +445,6 @@ $loop = React\EventLoop\Factory::create();
$loop->addPeriodicTimer(0, [$queue, 'run']);
```
-*TODO*: Perhaps adding a `futureTick()` on each tick would be faster?
-
## Implementation Notes
@@ -501,8 +514,8 @@ $promise->resolve('foo');
A static API was first introduced in 1.4.0, in order to mitigate problems with
functions conflicting between global and local copies of the package. The
-function API will be removed in 2.0.0. A migration table has been provided here
-for your convenience:
+function API was removed in 2.0.0. A migration table has been provided here for
+your convenience:
| Original Function | Replacement Method |
|----------------|----------------|
diff --git a/lib/Google/vendor/guzzlehttp/promises/composer.json b/lib/Google/vendor/guzzlehttp/promises/composer.json
index 966e3e3a8..fc1989ec1 100644
--- a/lib/Google/vendor/guzzlehttp/promises/composer.json
+++ b/lib/Google/vendor/guzzlehttp/promises/composer.json
@@ -26,27 +26,32 @@
}
],
"require": {
- "php": ">=5.5"
+ "php": "^7.2.5 || ^8.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "^4.4 || ^5.1"
+ "bamarni/composer-bin-plugin": "^1.8.1",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23"
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Promise\\": "src/"
- },
- "files": ["src/functions_include.php"]
+ }
},
"autoload-dev": {
"psr-4": {
"GuzzleHttp\\Promise\\Tests\\": "tests/"
}
},
- "scripts": {
- "test": "vendor/bin/simple-phpunit",
- "test-ci": "vendor/bin/simple-phpunit --coverage-text"
+ "extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ }
},
"config": {
+ "allow-plugins": {
+ "bamarni/composer-bin-plugin": true
+ },
"preferred-install": "dist",
"sort-packages": true
}
diff --git a/lib/Google/vendor/guzzlehttp/promises/phpstan-baseline.neon b/lib/Google/vendor/guzzlehttp/promises/phpstan-baseline.neon
deleted file mode 100644
index 6e99b21b2..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/phpstan-baseline.neon
+++ /dev/null
@@ -1,37 +0,0 @@
-parameters:
- ignoreErrors:
- -
- message: "#^Cannot call method reject\\(\\) on null\\.$#"
- count: 1
- path: src/EachPromise.php
-
- -
- message: "#^Dead catch \\- Exception is already caught above\\.$#"
- count: 2
- path: src/EachPromise.php
-
- -
- message: "#^Dead catch \\- Exception is already caught above\\.$#"
- count: 1
- path: src/FulfilledPromise.php
-
- -
- message: "#^Dead catch \\- Exception is already caught above\\.$#"
- count: 2
- path: src/Promise.php
-
- -
- message: "#^Dead catch \\- Exception is already caught above\\.$#"
- count: 1
- path: src/RejectedPromise.php
-
- -
- message: "#^Dead catch \\- Exception is already caught above\\.$#"
- count: 2
- path: src/Utils.php
-
- -
- message: "#^Dead catch \\- GuzzleHttp\\\\Promise\\\\RejectionException is never thrown in the try block\\.$#"
- count: 1
- path: src/Utils.php
-
diff --git a/lib/Google/vendor/guzzlehttp/promises/phpstan.neon.dist b/lib/Google/vendor/guzzlehttp/promises/phpstan.neon.dist
deleted file mode 100644
index bc0f2c3a4..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/phpstan.neon.dist
+++ /dev/null
@@ -1,7 +0,0 @@
-includes:
- - phpstan-baseline.neon
-
-parameters:
- level: 5
- paths:
- - src
diff --git a/lib/Google/vendor/guzzlehttp/promises/phpunit.xml.dist b/lib/Google/vendor/guzzlehttp/promises/phpunit.xml.dist
deleted file mode 100644
index 6163dba5b..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/phpunit.xml.dist
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- tests/
-
-
-
-
- src/
-
- src/
-
-
-
-
diff --git a/lib/Google/vendor/guzzlehttp/promises/psalm.xml b/lib/Google/vendor/guzzlehttp/promises/psalm.xml
deleted file mode 100644
index 3e4e3d085..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/psalm.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/AggregateException.php b/lib/Google/vendor/guzzlehttp/promises/src/AggregateException.php
index d2b5712b9..40ffdbcf1 100644
--- a/lib/Google/vendor/guzzlehttp/promises/src/AggregateException.php
+++ b/lib/Google/vendor/guzzlehttp/promises/src/AggregateException.php
@@ -1,5 +1,7 @@
generator = $generatorFn();
- $this->result = new Promise(function () {
+ $this->result = new Promise(function (): void {
while (isset($this->currentPromise)) {
$this->currentPromise->wait();
}
});
try {
$this->nextCoroutine($this->generator->current());
- } catch (\Exception $exception) {
- $this->result->reject($exception);
} catch (Throwable $throwable) {
$this->result->reject($throwable);
}
@@ -78,10 +77,8 @@ public function __construct(callable $generatorFn)
/**
* Create a new coroutine.
- *
- * @return self
*/
- public static function of(callable $generatorFn)
+ public static function of(callable $generatorFn): self
{
return new self($generatorFn);
}
@@ -89,42 +86,42 @@ public static function of(callable $generatorFn)
public function then(
callable $onFulfilled = null,
callable $onRejected = null
- ) {
+ ): PromiseInterface {
return $this->result->then($onFulfilled, $onRejected);
}
- public function otherwise(callable $onRejected)
+ public function otherwise(callable $onRejected): PromiseInterface
{
return $this->result->otherwise($onRejected);
}
- public function wait($unwrap = true)
+ public function wait(bool $unwrap = true)
{
return $this->result->wait($unwrap);
}
- public function getState()
+ public function getState(): string
{
return $this->result->getState();
}
- public function resolve($value)
+ public function resolve($value): void
{
$this->result->resolve($value);
}
- public function reject($reason)
+ public function reject($reason): void
{
$this->result->reject($reason);
}
- public function cancel()
+ public function cancel(): void
{
$this->currentPromise->cancel();
$this->result->cancel();
}
- private function nextCoroutine($yielded)
+ private function nextCoroutine($yielded): void
{
$this->currentPromise = Create::promiseFor($yielded)
->then([$this, '_handleSuccess'], [$this, '_handleFailure']);
@@ -133,7 +130,7 @@ private function nextCoroutine($yielded)
/**
* @internal
*/
- public function _handleSuccess($value)
+ public function _handleSuccess($value): void
{
unset($this->currentPromise);
try {
@@ -143,8 +140,6 @@ public function _handleSuccess($value)
} else {
$this->result->resolve($value);
}
- } catch (Exception $exception) {
- $this->result->reject($exception);
} catch (Throwable $throwable) {
$this->result->reject($throwable);
}
@@ -153,15 +148,13 @@ public function _handleSuccess($value)
/**
* @internal
*/
- public function _handleFailure($reason)
+ public function _handleFailure($reason): void
{
unset($this->currentPromise);
try {
$nextYield = $this->generator->throw(Create::exceptionFor($reason));
// The throw was caught, so keep iterating on the coroutine
$this->nextCoroutine($nextYield);
- } catch (Exception $exception) {
- $this->result->reject($exception);
} catch (Throwable $throwable) {
$this->result->reject($throwable);
}
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/Create.php b/lib/Google/vendor/guzzlehttp/promises/src/Create.php
index 8d038e9c1..9d3fc4a1e 100644
--- a/lib/Google/vendor/guzzlehttp/promises/src/Create.php
+++ b/lib/Google/vendor/guzzlehttp/promises/src/Create.php
@@ -1,5 +1,7 @@
then([$promise, 'resolve'], [$promise, 'reject']);
+
return $promise;
}
@@ -34,10 +35,8 @@ public static function promiseFor($value)
* If the provided reason is a promise, then it is returned as-is.
*
* @param mixed $reason Promise or reason.
- *
- * @return PromiseInterface
*/
- public static function rejectionFor($reason)
+ public static function rejectionFor($reason): PromiseInterface
{
if ($reason instanceof PromiseInterface) {
return $reason;
@@ -50,12 +49,10 @@ public static function rejectionFor($reason)
* Create an exception for a rejected promise value.
*
* @param mixed $reason
- *
- * @return \Exception|\Throwable
*/
- public static function exceptionFor($reason)
+ public static function exceptionFor($reason): \Throwable
{
- if ($reason instanceof \Exception || $reason instanceof \Throwable) {
+ if ($reason instanceof \Throwable) {
return $reason;
}
@@ -66,10 +63,8 @@ public static function exceptionFor($reason)
* Returns an iterator for the given value.
*
* @param mixed $value
- *
- * @return \Iterator
*/
- public static function iterFor($value)
+ public static function iterFor($value): \Iterator
{
if ($value instanceof \Iterator) {
return $value;
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/Each.php b/lib/Google/vendor/guzzlehttp/promises/src/Each.php
index ff8efd734..1a7aa0fb6 100644
--- a/lib/Google/vendor/guzzlehttp/promises/src/Each.php
+++ b/lib/Google/vendor/guzzlehttp/promises/src/Each.php
@@ -1,5 +1,7 @@
$onFulfilled,
- 'rejected' => $onRejected
+ 'rejected' => $onRejected,
]))->promise();
}
@@ -46,19 +46,17 @@ public static function of(
* @param int|callable $concurrency
* @param callable $onFulfilled
* @param callable $onRejected
- *
- * @return PromiseInterface
*/
public static function ofLimit(
$iterable,
$concurrency,
callable $onFulfilled = null,
callable $onRejected = null
- ) {
+ ): PromiseInterface {
return (new EachPromise($iterable, [
- 'fulfilled' => $onFulfilled,
- 'rejected' => $onRejected,
- 'concurrency' => $concurrency
+ 'fulfilled' => $onFulfilled,
+ 'rejected' => $onRejected,
+ 'concurrency' => $concurrency,
]))->promise();
}
@@ -70,19 +68,17 @@ public static function ofLimit(
* @param mixed $iterable
* @param int|callable $concurrency
* @param callable $onFulfilled
- *
- * @return PromiseInterface
*/
public static function ofLimitAll(
$iterable,
$concurrency,
callable $onFulfilled = null
- ) {
+ ): PromiseInterface {
return self::ofLimit(
$iterable,
$concurrency,
$onFulfilled,
- function ($reason, $idx, PromiseInterface $aggregate) {
+ function ($reason, $idx, PromiseInterface $aggregate): void {
$aggregate->reject($reason);
}
);
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/EachPromise.php b/lib/Google/vendor/guzzlehttp/promises/src/EachPromise.php
index 280d79950..28dd9793a 100644
--- a/lib/Google/vendor/guzzlehttp/promises/src/EachPromise.php
+++ b/lib/Google/vendor/guzzlehttp/promises/src/EachPromise.php
@@ -1,10 +1,14 @@
aggregate) {
return $this->aggregate;
@@ -82,21 +86,18 @@ public function promise()
$this->refillPending();
} catch (\Throwable $e) {
$this->aggregate->reject($e);
- } catch (\Exception $e) {
- $this->aggregate->reject($e);
}
/**
* @psalm-suppress NullableReturnStatement
- * @phpstan-ignore-next-line
*/
return $this->aggregate;
}
- private function createPromise()
+ private function createPromise(): void
{
$this->mutex = false;
- $this->aggregate = new Promise(function () {
+ $this->aggregate = new Promise(function (): void {
if ($this->checkIfFinished()) {
return;
}
@@ -113,7 +114,7 @@ private function createPromise()
});
// Clear the references when the promise is resolved.
- $clearFn = function () {
+ $clearFn = function (): void {
$this->iterable = $this->concurrency = $this->pending = null;
$this->onFulfilled = $this->onRejected = null;
$this->nextPendingIndex = 0;
@@ -122,11 +123,13 @@ private function createPromise()
$this->aggregate->then($clearFn, $clearFn);
}
- private function refillPending()
+ private function refillPending(): void
{
if (!$this->concurrency) {
// Add all pending promises.
- while ($this->addPending() && $this->advanceIterator());
+ while ($this->addPending() && $this->advanceIterator()) {
+ }
+
return;
}
@@ -147,10 +150,11 @@ private function refillPending()
// next value to yield until promise callbacks are called.
while (--$concurrency
&& $this->advanceIterator()
- && $this->addPending());
+ && $this->addPending()) {
+ }
}
- private function addPending()
+ private function addPending(): bool
{
if (!$this->iterable || !$this->iterable->valid()) {
return false;
@@ -164,7 +168,7 @@ private function addPending()
$idx = $this->nextPendingIndex++;
$this->pending[$idx] = $promise->then(
- function ($value) use ($idx, $key) {
+ function ($value) use ($idx, $key): void {
if ($this->onFulfilled) {
call_user_func(
$this->onFulfilled,
@@ -175,7 +179,7 @@ function ($value) use ($idx, $key) {
}
$this->step($idx);
},
- function ($reason) use ($idx, $key) {
+ function ($reason) use ($idx, $key): void {
if ($this->onRejected) {
call_user_func(
$this->onRejected,
@@ -191,7 +195,7 @@ function ($reason) use ($idx, $key) {
return true;
}
- private function advanceIterator()
+ private function advanceIterator(): bool
{
// Place a lock on the iterator so that we ensure to not recurse,
// preventing fatal generator errors.
@@ -204,19 +208,17 @@ private function advanceIterator()
try {
$this->iterable->next();
$this->mutex = false;
+
return true;
} catch (\Throwable $e) {
$this->aggregate->reject($e);
$this->mutex = false;
- return false;
- } catch (\Exception $e) {
- $this->aggregate->reject($e);
- $this->mutex = false;
+
return false;
}
}
- private function step($idx)
+ private function step(int $idx): void
{
// If the promise was already resolved, then ignore this step.
if (Is::settled($this->aggregate)) {
@@ -234,11 +236,12 @@ private function step($idx)
}
}
- private function checkIfFinished()
+ private function checkIfFinished(): bool
{
if (!$this->pending && !$this->iterable->valid()) {
// Resolve the promise if there's nothing left to do.
$this->aggregate->resolve(null);
+
return true;
}
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/lib/Google/vendor/guzzlehttp/promises/src/FulfilledPromise.php
index 98f72a62a..ab7129659 100644
--- a/lib/Google/vendor/guzzlehttp/promises/src/FulfilledPromise.php
+++ b/lib/Google/vendor/guzzlehttp/promises/src/FulfilledPromise.php
@@ -1,5 +1,7 @@
value;
- $queue->add(static function () use ($p, $value, $onFulfilled) {
+ $queue->add(static function () use ($p, $value, $onFulfilled): void {
if (Is::pending($p)) {
try {
$p->resolve($onFulfilled($value));
} catch (\Throwable $e) {
$p->reject($e);
- } catch (\Exception $e) {
- $p->reject($e);
}
}
});
@@ -50,34 +55,34 @@ public function then(
return $p;
}
- public function otherwise(callable $onRejected)
+ public function otherwise(callable $onRejected): PromiseInterface
{
return $this->then(null, $onRejected);
}
- public function wait($unwrap = true, $defaultDelivery = null)
+ public function wait(bool $unwrap = true)
{
return $unwrap ? $this->value : null;
}
- public function getState()
+ public function getState(): string
{
return self::FULFILLED;
}
- public function resolve($value)
+ public function resolve($value): void
{
if ($value !== $this->value) {
- throw new \LogicException("Cannot resolve a fulfilled promise");
+ throw new \LogicException('Cannot resolve a fulfilled promise');
}
}
- public function reject($reason)
+ public function reject($reason): void
{
- throw new \LogicException("Cannot reject a fulfilled promise");
+ throw new \LogicException('Cannot reject a fulfilled promise');
}
- public function cancel()
+ public function cancel(): void
{
// pass
}
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/Is.php b/lib/Google/vendor/guzzlehttp/promises/src/Is.php
index c3ed8d014..f3f050384 100644
--- a/lib/Google/vendor/guzzlehttp/promises/src/Is.php
+++ b/lib/Google/vendor/guzzlehttp/promises/src/Is.php
@@ -1,45 +1,39 @@
getState() === PromiseInterface::PENDING;
}
/**
* Returns true if a promise is fulfilled or rejected.
- *
- * @return bool
*/
- public static function settled(PromiseInterface $promise)
+ public static function settled(PromiseInterface $promise): bool
{
return $promise->getState() !== PromiseInterface::PENDING;
}
/**
* Returns true if a promise is fulfilled.
- *
- * @return bool
*/
- public static function fulfilled(PromiseInterface $promise)
+ public static function fulfilled(PromiseInterface $promise): bool
{
return $promise->getState() === PromiseInterface::FULFILLED;
}
/**
* Returns true if a promise is rejected.
- *
- * @return bool
*/
- public static function rejected(PromiseInterface $promise)
+ public static function rejected(PromiseInterface $promise): bool
{
return $promise->getState() === PromiseInterface::REJECTED;
}
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/Promise.php b/lib/Google/vendor/guzzlehttp/promises/src/Promise.php
index 75939057b..1b07bdc9a 100644
--- a/lib/Google/vendor/guzzlehttp/promises/src/Promise.php
+++ b/lib/Google/vendor/guzzlehttp/promises/src/Promise.php
@@ -1,11 +1,15 @@
state === self::PENDING) {
$p = new Promise(null, [$this, 'cancel']);
$this->handlers[] = [$p, $onFulfilled, $onRejected];
$p->waitList = $this->waitList;
$p->waitList[] = $this;
+
return $p;
}
// Return a fulfilled promise and immediately invoke any callbacks.
if ($this->state === self::FULFILLED) {
$promise = Create::promiseFor($this->result);
+
return $onFulfilled ? $promise->then($onFulfilled) : $promise;
}
// It's either cancelled or rejected, so return a rejected promise
// and immediately invoke any callbacks.
$rejection = Create::rejectionFor($this->result);
+
return $onRejected ? $rejection->then(null, $onRejected) : $rejection;
}
- public function otherwise(callable $onRejected)
+ public function otherwise(callable $onRejected): PromiseInterface
{
return $this->then(null, $onRejected);
}
- public function wait($unwrap = true)
+ public function wait(bool $unwrap = true)
{
$this->waitIfPending();
@@ -73,12 +80,12 @@ public function wait($unwrap = true)
}
}
- public function getState()
+ public function getState(): string
{
return $this->state;
}
- public function cancel()
+ public function cancel(): void
{
if ($this->state !== self::PENDING) {
return;
@@ -93,8 +100,6 @@ public function cancel()
$fn();
} catch (\Throwable $e) {
$this->reject($e);
- } catch (\Exception $e) {
- $this->reject($e);
}
}
@@ -105,17 +110,17 @@ public function cancel()
}
}
- public function resolve($value)
+ public function resolve($value): void
{
$this->settle(self::FULFILLED, $value);
}
- public function reject($reason)
+ public function reject($reason): void
{
$this->settle(self::REJECTED, $reason);
}
- private function settle($state, $value)
+ private function settle(string $state, $value): void
{
if ($this->state !== self::PENDING) {
// Ignore calls with the same resolution.
@@ -148,7 +153,7 @@ private function settle($state, $value)
if (!is_object($value) || !method_exists($value, 'then')) {
$id = $state === self::FULFILLED ? 1 : 2;
// It's a success, so resolve the handlers in the queue.
- Utils::queue()->add(static function () use ($id, $value, $handlers) {
+ Utils::queue()->add(static function () use ($id, $value, $handlers): void {
foreach ($handlers as $handler) {
self::callHandler($id, $value, $handler);
}
@@ -159,12 +164,12 @@ private function settle($state, $value)
} else {
// Resolve the handlers when the forwarded promise is resolved.
$value->then(
- static function ($value) use ($handlers) {
+ static function ($value) use ($handlers): void {
foreach ($handlers as $handler) {
self::callHandler(1, $value, $handler);
}
},
- static function ($reason) use ($handlers) {
+ static function ($reason) use ($handlers): void {
foreach ($handlers as $handler) {
self::callHandler(2, $reason, $handler);
}
@@ -180,7 +185,7 @@ static function ($reason) use ($handlers) {
* @param mixed $value Value to pass to the callback.
* @param array $handler Array of handler data (promise and callbacks).
*/
- private static function callHandler($index, $value, array $handler)
+ private static function callHandler(int $index, $value, array $handler): void
{
/** @var PromiseInterface $promise */
$promise = $handler[0];
@@ -211,12 +216,10 @@ private static function callHandler($index, $value, array $handler)
}
} catch (\Throwable $reason) {
$promise->reject($reason);
- } catch (\Exception $reason) {
- $promise->reject($reason);
}
}
- private function waitIfPending()
+ private function waitIfPending(): void
{
if ($this->state !== self::PENDING) {
return;
@@ -227,9 +230,9 @@ private function waitIfPending()
} else {
// If there's no wait function, then reject the promise.
$this->reject('Cannot wait on a promise that has '
- . 'no internal wait function. You must provide a wait '
- . 'function when constructing the promise to be able to '
- . 'wait on a promise.');
+ .'no internal wait function. You must provide a wait '
+ .'function when constructing the promise to be able to '
+ .'wait on a promise.');
}
Utils::queue()->run();
@@ -240,13 +243,13 @@ private function waitIfPending()
}
}
- private function invokeWaitFn()
+ private function invokeWaitFn(): void
{
try {
$wfn = $this->waitFn;
$this->waitFn = null;
$wfn(true);
- } catch (\Exception $reason) {
+ } catch (\Throwable $reason) {
if ($this->state === self::PENDING) {
// The promise has not been resolved yet, so reject the promise
// with the exception.
@@ -259,7 +262,7 @@ private function invokeWaitFn()
}
}
- private function invokeWaitList()
+ private function invokeWaitList(): void
{
$waitList = $this->waitList;
$this->waitList = null;
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/PromiseInterface.php b/lib/Google/vendor/guzzlehttp/promises/src/PromiseInterface.php
index e59833143..2824802bb 100644
--- a/lib/Google/vendor/guzzlehttp/promises/src/PromiseInterface.php
+++ b/lib/Google/vendor/guzzlehttp/promises/src/PromiseInterface.php
@@ -1,5 +1,7 @@
reason;
$p = new Promise([$queue, 'run']);
- $queue->add(static function () use ($p, $reason, $onRejected) {
+ $queue->add(static function () use ($p, $reason, $onRejected): void {
if (Is::pending($p)) {
try {
// Return a resolved promise if onRejected does not throw.
@@ -43,9 +50,6 @@ public function then(
} catch (\Throwable $e) {
// onRejected threw, so return a rejected promise.
$p->reject($e);
- } catch (\Exception $e) {
- // onRejected threw, so return a rejected promise.
- $p->reject($e);
}
}
});
@@ -53,12 +57,12 @@ public function then(
return $p;
}
- public function otherwise(callable $onRejected)
+ public function otherwise(callable $onRejected): PromiseInterface
{
return $this->then(null, $onRejected);
}
- public function wait($unwrap = true, $defaultDelivery = null)
+ public function wait(bool $unwrap = true)
{
if ($unwrap) {
throw Create::exceptionFor($this->reason);
@@ -67,24 +71,24 @@ public function wait($unwrap = true, $defaultDelivery = null)
return null;
}
- public function getState()
+ public function getState(): string
{
return self::REJECTED;
}
- public function resolve($value)
+ public function resolve($value): void
{
- throw new \LogicException("Cannot resolve a rejected promise");
+ throw new \LogicException('Cannot resolve a rejected promise');
}
- public function reject($reason)
+ public function reject($reason): void
{
if ($reason !== $this->reason) {
- throw new \LogicException("Cannot reject a rejected promise");
+ throw new \LogicException('Cannot reject a rejected promise');
}
}
- public function cancel()
+ public function cancel(): void
{
// pass
}
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/RejectionException.php b/lib/Google/vendor/guzzlehttp/promises/src/RejectionException.php
index e2f137707..47dca8624 100644
--- a/lib/Google/vendor/guzzlehttp/promises/src/RejectionException.php
+++ b/lib/Google/vendor/guzzlehttp/promises/src/RejectionException.php
@@ -1,5 +1,7 @@
reason = $reason;
$message = 'The promise was rejected';
if ($description) {
- $message .= ' with reason: ' . $description;
+ $message .= ' with reason: '.$description;
} elseif (is_string($reason)
|| (is_object($reason) && method_exists($reason, '__toString'))
) {
- $message .= ' with reason: ' . $this->reason;
+ $message .= ' with reason: '.$this->reason;
} elseif ($reason instanceof \JsonSerializable) {
- $message .= ' with reason: '
- . json_encode($this->reason, JSON_PRETTY_PRINT);
+ $message .= ' with reason: '.json_encode($this->reason, JSON_PRETTY_PRINT);
}
parent::__construct($message);
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/TaskQueue.php b/lib/Google/vendor/guzzlehttp/promises/src/TaskQueue.php
index f0fba2c59..503e0b2da 100644
--- a/lib/Google/vendor/guzzlehttp/promises/src/TaskQueue.php
+++ b/lib/Google/vendor/guzzlehttp/promises/src/TaskQueue.php
@@ -1,5 +1,7 @@
run();
+ *
+ * @final
*/
class TaskQueue implements TaskQueueInterface
{
private $enableShutdown = true;
private $queue = [];
- public function __construct($withShutdown = true)
+ public function __construct(bool $withShutdown = true)
{
if ($withShutdown) {
- register_shutdown_function(function () {
+ register_shutdown_function(function (): void {
if ($this->enableShutdown) {
// Only run the tasks if an E_ERROR didn't occur.
$err = error_get_last();
@@ -31,17 +35,17 @@ public function __construct($withShutdown = true)
}
}
- public function isEmpty()
+ public function isEmpty(): bool
{
return !$this->queue;
}
- public function add(callable $task)
+ public function add(callable $task): void
{
$this->queue[] = $task;
}
- public function run()
+ public function run(): void
{
while ($task = array_shift($this->queue)) {
/** @var callable $task */
@@ -60,7 +64,7 @@ public function run()
*
* Note: This shutdown will occur before any destructors are triggered.
*/
- public function disableShutdown()
+ public function disableShutdown(): void
{
$this->enableShutdown = false;
}
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/lib/Google/vendor/guzzlehttp/promises/src/TaskQueueInterface.php
index 723d4d54e..34c561a48 100644
--- a/lib/Google/vendor/guzzlehttp/promises/src/TaskQueueInterface.php
+++ b/lib/Google/vendor/guzzlehttp/promises/src/TaskQueueInterface.php
@@ -1,24 +1,24 @@
*
- * @param TaskQueueInterface $assign Optionally specify a new queue instance.
- *
- * @return TaskQueueInterface
+ * @param TaskQueueInterface|null $assign Optionally specify a new queue instance.
*/
- public static function queue(TaskQueueInterface $assign = null)
+ public static function queue(TaskQueueInterface $assign = null): TaskQueueInterface
{
static $queue;
@@ -39,22 +39,18 @@ public static function queue(TaskQueueInterface $assign = null)
* returns a promise that is fulfilled or rejected with the result.
*
* @param callable $task Task function to run.
- *
- * @return PromiseInterface
*/
- public static function task(callable $task)
+ public static function task(callable $task): PromiseInterface
{
$queue = self::queue();
$promise = new Promise([$queue, 'run']);
- $queue->add(function () use ($task, $promise) {
+ $queue->add(function () use ($task, $promise): void {
try {
if (Is::pending($promise)) {
$promise->resolve($task());
}
} catch (\Throwable $e) {
$promise->reject($e);
- } catch (\Exception $e) {
- $promise->reject($e);
}
});
@@ -72,22 +68,18 @@ public static function task(callable $task)
* key mapping to the rejection reason of the promise.
*
* @param PromiseInterface $promise Promise or value.
- *
- * @return array
*/
- public static function inspect(PromiseInterface $promise)
+ public static function inspect(PromiseInterface $promise): array
{
try {
return [
'state' => PromiseInterface::FULFILLED,
- 'value' => $promise->wait()
+ 'value' => $promise->wait(),
];
} catch (RejectionException $e) {
return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()];
} catch (\Throwable $e) {
return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
- } catch (\Exception $e) {
- return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
}
}
@@ -100,10 +92,8 @@ public static function inspect(PromiseInterface $promise)
* @see inspect for the inspection state array format.
*
* @param PromiseInterface[] $promises Traversable of promises to wait upon.
- *
- * @return array
*/
- public static function inspectAll($promises)
+ public static function inspectAll($promises): array
{
$results = [];
foreach ($promises as $key => $promise) {
@@ -122,12 +112,9 @@ public static function inspectAll($promises)
*
* @param iterable $promises Iterable of PromiseInterface objects to wait on.
*
- * @return array
- *
- * @throws \Exception on error
- * @throws \Throwable on error in PHP >=7
+ * @throws \Throwable on error
*/
- public static function unwrap($promises)
+ public static function unwrap($promises): array
{
$results = [];
foreach ($promises as $key => $promise) {
@@ -147,22 +134,21 @@ public static function unwrap($promises)
*
* @param mixed $promises Promises or values.
* @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
- *
- * @return PromiseInterface
*/
- public static function all($promises, $recursive = false)
+ public static function all($promises, bool $recursive = false): PromiseInterface
{
$results = [];
$promise = Each::of(
$promises,
- function ($value, $idx) use (&$results) {
+ function ($value, $idx) use (&$results): void {
$results[$idx] = $value;
},
- function ($reason, $idx, Promise $aggregate) {
+ function ($reason, $idx, Promise $aggregate): void {
$aggregate->reject($reason);
}
)->then(function () use (&$results) {
ksort($results);
+
return $results;
});
@@ -173,6 +159,7 @@ function ($reason, $idx, Promise $aggregate) {
return self::all($promises, $recursive);
}
}
+
return $results;
});
}
@@ -193,17 +180,15 @@ function ($reason, $idx, Promise $aggregate) {
*
* @param int $count Total number of promises.
* @param mixed $promises Promises or values.
- *
- * @return PromiseInterface
*/
- public static function some($count, $promises)
+ public static function some(int $count, $promises): PromiseInterface
{
$results = [];
$rejections = [];
return Each::of(
$promises,
- function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
+ function ($value, $idx, PromiseInterface $p) use (&$results, $count): void {
if (Is::settled($p)) {
return;
}
@@ -212,7 +197,7 @@ function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
$p->resolve(null);
}
},
- function ($reason) use (&$rejections) {
+ function ($reason) use (&$rejections): void {
$rejections[] = $reason;
}
)->then(
@@ -224,6 +209,7 @@ function () use (&$results, &$rejections, $count) {
);
}
ksort($results);
+
return array_values($results);
}
);
@@ -234,10 +220,8 @@ function () use (&$results, &$rejections, $count) {
* fulfillment value is not an array of 1 but the value directly.
*
* @param mixed $promises Promises or values.
- *
- * @return PromiseInterface
*/
- public static function any($promises)
+ public static function any($promises): PromiseInterface
{
return self::some(1, $promises)->then(function ($values) {
return $values[0];
@@ -253,23 +237,22 @@ public static function any($promises)
* @see inspect for the inspection state array format.
*
* @param mixed $promises Promises or values.
- *
- * @return PromiseInterface
*/
- public static function settle($promises)
+ public static function settle($promises): PromiseInterface
{
$results = [];
return Each::of(
$promises,
- function ($value, $idx) use (&$results) {
+ function ($value, $idx) use (&$results): void {
$results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
},
- function ($reason, $idx) use (&$results) {
+ function ($reason, $idx) use (&$results): void {
$results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];
}
)->then(function () use (&$results) {
ksort($results);
+
return $results;
});
}
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/functions.php b/lib/Google/vendor/guzzlehttp/promises/src/functions.php
deleted file mode 100644
index c03d39d02..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/src/functions.php
+++ /dev/null
@@ -1,363 +0,0 @@
-
- * while ($eventLoop->isRunning()) {
- * GuzzleHttp\Promise\queue()->run();
- * }
- *
- *
- * @param TaskQueueInterface $assign Optionally specify a new queue instance.
- *
- * @return TaskQueueInterface
- *
- * @deprecated queue will be removed in guzzlehttp/promises:2.0. Use Utils::queue instead.
- */
-function queue(TaskQueueInterface $assign = null)
-{
- return Utils::queue($assign);
-}
-
-/**
- * Adds a function to run in the task queue when it is next `run()` and returns
- * a promise that is fulfilled or rejected with the result.
- *
- * @param callable $task Task function to run.
- *
- * @return PromiseInterface
- *
- * @deprecated task will be removed in guzzlehttp/promises:2.0. Use Utils::task instead.
- */
-function task(callable $task)
-{
- return Utils::task($task);
-}
-
-/**
- * Creates a promise for a value if the value is not a promise.
- *
- * @param mixed $value Promise or value.
- *
- * @return PromiseInterface
- *
- * @deprecated promise_for will be removed in guzzlehttp/promises:2.0. Use Create::promiseFor instead.
- */
-function promise_for($value)
-{
- return Create::promiseFor($value);
-}
-
-/**
- * Creates a rejected promise for a reason if the reason is not a promise. If
- * the provided reason is a promise, then it is returned as-is.
- *
- * @param mixed $reason Promise or reason.
- *
- * @return PromiseInterface
- *
- * @deprecated rejection_for will be removed in guzzlehttp/promises:2.0. Use Create::rejectionFor instead.
- */
-function rejection_for($reason)
-{
- return Create::rejectionFor($reason);
-}
-
-/**
- * Create an exception for a rejected promise value.
- *
- * @param mixed $reason
- *
- * @return \Exception|\Throwable
- *
- * @deprecated exception_for will be removed in guzzlehttp/promises:2.0. Use Create::exceptionFor instead.
- */
-function exception_for($reason)
-{
- return Create::exceptionFor($reason);
-}
-
-/**
- * Returns an iterator for the given value.
- *
- * @param mixed $value
- *
- * @return \Iterator
- *
- * @deprecated iter_for will be removed in guzzlehttp/promises:2.0. Use Create::iterFor instead.
- */
-function iter_for($value)
-{
- return Create::iterFor($value);
-}
-
-/**
- * Synchronously waits on a promise to resolve and returns an inspection state
- * array.
- *
- * Returns a state associative array containing a "state" key mapping to a
- * valid promise state. If the state of the promise is "fulfilled", the array
- * will contain a "value" key mapping to the fulfilled value of the promise. If
- * the promise is rejected, the array will contain a "reason" key mapping to
- * the rejection reason of the promise.
- *
- * @param PromiseInterface $promise Promise or value.
- *
- * @return array
- *
- * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspect instead.
- */
-function inspect(PromiseInterface $promise)
-{
- return Utils::inspect($promise);
-}
-
-/**
- * Waits on all of the provided promises, but does not unwrap rejected promises
- * as thrown exception.
- *
- * Returns an array of inspection state arrays.
- *
- * @see inspect for the inspection state array format.
- *
- * @param PromiseInterface[] $promises Traversable of promises to wait upon.
- *
- * @return array
- *
- * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspectAll instead.
- */
-function inspect_all($promises)
-{
- return Utils::inspectAll($promises);
-}
-
-/**
- * Waits on all of the provided promises and returns the fulfilled values.
- *
- * Returns an array that contains the value of each promise (in the same order
- * the promises were provided). An exception is thrown if any of the promises
- * are rejected.
- *
- * @param iterable $promises Iterable of PromiseInterface objects to wait on.
- *
- * @return array
- *
- * @throws \Exception on error
- * @throws \Throwable on error in PHP >=7
- *
- * @deprecated unwrap will be removed in guzzlehttp/promises:2.0. Use Utils::unwrap instead.
- */
-function unwrap($promises)
-{
- return Utils::unwrap($promises);
-}
-
-/**
- * Given an array of promises, return a promise that is fulfilled when all the
- * items in the array are fulfilled.
- *
- * The promise's fulfillment value is an array with fulfillment values at
- * respective positions to the original array. If any promise in the array
- * rejects, the returned promise is rejected with the rejection reason.
- *
- * @param mixed $promises Promises or values.
- * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
- *
- * @return PromiseInterface
- *
- * @deprecated all will be removed in guzzlehttp/promises:2.0. Use Utils::all instead.
- */
-function all($promises, $recursive = false)
-{
- return Utils::all($promises, $recursive);
-}
-
-/**
- * Initiate a competitive race between multiple promises or values (values will
- * become immediately fulfilled promises).
- *
- * When count amount of promises have been fulfilled, the returned promise is
- * fulfilled with an array that contains the fulfillment values of the winners
- * in order of resolution.
- *
- * This promise is rejected with a {@see AggregateException} if the number of
- * fulfilled promises is less than the desired $count.
- *
- * @param int $count Total number of promises.
- * @param mixed $promises Promises or values.
- *
- * @return PromiseInterface
- *
- * @deprecated some will be removed in guzzlehttp/promises:2.0. Use Utils::some instead.
- */
-function some($count, $promises)
-{
- return Utils::some($count, $promises);
-}
-
-/**
- * Like some(), with 1 as count. However, if the promise fulfills, the
- * fulfillment value is not an array of 1 but the value directly.
- *
- * @param mixed $promises Promises or values.
- *
- * @return PromiseInterface
- *
- * @deprecated any will be removed in guzzlehttp/promises:2.0. Use Utils::any instead.
- */
-function any($promises)
-{
- return Utils::any($promises);
-}
-
-/**
- * Returns a promise that is fulfilled when all of the provided promises have
- * been fulfilled or rejected.
- *
- * The returned promise is fulfilled with an array of inspection state arrays.
- *
- * @see inspect for the inspection state array format.
- *
- * @param mixed $promises Promises or values.
- *
- * @return PromiseInterface
- *
- * @deprecated settle will be removed in guzzlehttp/promises:2.0. Use Utils::settle instead.
- */
-function settle($promises)
-{
- return Utils::settle($promises);
-}
-
-/**
- * Given an iterator that yields promises or values, returns a promise that is
- * fulfilled with a null value when the iterator has been consumed or the
- * aggregate promise has been fulfilled or rejected.
- *
- * $onFulfilled is a function that accepts the fulfilled value, iterator index,
- * and the aggregate promise. The callback can invoke any necessary side
- * effects and choose to resolve or reject the aggregate if needed.
- *
- * $onRejected is a function that accepts the rejection reason, iterator index,
- * and the aggregate promise. The callback can invoke any necessary side
- * effects and choose to resolve or reject the aggregate if needed.
- *
- * @param mixed $iterable Iterator or array to iterate over.
- * @param callable $onFulfilled
- * @param callable $onRejected
- *
- * @return PromiseInterface
- *
- * @deprecated each will be removed in guzzlehttp/promises:2.0. Use Each::of instead.
- */
-function each(
- $iterable,
- callable $onFulfilled = null,
- callable $onRejected = null
-) {
- return Each::of($iterable, $onFulfilled, $onRejected);
-}
-
-/**
- * Like each, but only allows a certain number of outstanding promises at any
- * given time.
- *
- * $concurrency may be an integer or a function that accepts the number of
- * pending promises and returns a numeric concurrency limit value to allow for
- * dynamic a concurrency size.
- *
- * @param mixed $iterable
- * @param int|callable $concurrency
- * @param callable $onFulfilled
- * @param callable $onRejected
- *
- * @return PromiseInterface
- *
- * @deprecated each_limit will be removed in guzzlehttp/promises:2.0. Use Each::ofLimit instead.
- */
-function each_limit(
- $iterable,
- $concurrency,
- callable $onFulfilled = null,
- callable $onRejected = null
-) {
- return Each::ofLimit($iterable, $concurrency, $onFulfilled, $onRejected);
-}
-
-/**
- * Like each_limit, but ensures that no promise in the given $iterable argument
- * is rejected. If any promise is rejected, then the aggregate promise is
- * rejected with the encountered rejection.
- *
- * @param mixed $iterable
- * @param int|callable $concurrency
- * @param callable $onFulfilled
- *
- * @return PromiseInterface
- *
- * @deprecated each_limit_all will be removed in guzzlehttp/promises:2.0. Use Each::ofLimitAll instead.
- */
-function each_limit_all(
- $iterable,
- $concurrency,
- callable $onFulfilled = null
-) {
- return Each::ofLimitAll($iterable, $concurrency, $onFulfilled);
-}
-
-/**
- * Returns true if a promise is fulfilled.
- *
- * @return bool
- *
- * @deprecated is_fulfilled will be removed in guzzlehttp/promises:2.0. Use Is::fulfilled instead.
- */
-function is_fulfilled(PromiseInterface $promise)
-{
- return Is::fulfilled($promise);
-}
-
-/**
- * Returns true if a promise is rejected.
- *
- * @return bool
- *
- * @deprecated is_rejected will be removed in guzzlehttp/promises:2.0. Use Is::rejected instead.
- */
-function is_rejected(PromiseInterface $promise)
-{
- return Is::rejected($promise);
-}
-
-/**
- * Returns true if a promise is fulfilled or rejected.
- *
- * @return bool
- *
- * @deprecated is_settled will be removed in guzzlehttp/promises:2.0. Use Is::settled instead.
- */
-function is_settled(PromiseInterface $promise)
-{
- return Is::settled($promise);
-}
-
-/**
- * Create a new coroutine.
- *
- * @see Coroutine
- *
- * @return PromiseInterface
- *
- * @deprecated coroutine will be removed in guzzlehttp/promises:2.0. Use Coroutine::of instead.
- */
-function coroutine(callable $generatorFn)
-{
- return Coroutine::of($generatorFn);
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/src/functions_include.php b/lib/Google/vendor/guzzlehttp/promises/src/functions_include.php
deleted file mode 100644
index 34cd1710a..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/src/functions_include.php
+++ /dev/null
@@ -1,6 +0,0 @@
-assertStringContainsString('foo', $e->getMessage());
- $this->assertSame(['baz', 'bar'], $e->getReason());
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/CoroutineTest.php b/lib/Google/vendor/guzzlehttp/promises/tests/CoroutineTest.php
deleted file mode 100644
index ed91a8cc4..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/CoroutineTest.php
+++ /dev/null
@@ -1,113 +0,0 @@
-assertInstanceOf(P\Coroutine::class, P\Coroutine::of($fn));
- }
-
- /**
- * @dataProvider promiseInterfaceMethodProvider
- *
- * @param string $method
- * @param array $args
- */
- public function testShouldProxyPromiseMethodsToResultPromise($method, $args = [])
- {
- $coroutine = new Coroutine(function () { yield 0; });
- $mockPromise = $this->getMockForAbstractClass(PromiseInterface::class);
- call_user_func_array([$mockPromise->expects($this->once())->method($method), 'with'], $args);
-
- $resultPromiseProp = (new ReflectionClass(Coroutine::class))->getProperty('result');
- $resultPromiseProp->setAccessible(true);
- $resultPromiseProp->setValue($coroutine, $mockPromise);
-
- call_user_func_array([$coroutine, $method], $args);
- }
-
- public function promiseInterfaceMethodProvider()
- {
- return [
- ['then', [null, null]],
- ['otherwise', [function () {}]],
- ['wait', [true]],
- ['getState', []],
- ['resolve', [null]],
- ['reject', [null]],
- ];
- }
-
- public function testShouldCancelResultPromiseAndOutsideCurrentPromise()
- {
- $coroutine = new Coroutine(function () { yield 0; });
-
- $mockPromises = [
- 'result' => $this->getMockForAbstractClass(PromiseInterface::class),
- 'currentPromise' => $this->getMockForAbstractClass(PromiseInterface::class),
- ];
- foreach ($mockPromises as $propName => $mockPromise) {
- /**
- * @var $mockPromise \PHPUnit_Framework_MockObject_MockObject
- */
- $mockPromise->expects($this->once())
- ->method('cancel')
- ->with();
-
- $promiseProp = (new ReflectionClass(Coroutine::class))->getProperty($propName);
- $promiseProp->setAccessible(true);
- $promiseProp->setValue($coroutine, $mockPromise);
- }
-
- $coroutine->cancel();
- }
-
- public function testWaitShouldResolveChainedCoroutines()
- {
- $promisor = function () {
- return P\Coroutine::of(function () {
- yield $promise = new Promise(function () use (&$promise) {
- $promise->resolve(1);
- });
- });
- };
-
- $promise = $promisor()->then($promisor)->then($promisor);
-
- $this->assertSame(1, $promise->wait());
- }
-
- public function testWaitShouldHandleIntermediateErrors()
- {
- $promise = P\Coroutine::of(function () {
- yield $promise = new Promise(function () use (&$promise) {
- $promise->resolve(1);
- });
- })
- ->then(function () {
- return P\Coroutine::of(function () {
- yield $promise = new Promise(function () use (&$promise) {
- $promise->reject(new \Exception);
- });
- });
- })
- ->otherwise(function (\Exception $error = null) {
- if (!$error) {
- self::fail('Error did not propagate.');
- }
- return 3;
- });
-
- $this->assertSame(3, $promise->wait());
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/CreateTest.php b/lib/Google/vendor/guzzlehttp/promises/tests/CreateTest.php
deleted file mode 100644
index a4cc9317d..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/CreateTest.php
+++ /dev/null
@@ -1,56 +0,0 @@
-assertInstanceOf(FulfilledPromise::class, $p);
- }
-
- public function testReturnsPromiseForPromise()
- {
- $p = new Promise();
- $this->assertSame($p, P\Create::promiseFor($p));
- }
-
- public function testReturnsPromiseForThennable()
- {
- $p = new Thennable();
- $wrapped = P\Create::promiseFor($p);
- $this->assertNotSame($p, $wrapped);
- $this->assertInstanceOf(PromiseInterface::class, $wrapped);
- $p->resolve('foo');
- P\Utils::queue()->run();
- $this->assertSame('foo', $wrapped->wait());
- }
-
- public function testReturnsRejection()
- {
- $p = P\Create::rejectionFor('fail');
- $this->assertInstanceOf(RejectedPromise::class, $p);
- $this->assertSame('fail', PropertyHelper::get($p, 'reason'));
- }
-
- public function testReturnsPromisesAsIsInRejectionFor()
- {
- $a = new Promise();
- $b = P\Create::rejectionFor($a);
- $this->assertSame($a, $b);
- }
-
- public function testIterForReturnsIterator()
- {
- $iter = new \ArrayIterator();
- $this->assertSame($iter, P\Create::iterFor($iter));
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/EachPromiseTest.php b/lib/Google/vendor/guzzlehttp/promises/tests/EachPromiseTest.php
deleted file mode 100644
index d5dc9cfea..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/EachPromiseTest.php
+++ /dev/null
@@ -1,430 +0,0 @@
- 100]);
- $this->assertSame($each->promise(), $each->promise());
- }
-
- public function testResolvesInCaseOfAnEmptyList()
- {
- $promises = [];
- $each = new EachPromise($promises);
- $p = $each->promise();
- $this->assertNull($p->wait());
- $this->assertTrue(P\Is::fulfilled($p));
- }
-
- public function testResolvesInCaseOfAnEmptyListAndInvokesFulfilled()
- {
- $promises = [];
- $each = new EachPromise($promises);
- $p = $each->promise();
- $onFulfilledCalled = false;
- $onRejectedCalled = false;
- $p->then(
- function () use (&$onFulfilledCalled) {
- $onFulfilledCalled = true;
- },
- function () use (&$onRejectedCalled) {
- $onRejectedCalled = true;
- }
- );
- $this->assertNull($p->wait());
- $this->assertTrue(P\Is::fulfilled($p));
- $this->assertTrue($onFulfilledCalled);
- $this->assertFalse($onRejectedCalled);
- }
-
- public function testInvokesAllPromises()
- {
- $promises = [new Promise(), new Promise(), new Promise()];
- $called = [];
- $each = new EachPromise($promises, [
- 'fulfilled' => function ($value) use (&$called) {
- $called[] = $value;
- }
- ]);
- $p = $each->promise();
- $promises[0]->resolve('a');
- $promises[1]->resolve('c');
- $promises[2]->resolve('b');
- P\Utils::queue()->run();
- $this->assertSame(['a', 'c', 'b'], $called);
- $this->assertTrue(P\Is::fulfilled($p));
- }
-
- public function testIsWaitable()
- {
- $a = $this->createSelfResolvingPromise('a');
- $b = $this->createSelfResolvingPromise('b');
- $called = [];
- $each = new EachPromise([$a, $b], [
- 'fulfilled' => function ($value) use (&$called) { $called[] = $value; }
- ]);
- $p = $each->promise();
- $this->assertNull($p->wait());
- $this->assertTrue(P\Is::fulfilled($p));
- $this->assertSame(['a', 'b'], $called);
- }
-
- public function testCanResolveBeforeConsumingAll()
- {
- $called = 0;
- $a = $this->createSelfResolvingPromise('a');
- $b = new Promise(function () { $this->fail(); });
- $each = new EachPromise([$a, $b], [
- 'fulfilled' => function ($value, $idx, Promise $aggregate) use (&$called) {
- $this->assertSame($idx, 0);
- $this->assertSame('a', $value);
- $aggregate->resolve(null);
- $called++;
- },
- 'rejected' => function (\Exception $reason) {
- $this->fail($reason->getMessage());
- }
- ]);
- $p = $each->promise();
- $p->wait();
- $this->assertNull($p->wait());
- $this->assertSame(1, $called);
- $this->assertTrue(P\Is::fulfilled($a));
- $this->assertTrue(P\Is::pending($b));
- // Resolving $b has no effect on the aggregate promise.
- $b->resolve('foo');
- $this->assertSame(1, $called);
- }
-
- public function testLimitsPendingPromises()
- {
- $pending = [new Promise(), new Promise(), new Promise(), new Promise()];
- $promises = new \ArrayIterator($pending);
- $each = new EachPromise($promises, ['concurrency' => 2]);
- $p = $each->promise();
- $this->assertCount(2, PropertyHelper::get($each, 'pending'));
- $pending[0]->resolve('a');
- $this->assertCount(2, PropertyHelper::get($each, 'pending'));
- $this->assertTrue($promises->valid());
- $pending[1]->resolve('b');
- P\Utils::queue()->run();
- $this->assertCount(2, PropertyHelper::get($each, 'pending'));
- $this->assertTrue($promises->valid());
- $promises[2]->resolve('c');
- P\Utils::queue()->run();
- $this->assertCount(1, PropertyHelper::get($each, 'pending'));
- $this->assertTrue(P\Is::pending($p));
- $promises[3]->resolve('d');
- P\Utils::queue()->run();
- $this->assertNull(PropertyHelper::get($each, 'pending'));
- $this->assertTrue(P\Is::fulfilled($p));
- $this->assertFalse($promises->valid());
- }
-
- public function testDynamicallyLimitsPendingPromises()
- {
- $calls = [];
- $pendingFn = function ($count) use (&$calls) {
- $calls[] = $count;
- return 2;
- };
- $pending = [new Promise(), new Promise(), new Promise(), new Promise()];
- $promises = new \ArrayIterator($pending);
- $each = new EachPromise($promises, ['concurrency' => $pendingFn]);
- $p = $each->promise();
- $this->assertCount(2, PropertyHelper::get($each, 'pending'));
- $pending[0]->resolve('a');
- $this->assertCount(2, PropertyHelper::get($each, 'pending'));
- $this->assertTrue($promises->valid());
- $pending[1]->resolve('b');
- $this->assertCount(2, PropertyHelper::get($each, 'pending'));
- P\Utils::queue()->run();
- $this->assertTrue($promises->valid());
- $promises[2]->resolve('c');
- P\Utils::queue()->run();
- $this->assertCount(1, PropertyHelper::get($each, 'pending'));
- $this->assertTrue(P\Is::pending($p));
- $promises[3]->resolve('d');
- P\Utils::queue()->run();
- $this->assertNull(PropertyHelper::get($each, 'pending'));
- $this->assertTrue(P\Is::fulfilled($p));
- $this->assertSame([0, 1, 1, 1], $calls);
- $this->assertFalse($promises->valid());
- }
-
- public function testClearsReferencesWhenResolved()
- {
- $called = false;
- $a = new Promise(function () use (&$a, &$called) {
- $a->resolve('a');
- $called = true;
- });
- $each = new EachPromise([$a], [
- 'concurrency' => function () { return 1; },
- 'fulfilled' => function () {},
- 'rejected' => function () {}
- ]);
- $each->promise()->wait();
- $this->assertNull(PropertyHelper::get($each, 'onFulfilled'));
- $this->assertNull(PropertyHelper::get($each, 'onRejected'));
- $this->assertNull(PropertyHelper::get($each, 'iterable'));
- $this->assertNull(PropertyHelper::get($each, 'pending'));
- $this->assertNull(PropertyHelper::get($each, 'concurrency'));
- $this->assertTrue($called);
- }
-
- public function testCanBeCancelled()
- {
- $called = false;
- $a = new FulfilledPromise('a');
- $b = new Promise(function () use (&$called) { $called = true; });
- $each = new EachPromise([$a, $b], [
- 'fulfilled' => function ($value, $idx, Promise $aggregate) {
- $aggregate->cancel();
- },
- 'rejected' => function ($reason) use (&$called) {
- $called = true;
- },
- ]);
- $p = $each->promise();
- $p->wait(false);
- $this->assertTrue(P\Is::fulfilled($a));
- $this->assertTrue(P\Is::pending($b));
- $this->assertTrue(P\Is::rejected($p));
- $this->assertFalse($called);
- }
-
- public function testDoesNotBlowStackWithFulfilledPromises()
- {
- $pending = [];
- for ($i = 0; $i < 100; $i++) {
- $pending[] = new FulfilledPromise($i);
- }
- $values = [];
- $each = new EachPromise($pending, [
- 'fulfilled' => function ($value) use (&$values) {
- $values[] = $value;
- }
- ]);
- $called = false;
- $each->promise()->then(function () use (&$called) {
- $called = true;
- });
- $this->assertFalse($called);
- P\Utils::queue()->run();
- $this->assertTrue($called);
- $this->assertSame(range(0, 99), $values);
- }
-
- public function testDoesNotBlowStackWithRejectedPromises()
- {
- $pending = [];
- for ($i = 0; $i < 100; $i++) {
- $pending[] = new RejectedPromise($i);
- }
- $values = [];
- $each = new EachPromise($pending, [
- 'rejected' => function ($value) use (&$values) {
- $values[] = $value;
- }
- ]);
- $called = false;
- $each->promise()->then(
- function () use (&$called) { $called = true; },
- function () { $this->fail('Should not have rejected.'); }
- );
- $this->assertFalse($called);
- P\Utils::queue()->run();
- $this->assertTrue($called);
- $this->assertSame(range(0, 99), $values);
- }
-
- public function testReturnsPromiseForWhatever()
- {
- $called = [];
- $arr = ['a', 'b'];
- $each = new EachPromise($arr, [
- 'fulfilled' => function ($v) use (&$called) { $called[] = $v; }
- ]);
- $p = $each->promise();
- $this->assertNull($p->wait());
- $this->assertSame(['a', 'b'], $called);
- }
-
- public function testRejectsAggregateWhenNextThrows()
- {
- $iter = function () {
- yield 'a';
- throw new \Exception('Failure');
- };
- $each = new EachPromise($iter());
- $p = $each->promise();
- $e = null;
- $received = null;
- $p->then(null, function ($reason) use (&$e) { $e = $reason; });
- P\Utils::queue()->run();
- $this->assertInstanceOf(\Exception::class, $e);
- $this->assertSame('Failure', $e->getMessage());
- }
-
- public function testDoesNotCallNextOnIteratorUntilNeededWhenWaiting()
- {
- $results = [];
- $values = [10];
- $remaining = 9;
- $iter = function () use (&$values) {
- while ($value = array_pop($values)) {
- yield $value;
- }
- };
- $each = new EachPromise($iter(), [
- 'concurrency' => 1,
- 'fulfilled' => function ($r) use (&$results, &$values, &$remaining) {
- $results[] = $r;
- if ($remaining > 0) {
- $values[] = $remaining--;
- }
- }
- ]);
- $each->promise()->wait();
- $this->assertSame(range(10, 1), $results);
- }
-
- public function testDoesNotCallNextOnIteratorUntilNeededWhenAsync()
- {
- $firstPromise = new Promise();
- $pending = [$firstPromise];
- $values = [$firstPromise];
- $results = [];
- $remaining = 9;
- $iter = function () use (&$values) {
- while ($value = array_pop($values)) {
- yield $value;
- }
- };
- $each = new EachPromise($iter(), [
- 'concurrency' => 1,
- 'fulfilled' => function ($r) use (&$results, &$values, &$remaining, &$pending) {
- $results[] = $r;
- if ($remaining-- > 0) {
- $pending[] = $values[] = new Promise();
- }
- }
- ]);
- $i = 0;
- $each->promise();
- while ($promise = array_pop($pending)) {
- $promise->resolve($i++);
- P\Utils::queue()->run();
- }
- $this->assertSame(range(0, 9), $results);
- }
-
- private function createSelfResolvingPromise($value)
- {
- $p = new Promise(function () use (&$p, $value) {
- $p->resolve($value);
- });
- $trickCsFixer = true;
-
- return $p;
- }
-
- public function testMutexPreventsGeneratorRecursion()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $results = $promises = [];
- for ($i = 0; $i < 20; $i++) {
- $p = $this->createSelfResolvingPromise($i);
- $pending[] = $p;
- $promises[] = $p;
- }
-
- $iter = function () use (&$promises, &$pending) {
- foreach ($promises as $promise) {
- // Resolve a promises, which will trigger the then() function,
- // which would cause the EachPromise to try to add more
- // promises to the queue. Without a lock, this would trigger
- // a "Cannot resume an already running generator" fatal error.
- if ($p = array_pop($pending)) {
- $p->wait();
- }
- yield $promise;
- }
- };
-
- $each = new EachPromise($iter(), [
- 'concurrency' => 5,
- 'fulfilled' => function ($r) use (&$results, &$pending) {
- $results[] = $r;
- }
- ]);
-
- $each->promise()->wait();
- $this->assertCount(20, $results);
- }
-
- public function testIteratorWithSameKey()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $iter = function () {
- yield 'foo' => $this->createSelfResolvingPromise(1);
- yield 'foo' => $this->createSelfResolvingPromise(2);
- yield 1 => $this->createSelfResolvingPromise(3);
- yield 1 => $this->createSelfResolvingPromise(4);
- };
- $called = 0;
- $each = new EachPromise($iter(), [
- 'fulfilled' => function ($value, $idx, Promise $aggregate) use (&$called) {
- $called++;
- if ($value < 3) {
- $this->assertSame('foo', $idx);
- } else {
- $this->assertSame(1, $idx);
- }
- },
- ]);
- $each->promise()->wait();
- $this->assertSame(4, $called);
- }
-
- public function testIsWaitableWhenLimited()
- {
- $promises = [
- $this->createSelfResolvingPromise('a'),
- $this->createSelfResolvingPromise('c'),
- $this->createSelfResolvingPromise('b'),
- $this->createSelfResolvingPromise('d')
- ];
- $called = [];
- $each = new EachPromise($promises, [
- 'concurrency' => 2,
- 'fulfilled' => function ($value) use (&$called) {
- $called[] = $value;
- }
- ]);
- $p = $each->promise();
- $this->assertNull($p->wait());
- $this->assertSame(['a', 'c', 'b', 'd'], $called);
- $this->assertTrue(P\Is::fulfilled($p));
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/EachTest.php b/lib/Google/vendor/guzzlehttp/promises/tests/EachTest.php
deleted file mode 100644
index b6473b866..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/EachTest.php
+++ /dev/null
@@ -1,34 +0,0 @@
-resolve('a');
- P\Utils::queue()->run();
- $this->assertTrue(P\Is::fulfilled($aggregate));
- }
-
- public function testEachLimitAllRejectsOnFailure()
- {
- $p = [new FulfilledPromise('a'), new RejectedPromise('b')];
- $aggregate = P\Each::ofLimitAll($p, 2);
-
- P\Utils::queue()->run();
- $this->assertTrue(P\Is::rejected($aggregate));
-
- $result = P\Utils::inspect($aggregate);
- $this->assertSame('b', $result['reason']);
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/FulfilledPromiseTest.php b/lib/Google/vendor/guzzlehttp/promises/tests/FulfilledPromiseTest.php
deleted file mode 100644
index 2bbc6a8d6..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/FulfilledPromiseTest.php
+++ /dev/null
@@ -1,113 +0,0 @@
-assertTrue(P\Is::fulfilled($p));
- $this->assertSame('foo', $p->wait(true));
- }
-
- public function testCannotCancel()
- {
- $p = new FulfilledPromise('foo');
- $this->assertTrue(P\Is::fulfilled($p));
- $p->cancel();
- $this->assertSame('foo', $p->wait());
- }
-
- /**
- * @expectedExceptionMessage Cannot resolve a fulfilled promise
- */
- public function testCannotResolve()
- {
- $this->expectException(\LogicException::class);
-
- $p = new FulfilledPromise('foo');
- $p->resolve('bar');
- }
-
- /**
- * @expectedExceptionMessage Cannot reject a fulfilled promise
- */
- public function testCannotReject()
- {
- $this->expectException(\LogicException::class);
-
- $p = new FulfilledPromise('foo');
- $p->reject('bar');
- }
-
- public function testCanResolveWithSameValue()
- {
- $p = new FulfilledPromise('foo');
- $p->resolve('foo');
- $this->assertSame('foo', $p->wait());
- }
-
- public function testCannotResolveWithPromise()
- {
- $this->expectException(\InvalidArgumentException::class);
-
- new FulfilledPromise(new Promise());
- }
-
- public function testReturnsSelfWhenNoOnFulfilled()
- {
- $p = new FulfilledPromise('a');
- $this->assertSame($p, $p->then());
- }
-
- public function testAsynchronouslyInvokesOnFulfilled()
- {
- $p = new FulfilledPromise('a');
- $r = null;
- $f = function ($d) use (&$r) { $r = $d; };
- $p2 = $p->then($f);
- $this->assertNotSame($p, $p2);
- $this->assertNull($r);
- P\Utils::queue()->run();
- $this->assertSame('a', $r);
- }
-
- public function testReturnsNewRejectedWhenOnFulfilledFails()
- {
- $p = new FulfilledPromise('a');
- $f = function () { throw new \Exception('b'); };
- $p2 = $p->then($f);
- $this->assertNotSame($p, $p2);
- try {
- $p2->wait();
- $this->fail();
- } catch (\Exception $e) {
- $this->assertSame('b', $e->getMessage());
- }
- }
-
- public function testOtherwiseIsSugarForRejections()
- {
- $c = null;
- $p = new FulfilledPromise('foo');
- $p->otherwise(function ($v) use (&$c) { $c = $v; });
- $this->assertNull($c);
- }
-
- public function testDoesNotTryToFulfillTwiceDuringTrampoline()
- {
- $fp = new FulfilledPromise('a');
- $t1 = $fp->then(function ($v) { return $v . ' b'; });
- $t1->resolve('why!');
- $this->assertSame('why!', $t1->wait());
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/IsTest.php b/lib/Google/vendor/guzzlehttp/promises/tests/IsTest.php
deleted file mode 100644
index 0a7ade3fd..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/IsTest.php
+++ /dev/null
@@ -1,40 +0,0 @@
-assertTrue(P\Is::fulfilled($p));
- $this->assertFalse(P\Is::rejected($p));
- }
-
- public function testKnowsIfRejected()
- {
- $p = new RejectedPromise(null);
- $this->assertTrue(P\Is::rejected($p));
- $this->assertFalse(P\Is::fulfilled($p));
- }
-
- public function testKnowsIfSettled()
- {
- $p = new RejectedPromise(null);
- $this->assertTrue(P\Is::settled($p));
- $this->assertFalse(P\Is::pending($p));
- }
-
- public function testKnowsIfPending()
- {
- $p = new Promise();
- $this->assertFalse(P\Is::settled($p));
- $this->assertTrue(P\Is::pending($p));
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/NotPromiseInstance.php b/lib/Google/vendor/guzzlehttp/promises/tests/NotPromiseInstance.php
deleted file mode 100644
index bb1bc763e..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/NotPromiseInstance.php
+++ /dev/null
@@ -1,49 +0,0 @@
-nextPromise = new Promise();
- }
-
- public function then(callable $res = null, callable $rej = null)
- {
- return $this->nextPromise->then($res, $rej);
- }
-
- public function otherwise(callable $onRejected)
- {
- return $this->then($onRejected);
- }
-
- public function resolve($value)
- {
- $this->nextPromise->resolve($value);
- }
-
- public function reject($reason)
- {
- $this->nextPromise->reject($reason);
- }
-
- public function wait($unwrap = true, $defaultResolution = null)
- {
- }
-
- public function cancel()
- {
- }
-
- public function getState()
- {
- return $this->nextPromise->getState();
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/PromiseTest.php b/lib/Google/vendor/guzzlehttp/promises/tests/PromiseTest.php
deleted file mode 100644
index 7e4e91428..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/PromiseTest.php
+++ /dev/null
@@ -1,761 +0,0 @@
-expectException(\LogicException::class);
- $this->expectExceptionMessage('The promise is already fulfilled');
-
- $p = new Promise();
- $p->resolve('foo');
- $p->resolve('bar');
- $this->assertSame('foo', $p->wait());
- }
-
- public function testCanResolveWithSameValue()
- {
- $p = new Promise();
- $p->resolve('foo');
- $p->resolve('foo');
- $this->assertSame('foo', $p->wait());
- }
-
- public function testCannotRejectNonPendingPromise()
- {
- $this->expectException(\LogicException::class);
- $this->expectExceptionMessage('Cannot change a fulfilled promise to rejected');
-
- $p = new Promise();
- $p->resolve('foo');
- $p->reject('bar');
- $this->assertSame('foo', $p->wait());
- }
-
- public function testCanRejectWithSameValue()
- {
- $p = new Promise();
- $p->reject('foo');
- $p->reject('foo');
- $this->assertTrue(P\Is::rejected($p));
- }
-
- public function testCannotRejectResolveWithSameValue()
- {
- $this->expectException(\LogicException::class);
- $this->expectExceptionMessage('Cannot change a fulfilled promise to rejected');
-
- $p = new Promise();
- $p->resolve('foo');
- $p->reject('foo');
- }
-
- public function testInvokesWaitFunction()
- {
- $p = new Promise(function () use (&$p) {
- $p->resolve('10');
- });
- $this->assertSame('10', $p->wait());
- }
-
- public function testRejectsAndThrowsWhenWaitFailsToResolve()
- {
- $this->expectException(\GuzzleHttp\Promise\RejectionException::class);
- $this->expectExceptionMessage('The promise was rejected with reason: Invoking the wait callback did not resolve the promise');
-
- $p = new Promise(function () {});
- $p->wait();
- }
-
- public function testThrowsWhenUnwrapIsRejectedWithNonException()
- {
- $this->expectException(\GuzzleHttp\Promise\RejectionException::class);
- $this->expectExceptionMessage('The promise was rejected with reason: foo');
-
- $p = new Promise(function () use (&$p) {
- $p->reject('foo');
- });
- $p->wait();
- }
-
- public function testThrowsWhenUnwrapIsRejectedWithException()
- {
- $this->expectException(\UnexpectedValueException::class);
- $this->expectExceptionMessage('foo');
-
- $e = new \UnexpectedValueException('foo');
- $p = new Promise(function () use (&$p, $e) {
- $p->reject($e);
- });
- $p->wait();
- }
-
- public function testDoesNotUnwrapExceptionsWhenDisabled()
- {
- $p = new Promise(function () use (&$p) {
- $p->reject('foo');
- });
- $this->assertTrue(P\Is::pending($p));
- $p->wait(false);
- $this->assertTrue(P\Is::rejected($p));
- }
-
- public function testRejectsSelfWhenWaitThrows()
- {
- $e = new \UnexpectedValueException('foo');
- $p = new Promise(function () use ($e) {
- throw $e;
- });
- try {
- $p->wait();
- $this->fail();
- } catch (\UnexpectedValueException $e) {
- $this->assertTrue(P\Is::rejected($p));
- }
- }
-
- public function testWaitsOnNestedPromises()
- {
- $p = new Promise(function () use (&$p) {
- $p->resolve('_');
- });
- $p2 = new Promise(function () use (&$p2) {
- $p2->resolve('foo');
- });
- $p3 = $p->then(function () use ($p2) {
- return $p2;
- });
- $this->assertSame('foo', $p3->wait());
- }
-
- public function testThrowsWhenWaitingOnPromiseWithNoWaitFunction()
- {
- $this->expectException(\GuzzleHttp\Promise\RejectionException::class);
-
- $p = new Promise();
- $p->wait();
- }
-
- public function testThrowsWaitExceptionAfterPromiseIsResolved()
- {
- $p = new Promise(function () use (&$p) {
- $p->reject('Foo!');
- throw new \Exception('Bar?');
- });
-
- try {
- $p->wait();
- $this->fail();
- } catch (\Exception $e) {
- $this->assertSame('Bar?', $e->getMessage());
- }
- }
-
- public function testGetsActualWaitValueFromThen()
- {
- $p = new Promise(function () use (&$p) {
- $p->reject('Foo!');
- });
- $p2 = $p->then(null, function ($reason) {
- return new RejectedPromise([$reason]);
- });
-
- try {
- $p2->wait();
- $this->fail('Should have thrown');
- } catch (RejectionException $e) {
- $this->assertSame(['Foo!'], $e->getReason());
- }
- }
-
- public function testWaitBehaviorIsBasedOnLastPromiseInChain()
- {
- $p3 = new Promise(function () use (&$p3) {
- $p3->resolve('Whoop');
- });
- $p2 = new Promise(function () use (&$p2, $p3) {
- $p2->reject($p3);
- });
- $p = new Promise(function () use (&$p, $p2) {
- $p->reject($p2);
- });
- $this->assertSame('Whoop', $p->wait());
- }
-
- public function testWaitsOnAPromiseChainEvenWhenNotUnwrapped()
- {
- $p2 = new Promise(function () use (&$p2) {
- $p2->reject('Fail');
- });
- $p = new Promise(function () use ($p2, &$p) {
- $p->resolve($p2);
- });
- $p->wait(false);
- $this->assertTrue(P\Is::rejected($p2));
- }
-
- public function testCannotCancelNonPending()
- {
- $p = new Promise();
- $p->resolve('foo');
- $p->cancel();
- $this->assertTrue(P\Is::fulfilled($p));
- }
-
- public function testCancelsPromiseWhenNoCancelFunction()
- {
- $this->expectException(\GuzzleHttp\Promise\CancellationException::class);
-
- $p = new Promise();
- $p->cancel();
- $this->assertTrue(P\Is::rejected($p));
- $p->wait();
- }
-
- public function testCancelsPromiseWithCancelFunction()
- {
- $called = false;
- $p = new Promise(null, function () use (&$called) {
- $called = true;
- });
- $p->cancel();
- $this->assertTrue(P\Is::rejected($p));
- $this->assertTrue($called);
- }
-
- public function testCancelsUppermostPendingPromise()
- {
- $called = false;
- $p1 = new Promise(null, function () use (&$called) {
- $called = true;
- });
- $p2 = $p1->then(function () {});
- $p3 = $p2->then(function () {});
- $p4 = $p3->then(function () {});
- $p3->cancel();
- $this->assertTrue(P\Is::rejected($p1));
- $this->assertTrue(P\Is::rejected($p2));
- $this->assertTrue(P\Is::rejected($p3));
- $this->assertTrue(P\Is::pending($p4));
- $this->assertTrue($called);
-
- try {
- $p3->wait();
- $this->fail();
- } catch (CancellationException $e) {
- $this->assertStringContainsString('cancelled', $e->getMessage());
- }
-
- try {
- $p4->wait();
- $this->fail();
- } catch (CancellationException $e) {
- $this->assertStringContainsString('cancelled', $e->getMessage());
- }
-
- $this->assertTrue(P\Is::rejected($p4));
- }
-
- public function testCancelsChildPromises()
- {
- $called1 = $called2 = $called3 = false;
- $p1 = new Promise(null, function () use (&$called1) {
- $called1 = true;
- });
- $p2 = new Promise(null, function () use (&$called2) {
- $called2 = true;
- });
- $p3 = new Promise(null, function () use (&$called3) {
- $called3 = true;
- });
- $p4 = $p2->then(function () use ($p3) {
- return $p3;
- });
- $p5 = $p4->then(function () {
- $this->fail();
- });
- $p4->cancel();
- $this->assertTrue(P\Is::pending($p1));
- $this->assertTrue(P\Is::rejected($p2));
- $this->assertTrue(P\Is::pending($p3));
- $this->assertTrue(P\Is::rejected($p4));
- $this->assertTrue(P\Is::pending($p5));
- $this->assertFalse($called1);
- $this->assertTrue($called2);
- $this->assertFalse($called3);
- }
-
- public function testRejectsPromiseWhenCancelFails()
- {
- $called = false;
- $p = new Promise(null, function () use (&$called) {
- $called = true;
- throw new \Exception('e');
- });
- $p->cancel();
- $this->assertTrue(P\Is::rejected($p));
- $this->assertTrue($called);
- try {
- $p->wait();
- $this->fail();
- } catch (\Exception $e) {
- $this->assertSame('e', $e->getMessage());
- }
- }
-
- public function testCreatesPromiseWhenFulfilledAfterThen()
- {
- $p = new Promise();
- $carry = null;
- $p2 = $p->then(function ($v) use (&$carry) {
- $carry = $v;
- });
- $this->assertNotSame($p, $p2);
- $p->resolve('foo');
- P\Utils::queue()->run();
-
- $this->assertSame('foo', $carry);
- }
-
- public function testCreatesPromiseWhenFulfilledBeforeThen()
- {
- $p = new Promise();
- $p->resolve('foo');
- $carry = null;
- $p2 = $p->then(function ($v) use (&$carry) {
- $carry = $v;
- });
- $this->assertNotSame($p, $p2);
- $this->assertNull($carry);
- P\Utils::queue()->run();
- $this->assertSame('foo', $carry);
- }
-
- public function testCreatesPromiseWhenFulfilledWithNoCallback()
- {
- $p = new Promise();
- $p->resolve('foo');
- $p2 = $p->then();
- $this->assertNotSame($p, $p2);
- $this->assertInstanceOf(FulfilledPromise::class, $p2);
- }
-
- public function testCreatesPromiseWhenRejectedAfterThen()
- {
- $p = new Promise();
- $carry = null;
- $p2 = $p->then(null, function ($v) use (&$carry) {
- $carry = $v;
- });
- $this->assertNotSame($p, $p2);
- $p->reject('foo');
- P\Utils::queue()->run();
- $this->assertSame('foo', $carry);
- }
-
- public function testCreatesPromiseWhenRejectedBeforeThen()
- {
- $p = new Promise();
- $p->reject('foo');
- $carry = null;
- $p2 = $p->then(null, function ($v) use (&$carry) {
- $carry = $v;
- });
- $this->assertNotSame($p, $p2);
- $this->assertNull($carry);
- P\Utils::queue()->run();
- $this->assertSame('foo', $carry);
- }
-
- public function testCreatesPromiseWhenRejectedWithNoCallback()
- {
- $p = new Promise();
- $p->reject('foo');
- $p2 = $p->then();
- $this->assertNotSame($p, $p2);
- $this->assertInstanceOf(RejectedPromise::class, $p2);
- }
-
- public function testInvokesWaitFnsForThens()
- {
- $p = new Promise(function () use (&$p) {
- $p->resolve('a');
- });
- $p2 = $p
- ->then(function ($v) {
- return $v . '-1-';
- })
- ->then(function ($v) {
- return $v . '2';
- });
- $this->assertSame('a-1-2', $p2->wait());
- }
-
- public function testStacksThenWaitFunctions()
- {
- $p1 = new Promise(function () use (&$p1) {
- $p1->resolve('a');
- });
- $p2 = new Promise(function () use (&$p2) {
- $p2->resolve('b');
- });
- $p3 = new Promise(function () use (&$p3) {
- $p3->resolve('c');
- });
- $p4 = $p1
- ->then(function () use ($p2) {
- return $p2;
- })
- ->then(function () use ($p3) {
- return $p3;
- });
- $this->assertSame('c', $p4->wait());
- }
-
- public function testForwardsFulfilledDownChainBetweenGaps()
- {
- $p = new Promise();
- $r = $r2 = null;
- $p->then(null, null)
- ->then(function ($v) use (&$r) {
- $r = $v;
- return $v . '2';
- })
- ->then(function ($v) use (&$r2) {
- $r2 = $v;
- });
- $p->resolve('foo');
- P\Utils::queue()->run();
- $this->assertSame('foo', $r);
- $this->assertSame('foo2', $r2);
- }
-
- public function testForwardsRejectedPromisesDownChainBetweenGaps()
- {
- $p = new Promise();
- $r = $r2 = null;
- $p->then(null, null)
- ->then(null, function ($v) use (&$r) {
- $r = $v;
- return $v . '2';
- })
- ->then(function ($v) use (&$r2) {
- $r2 = $v;
- });
- $p->reject('foo');
- P\Utils::queue()->run();
- $this->assertSame('foo', $r);
- $this->assertSame('foo2', $r2);
- }
-
- public function testForwardsThrownPromisesDownChainBetweenGaps()
- {
- $e = new \Exception();
- $p = new Promise();
- $r = $r2 = null;
- $p->then(null, null)
- ->then(null, function ($v) use (&$r, $e) {
- $r = $v;
- throw $e;
- })
- ->then(
- null,
- function ($v) use (&$r2) {
- $r2 = $v;
- }
- );
- $p->reject('foo');
- P\Utils::queue()->run();
- $this->assertSame('foo', $r);
- $this->assertSame($e, $r2);
- }
-
- public function testForwardsReturnedRejectedPromisesDownChainBetweenGaps()
- {
- $p = new Promise();
- $rejected = new RejectedPromise('bar');
- $r = $r2 = null;
- $p->then(null, null)
- ->then(null, function ($v) use (&$r, $rejected) {
- $r = $v;
- return $rejected;
- })
- ->then(
- null,
- function ($v) use (&$r2) {
- $r2 = $v;
- }
- );
- $p->reject('foo');
- P\Utils::queue()->run();
- $this->assertSame('foo', $r);
- $this->assertSame('bar', $r2);
- try {
- $p->wait();
- } catch (RejectionException $e) {
- $this->assertSame('foo', $e->getReason());
- }
- }
-
- public function testForwardsHandlersToNextPromise()
- {
- $p = new Promise();
- $p2 = new Promise();
- $resolved = null;
- $p
- ->then(function ($v) use ($p2) {
- return $p2;
- })
- ->then(function ($value) use (&$resolved) {
- $resolved = $value;
- });
- $p->resolve('a');
- $p2->resolve('b');
- P\Utils::queue()->run();
- $this->assertSame('b', $resolved);
- }
-
- public function testRemovesReferenceFromChildWhenParentWaitedUpon()
- {
- $r = null;
- $p = new Promise(function () use (&$p) {
- $p->resolve('a');
- });
- $p2 = new Promise(function () use (&$p2) {
- $p2->resolve('b');
- });
- $pb = $p->then(
- function ($v) use ($p2, &$r) {
- $r = $v;
- return $p2;
- }
- )
- ->then(function ($v) {
- return $v . '.';
- });
- $this->assertSame('a', $p->wait());
- $this->assertSame('b', $p2->wait());
- $this->assertSame('b.', $pb->wait());
- $this->assertSame('a', $r);
- }
-
- public function testForwardsHandlersWhenFulfilledPromiseIsReturned()
- {
- $res = [];
- $p = new Promise();
- $p2 = new Promise();
- $p2->resolve('foo');
- $p2->then(function ($v) use (&$res) {
- $res[] = 'A:' . $v;
- });
- // $res is A:foo
- $p
- ->then(function () use ($p2, &$res) {
- $res[] = 'B';
- return $p2;
- })
- ->then(function ($v) use (&$res) {
- $res[] = 'C:' . $v;
- });
- $p->resolve('a');
- $p->then(function ($v) use (&$res) {
- $res[] = 'D:' . $v;
- });
- P\Utils::queue()->run();
- $this->assertSame(['A:foo', 'B', 'D:a', 'C:foo'], $res);
- }
-
- public function testForwardsHandlersWhenRejectedPromiseIsReturned()
- {
- $res = [];
- $p = new Promise();
- $p2 = new Promise();
- $p2->reject('foo');
- $p2->then(null, function ($v) use (&$res) {
- $res[] = 'A:' . $v;
- });
- $p->then(null, function () use ($p2, &$res) {
- $res[] = 'B';
- return $p2;
- })
- ->then(null, function ($v) use (&$res) {
- $res[] = 'C:' . $v;
- });
- $p->reject('a');
- $p->then(null, function ($v) use (&$res) {
- $res[] = 'D:' . $v;
- });
- P\Utils::queue()->run();
- $this->assertSame(['A:foo', 'B', 'D:a', 'C:foo'], $res);
- }
-
- public function testDoesNotForwardRejectedPromise()
- {
- $res = [];
- $p = new Promise();
- $p2 = new Promise();
- $p2->cancel();
- $p2->then(function ($v) use (&$res) {
- $res[] = "B:$v";
- return $v;
- });
- $p->then(function ($v) use ($p2, &$res) {
- $res[] = "B:$v";
- return $p2;
- })
- ->then(function ($v) use (&$res) {
- $res[] = 'C:' . $v;
- });
- $p->resolve('a');
- $p->then(function ($v) use (&$res) {
- $res[] = 'D:' . $v;
- });
- P\Utils::queue()->run();
- $this->assertSame(['B:a', 'D:a'], $res);
- }
-
- public function testRecursivelyForwardsWhenOnlyThennable()
- {
- $res = [];
- $p = new Promise();
- $p2 = new Thennable();
- $p2->resolve('foo');
- $p2->then(function ($v) use (&$res) {
- $res[] = 'A:' . $v;
- });
- $p->then(function () use ($p2, &$res) {
- $res[] = 'B';
- return $p2;
- })
- ->then(function ($v) use (&$res) {
- $res[] = 'C:' . $v;
- });
- $p->resolve('a');
- $p->then(function ($v) use (&$res) {
- $res[] = 'D:' . $v;
- });
- P\Utils::queue()->run();
- $this->assertSame(['A:foo', 'B', 'D:a', 'C:foo'], $res);
- }
-
- public function testRecursivelyForwardsWhenNotInstanceOfPromise()
- {
- $res = [];
- $p = new Promise();
- $p2 = new NotPromiseInstance();
- $p2->then(function ($v) use (&$res) {
- $res[] = 'A:' . $v;
- });
- $p->then(function () use ($p2, &$res) {
- $res[] = 'B';
- return $p2;
- })
- ->then(function ($v) use (&$res) {
- $res[] = 'C:' . $v;
- });
- $p->resolve('a');
- $p->then(function ($v) use (&$res) {
- $res[] = 'D:' . $v;
- });
- P\Utils::queue()->run();
- $this->assertSame(['B', 'D:a'], $res);
- $p2->resolve('foo');
- P\Utils::queue()->run();
- $this->assertSame(['B', 'D:a', 'A:foo', 'C:foo'], $res);
- }
-
- public function testCannotResolveWithSelf()
- {
- $this->expectException(\LogicException::class);
- $this->expectExceptionMessage('Cannot fulfill or reject a promise with itself');
-
- $p = new Promise();
- $p->resolve($p);
- }
-
- public function testCannotRejectWithSelf()
- {
- $this->expectException(\LogicException::class);
- $this->expectExceptionMessage('Cannot fulfill or reject a promise with itself');
-
- $p = new Promise();
- $p->reject($p);
- }
-
- public function testDoesNotBlowStackWhenWaitingOnNestedThens()
- {
- $inner = new Promise(function () use (&$inner) {
- $inner->resolve(0);
- });
- $prev = $inner;
- for ($i = 1; $i < 100; $i++) {
- $prev = $prev->then(function ($i) {
- return $i + 1;
- });
- }
-
- $parent = new Promise(function () use (&$parent, $prev) {
- $parent->resolve($prev);
- });
-
- $this->assertSame(99, $parent->wait());
- }
-
- public function testOtherwiseIsSugarForRejections()
- {
- $p = new Promise();
- $p->reject('foo');
- $p->otherwise(function ($v) use (&$c) {
- $c = $v;
- });
- P\Utils::queue()->run();
- $this->assertSame($c, 'foo');
- }
-
- public function testRepeatedWaitFulfilled()
- {
- $promise = new Promise(function () use (&$promise) {
- $promise->resolve('foo');
- });
-
- $this->assertSame('foo', $promise->wait());
- $this->assertSame('foo', $promise->wait());
- }
-
- public function testRepeatedWaitRejected()
- {
- $promise = new Promise(function () use (&$promise) {
- $promise->reject(new \RuntimeException('foo'));
- });
-
- $exceptionCount = 0;
- try {
- $promise->wait();
- } catch (\Exception $e) {
- $this->assertSame('foo', $e->getMessage());
- $exceptionCount++;
- }
-
- try {
- $promise->wait();
- } catch (\Exception $e) {
- $this->assertSame('foo', $e->getMessage());
- $exceptionCount++;
- }
-
- $this->assertSame(2, $exceptionCount);
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/PropertyHelper.php b/lib/Google/vendor/guzzlehttp/promises/tests/PropertyHelper.php
deleted file mode 100644
index d7757b09a..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/PropertyHelper.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- */
-class PropertyHelper
-{
- /**
- * @param object $object
- * @param string $property
- *
- * @throws \ReflectionException
- */
- public static function get($object, $property)
- {
- $property = (new \ReflectionObject($object))->getProperty($property);
- $property->setAccessible(true);
-
- return $property->getValue($object);
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php b/lib/Google/vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php
deleted file mode 100644
index 78b72cec1..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php
+++ /dev/null
@@ -1,149 +0,0 @@
-assertTrue(P\Is::rejected($p));
- try {
- $p->wait(true);
- $this->fail();
- } catch (\Exception $e) {
- $this->assertTrue(P\Is::rejected($p));
- $this->assertStringContainsString('foo', $e->getMessage());
- }
- }
-
- public function testCannotCancel()
- {
- $p = new RejectedPromise('foo');
- $p->cancel();
- $this->assertTrue(P\Is::rejected($p));
- }
-
- /**
- * @exepctedExceptionMessage Cannot resolve a rejected promise
- */
- public function testCannotResolve()
- {
- $this->expectException(\LogicException::class);
-
- $p = new RejectedPromise('foo');
- $p->resolve('bar');
- }
-
- /**
- * @expectedExceptionMessage Cannot reject a rejected promise
- */
- public function testCannotReject()
- {
- $this->expectException(\LogicException::class);
-
- $p = new RejectedPromise('foo');
- $p->reject('bar');
- }
-
- public function testCanRejectWithSameValue()
- {
- $p = new RejectedPromise('foo');
- $p->reject('foo');
- $this->assertTrue(P\Is::rejected($p));
- }
-
- public function testThrowsSpecificException()
- {
- $e = new \Exception();
- $p = new RejectedPromise($e);
- try {
- $p->wait(true);
- $this->fail();
- } catch (\Exception $e2) {
- $this->assertSame($e, $e2);
- }
- }
-
- public function testCannotResolveWithPromise()
- {
- $this->expectException(\InvalidArgumentException::class);
-
- new RejectedPromise(new Promise());
- }
-
- public function testReturnsSelfWhenNoOnReject()
- {
- $p = new RejectedPromise('a');
- $this->assertSame($p, $p->then());
- }
-
- public function testInvokesOnRejectedAsynchronously()
- {
- $p = new RejectedPromise('a');
- $r = null;
- $f = function ($reason) use (&$r) { $r = $reason; };
- $p->then(null, $f);
- $this->assertNull($r);
- P\Utils::queue()->run();
- $this->assertSame('a', $r);
- }
-
- public function testReturnsNewRejectedWhenOnRejectedFails()
- {
- $p = new RejectedPromise('a');
- $f = function () { throw new \Exception('b'); };
- $p2 = $p->then(null, $f);
- $this->assertNotSame($p, $p2);
- try {
- $p2->wait();
- $this->fail();
- } catch (\Exception $e) {
- $this->assertSame('b', $e->getMessage());
- }
- }
-
- public function testWaitingIsNoOp()
- {
- $p = new RejectedPromise('a');
- $p->wait(false);
- $this->assertTrue(P\Is::rejected($p));
- }
-
- public function testOtherwiseIsSugarForRejections()
- {
- $p = new RejectedPromise('foo');
- $p->otherwise(function ($v) use (&$c) { $c = $v; });
- P\Utils::queue()->run();
- $this->assertSame('foo', $c);
- }
-
- public function testCanResolveThenWithSuccess()
- {
- $actual = null;
- $p = new RejectedPromise('foo');
- $p->otherwise(function ($v) {
- return $v . ' bar';
- })->then(function ($v) use (&$actual) {
- $actual = $v;
- });
- P\Utils::queue()->run();
- $this->assertSame('foo bar', $actual);
- }
-
- public function testDoesNotTryToRejectTwiceDuringTrampoline()
- {
- $fp = new RejectedPromise('a');
- $t1 = $fp->then(null, function ($v) { return $v . ' b'; });
- $t1->resolve('why!');
- $this->assertSame('why!', $t1->wait());
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/RejectionExceptionTest.php b/lib/Google/vendor/guzzlehttp/promises/tests/RejectionExceptionTest.php
deleted file mode 100644
index 0d2e9730e..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/RejectionExceptionTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-assertSame($thing, $e->getReason());
- $this->assertSame('The promise was rejected with reason: foo', $e->getMessage());
- }
-
- public function testCanGetReasonMessageFromJson()
- {
- $reason = new Thing2();
- $e = new RejectionException($reason);
- $this->assertStringContainsString("{}", $e->getMessage());
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/TaskQueueTest.php b/lib/Google/vendor/guzzlehttp/promises/tests/TaskQueueTest.php
deleted file mode 100644
index ad8be7722..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/TaskQueueTest.php
+++ /dev/null
@@ -1,33 +0,0 @@
-assertTrue($tq->isEmpty());
- }
-
- public function testKnowsIfFull()
- {
- $tq = new TaskQueue(false);
- $tq->add(function () {});
- $this->assertFalse($tq->isEmpty());
- }
-
- public function testExecutesTasksInOrder()
- {
- $tq = new TaskQueue(false);
- $called = [];
- $tq->add(function () use (&$called) { $called[] = 'a'; });
- $tq->add(function () use (&$called) { $called[] = 'b'; });
- $tq->add(function () use (&$called) { $called[] = 'c'; });
- $tq->run();
- $this->assertSame(['a', 'b', 'c'], $called);
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/Thennable.php b/lib/Google/vendor/guzzlehttp/promises/tests/Thennable.php
deleted file mode 100644
index d3f326521..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/Thennable.php
+++ /dev/null
@@ -1,25 +0,0 @@
-nextPromise = new Promise();
- }
-
- public function then(callable $res = null, callable $rej = null)
- {
- return $this->nextPromise->then($res, $rej);
- }
-
- public function resolve($value)
- {
- $this->nextPromise->resolve($value);
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/Thing1.php b/lib/Google/vendor/guzzlehttp/promises/tests/Thing1.php
deleted file mode 100644
index 6902cbd6c..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/Thing1.php
+++ /dev/null
@@ -1,18 +0,0 @@
-message = $message;
- }
-
- public function __toString()
- {
- return $this->message;
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/promises/tests/Thing2.php b/lib/Google/vendor/guzzlehttp/promises/tests/Thing2.php
deleted file mode 100644
index c762ea974..000000000
--- a/lib/Google/vendor/guzzlehttp/promises/tests/Thing2.php
+++ /dev/null
@@ -1,12 +0,0 @@
-resolve('a'); });
- $b = new Promise(function () use (&$b) { $b->reject('b'); });
- $c = new Promise(function () use (&$c, $e) { $c->reject($e); });
- $results = P\Utils::inspectAll([$a, $b, $c]);
- $this->assertSame([
- ['state' => 'fulfilled', 'value' => 'a'],
- ['state' => 'rejected', 'reason' => 'b'],
- ['state' => 'rejected', 'reason' => $e]
- ], $results);
- }
-
- public function testUnwrapsPromisesWithNoDefaultAndFailure()
- {
- $this->expectException(\GuzzleHttp\Promise\RejectionException::class);
-
- $promises = [new FulfilledPromise('a'), new Promise()];
- P\Utils::unwrap($promises);
- }
-
- public function testUnwrapsPromisesWithNoDefault()
- {
- $promises = [new FulfilledPromise('a')];
- $this->assertSame(['a'], P\Utils::unwrap($promises));
- }
-
- public function testUnwrapsPromisesWithKeys()
- {
- $promises = [
- 'foo' => new FulfilledPromise('a'),
- 'bar' => new FulfilledPromise('b'),
- ];
- $this->assertSame([
- 'foo' => 'a',
- 'bar' => 'b'
- ], P\Utils::unwrap($promises));
- }
-
- public function testAllAggregatesSortedArray()
- {
- $a = new Promise();
- $b = new Promise();
- $c = new Promise();
- $d = P\Utils::all([$a, $b, $c]);
- $b->resolve('b');
- $a->resolve('a');
- $c->resolve('c');
- $d->then(
- function ($value) use (&$result) { $result = $value; },
- function ($reason) use (&$result) { $result = $reason; }
- );
- P\Utils::queue()->run();
- $this->assertSame(['a', 'b', 'c'], $result);
- }
-
- public function testPromisesDynamicallyAddedToStack()
- {
- $promises = new \ArrayIterator();
- $counter = 0;
- $promises['a'] = new FulfilledPromise('a');
- $promises['b'] = $promise = new Promise(function () use (&$promise, &$promises, &$counter) {
- $counter++; // Make sure the wait function is called only once
- $promise->resolve('b');
- $promises['c'] = $subPromise = new Promise(function () use (&$subPromise) {
- $subPromise->resolve('c');
- });
- });
- $result = P\Utils::all($promises, true)->wait();
- $this->assertCount(3, $promises);
- $this->assertCount(3, $result);
- $this->assertSame($result['c'], 'c');
- $this->assertSame(1, $counter);
- }
-
- public function testAllThrowsWhenAnyRejected()
- {
- $a = new Promise();
- $b = new Promise();
- $c = new Promise();
- $d = P\Utils::all([$a, $b, $c]);
- $b->resolve('b');
- $a->reject('fail');
- $c->resolve('c');
- $d->then(
- function ($value) use (&$result) { $result = $value; },
- function ($reason) use (&$result) { $result = $reason; }
- );
- P\Utils::queue()->run();
- $this->assertSame('fail', $result);
- }
-
- public function testSomeAggregatesSortedArrayWithMax()
- {
- $a = new Promise();
- $b = new Promise();
- $c = new Promise();
- $d = P\Utils::some(2, [$a, $b, $c]);
- $b->resolve('b');
- $c->resolve('c');
- $a->resolve('a');
- $d->then(function ($value) use (&$result) { $result = $value; });
- P\Utils::queue()->run();
- $this->assertSame(['b', 'c'], $result);
- }
-
- public function testSomeRejectsWhenTooManyRejections()
- {
- $a = new Promise();
- $b = new Promise();
- $d = P\Utils::some(2, [$a, $b]);
- $a->reject('bad');
- $b->resolve('good');
- P\Utils::queue()->run();
- $this->assertTrue(P\Is::rejected($d));
- $d->then(null, function ($reason) use (&$called) {
- $called = $reason;
- });
- P\Utils::queue()->run();
- $this->assertInstanceOf(AggregateException::class, $called);
- $this->assertContains('bad', $called->getReason());
- }
-
- public function testCanWaitUntilSomeCountIsSatisfied()
- {
- $a = new Promise(function () use (&$a) { $a->resolve('a'); });
- $b = new Promise(function () use (&$b) { $b->resolve('b'); });
- $c = new Promise(function () use (&$c) { $c->resolve('c'); });
- $d = P\Utils::some(2, [$a, $b, $c]);
- $this->assertSame(['a', 'b'], $d->wait());
- }
-
- public function testThrowsIfImpossibleToWaitForSomeCount()
- {
- $this->expectException(\GuzzleHttp\Promise\AggregateException::class);
- $this->expectExceptionMessage('Not enough promises to fulfill count');
-
- $a = new Promise(function () use (&$a) { $a->resolve('a'); });
- $d = P\Utils::some(2, [$a]);
- $d->wait();
- }
-
- public function testThrowsIfResolvedWithoutCountTotalResults()
- {
- $this->expectException(\GuzzleHttp\Promise\AggregateException::class);
- $this->expectExceptionMessage('Not enough promises to fulfill count');
-
- $a = new Promise();
- $b = new Promise();
- $d = P\Utils::some(3, [$a, $b]);
- $a->resolve('a');
- $b->resolve('b');
- $d->wait();
- }
-
- public function testAnyReturnsFirstMatch()
- {
- $a = new Promise();
- $b = new Promise();
- $c = P\Utils::any([$a, $b]);
- $b->resolve('b');
- $a->resolve('a');
- $c->then(function ($value) use (&$result) { $result = $value; });
- P\Utils::queue()->run();
- $this->assertSame('b', $result);
- }
-
- public function testSettleFulfillsWithFulfilledAndRejected()
- {
- $a = new Promise();
- $b = new Promise();
- $c = new Promise();
- $d = P\Utils::settle([$a, $b, $c]);
- $b->resolve('b');
- $c->resolve('c');
- $a->reject('a');
- P\Utils::queue()->run();
- $this->assertTrue(P\Is::fulfilled($d));
- $d->then(function ($value) use (&$result) { $result = $value; });
- P\Utils::queue()->run();
- $this->assertSame([
- ['state' => 'rejected', 'reason' => 'a'],
- ['state' => 'fulfilled', 'value' => 'b'],
- ['state' => 'fulfilled', 'value' => 'c']
- ], $result);
- }
-
- public function testCanInspectFulfilledPromise()
- {
- $p = new FulfilledPromise('foo');
- $this->assertSame([
- 'state' => 'fulfilled',
- 'value' => 'foo'
- ], P\Utils::inspect($p));
- }
-
- public function testCanInspectRejectedPromise()
- {
- $p = new RejectedPromise('foo');
- $this->assertSame([
- 'state' => 'rejected',
- 'reason' => 'foo'
- ], P\Utils::inspect($p));
- }
-
- public function testCanInspectRejectedPromiseWithNormalException()
- {
- $e = new \Exception('foo');
- $p = new RejectedPromise($e);
- $this->assertSame([
- 'state' => 'rejected',
- 'reason' => $e
- ], P\Utils::inspect($p));
- }
-
- public function testReturnsTrampoline()
- {
- $this->assertInstanceOf(TaskQueue::class, P\Utils::queue());
- $this->assertSame(P\Utils::queue(), P\Utils::queue());
- }
-
- public function testCanScheduleThunk()
- {
- $tramp = P\Utils::queue();
- $promise = P\Utils::task(function () { return 'Hi!'; });
- $c = null;
- $promise->then(function ($v) use (&$c) { $c = $v; });
- $this->assertNull($c);
- $tramp->run();
- $this->assertSame('Hi!', $c);
- }
-
- public function testCanScheduleThunkWithRejection()
- {
- $tramp = P\Utils::queue();
- $promise = P\Utils::task(function () { throw new \Exception('Hi!'); });
- $c = null;
- $promise->otherwise(function ($v) use (&$c) { $c = $v; });
- $this->assertNull($c);
- $tramp->run();
- $this->assertSame('Hi!', $c->getMessage());
- }
-
- public function testCanScheduleThunkWithWait()
- {
- $tramp = P\Utils::queue();
- $promise = P\Utils::task(function () { return 'a'; });
- $this->assertSame('a', $promise->wait());
- $tramp->run();
- }
-
- public function testYieldsFromCoroutine()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $promise = P\Coroutine::of(function () {
- $value = (yield new FulfilledPromise('a'));
- yield $value . 'b';
- });
- $promise->then(function ($value) use (&$result) { $result = $value; });
- P\Utils::queue()->run();
- $this->assertSame('ab', $result);
- }
-
- public function testCanCatchExceptionsInCoroutine()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $promise = P\Coroutine::of(function () {
- try {
- yield new RejectedPromise('a');
- $this->fail('Should have thrown into the coroutine!');
- } catch (RejectionException $e) {
- $value = (yield new FulfilledPromise($e->getReason()));
- yield $value . 'b';
- }
- });
- $promise->then(function ($value) use (&$result) { $result = $value; });
- P\Utils::queue()->run();
- $this->assertTrue(P\Is::fulfilled($promise));
- $this->assertSame('ab', $result);
- }
-
- /**
- * @dataProvider rejectsParentExceptionProvider
- */
- public function testRejectsParentExceptionWhenException(PromiseInterface $promise)
- {
- $promise->then(
- function () { $this->fail(); },
- function ($reason) use (&$result) { $result = $reason; }
- );
- P\Utils::queue()->run();
- $this->assertInstanceOf(\Exception::class, $result);
- $this->assertSame('a', $result->getMessage());
- }
-
- public function rejectsParentExceptionProvider()
- {
- return [
- [P\Coroutine::of(function () {
- yield new FulfilledPromise(0);
- throw new \Exception('a');
- })],
- [P\Coroutine::of(function () {
- throw new \Exception('a');
- yield new FulfilledPromise(0);
- })],
- ];
- }
-
- public function testCanRejectFromRejectionCallback()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $promise = P\Coroutine::of(function () {
- yield new FulfilledPromise(0);
- yield new RejectedPromise('no!');
- });
- $promise->then(
- function () { $this->fail(); },
- function ($reason) use (&$result) { $result = $reason; }
- );
- P\Utils::queue()->run();
- $this->assertInstanceOf(RejectionException::class, $result);
- $this->assertSame('no!', $result->getReason());
- }
-
- public function testCanAsyncReject()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $rej = new Promise();
- $promise = P\Coroutine::of(function () use ($rej) {
- yield new FulfilledPromise(0);
- yield $rej;
- });
- $promise->then(
- function () { $this->fail(); },
- function ($reason) use (&$result) { $result = $reason; }
- );
- $rej->reject('no!');
- P\Utils::queue()->run();
- $this->assertInstanceOf(RejectionException::class, $result);
- $this->assertSame('no!', $result->getReason());
- }
-
- public function testCanCatchAndThrowOtherException()
- {
- $promise = P\Coroutine::of(function () {
- try {
- yield new RejectedPromise('a');
- $this->fail('Should have thrown into the coroutine!');
- } catch (RejectionException $e) {
- throw new \Exception('foo');
- }
- });
- $promise->otherwise(function ($value) use (&$result) { $result = $value; });
- P\Utils::queue()->run();
- $this->assertTrue(P\Is::rejected($promise));
- $this->assertStringContainsString('foo', $result->getMessage());
- }
-
- public function testCanCatchAndYieldOtherException()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $promise = P\Coroutine::of(function () {
- try {
- yield new RejectedPromise('a');
- $this->fail('Should have thrown into the coroutine!');
- } catch (RejectionException $e) {
- yield new RejectedPromise('foo');
- }
- });
- $promise->otherwise(function ($value) use (&$result) { $result = $value; });
- P\Utils::queue()->run();
- $this->assertTrue(P\Is::rejected($promise));
- $this->assertStringContainsString('foo', $result->getMessage());
- }
-
- public function createLotsOfSynchronousPromise()
- {
- return P\Coroutine::of(function () {
- $value = 0;
- for ($i = 0; $i < 1000; $i++) {
- $value = (yield new FulfilledPromise($i));
- }
- yield $value;
- });
- }
-
- public function testLotsOfSynchronousDoesNotBlowStack()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $promise = $this->createLotsOfSynchronousPromise();
- $promise->then(function ($v) use (&$r) { $r = $v; });
- P\Utils::queue()->run();
- $this->assertSame(999, $r);
- }
-
- public function testLotsOfSynchronousWaitDoesNotBlowStack()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $promise = $this->createLotsOfSynchronousPromise();
- $promise->then(function ($v) use (&$r) { $r = $v; });
- $this->assertSame(999, $promise->wait());
- $this->assertSame(999, $r);
- }
-
- private function createLotsOfFlappingPromise()
- {
- return P\Coroutine::of(function () {
- $value = 0;
- for ($i = 0; $i < 1000; $i++) {
- try {
- if ($i % 2) {
- $value = (yield new FulfilledPromise($i));
- } else {
- $value = (yield new RejectedPromise($i));
- }
- } catch (\Exception $e) {
- $value = (yield new FulfilledPromise($i));
- }
- }
- yield $value;
- });
- }
-
- public function testLotsOfTryCatchingDoesNotBlowStack()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $promise = $this->createLotsOfFlappingPromise();
- $promise->then(function ($v) use (&$r) { $r = $v; });
- P\Utils::queue()->run();
- $this->assertSame(999, $r);
- }
-
- public function testLotsOfTryCatchingWaitingDoesNotBlowStack()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $promise = $this->createLotsOfFlappingPromise();
- $promise->then(function ($v) use (&$r) { $r = $v; });
- $this->assertSame(999, $promise->wait());
- $this->assertSame(999, $r);
- }
-
- public function testAsyncPromisesWithCorrectlyYieldedValues()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $promises = [
- new Promise(),
- new Promise(),
- new Promise(),
- ];
-
- eval('
- $promise = \GuzzleHttp\Promise\Coroutine::of(function () use ($promises) {
- $value = null;
- $this->assertSame(\'skip\', (yield new \GuzzleHttp\Promise\FulfilledPromise(\'skip\')));
- foreach ($promises as $idx => $p) {
- $value = (yield $p);
- $this->assertSame($idx, $value);
- $this->assertSame(\'skip\', (yield new \GuzzleHttp\Promise\FulfilledPromise(\'skip\')));
- }
- $this->assertSame(\'skip\', (yield new \GuzzleHttp\Promise\FulfilledPromise(\'skip\')));
- yield $value;
- });
-');
-
- $promises[0]->resolve(0);
- $promises[1]->resolve(1);
- $promises[2]->resolve(2);
-
- $promise->then(function ($v) use (&$r) { $r = $v; });
- P\Utils::queue()->run();
- $this->assertSame(2, $r);
- }
-
- public function testYieldFinalWaitablePromise()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $p1 = new Promise(function () use (&$p1) {
- $p1->resolve('skip me');
- });
- $p2 = new Promise(function () use (&$p2) {
- $p2->resolve('hello!');
- });
- $co = P\Coroutine::of(function () use ($p1, $p2) {
- yield $p1;
- yield $p2;
- });
- P\Utils::queue()->run();
- $this->assertSame('hello!', $co->wait());
- }
-
- public function testCanYieldFinalPendingPromise()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $p1 = new Promise();
- $p2 = new Promise();
- $co = P\Coroutine::of(function () use ($p1, $p2) {
- yield $p1;
- yield $p2;
- });
- $p1->resolve('a');
- $p2->resolve('b');
- $co->then(function ($value) use (&$result) { $result = $value; });
- P\Utils::queue()->run();
- $this->assertSame('b', $result);
- }
-
- public function testCanNestYieldsAndFailures()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $p1 = new Promise();
- $p2 = new Promise();
- $p3 = new Promise();
- $p4 = new Promise();
- $p5 = new Promise();
- $co = P\Coroutine::of(function () use ($p1, $p2, $p3, $p4, $p5) {
- try {
- yield $p1;
- } catch (\Exception $e) {
- yield $p2;
- try {
- yield $p3;
- yield $p4;
- } catch (\Exception $e) {
- yield $p5;
- }
- }
- });
- $p1->reject('a');
- $p2->resolve('b');
- $p3->resolve('c');
- $p4->reject('d');
- $p5->resolve('e');
- $co->then(function ($value) use (&$result) { $result = $value; });
- P\Utils::queue()->run();
- $this->assertSame('e', $result);
- }
-
- public function testCanYieldErrorsAndSuccessesWithoutRecursion()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $promises = [];
- for ($i = 0; $i < 20; $i++) {
- $promises[] = new Promise();
- }
-
- $co = P\Coroutine::of(function () use ($promises) {
- for ($i = 0; $i < 20; $i += 4) {
- try {
- yield $promises[$i];
- yield $promises[$i + 1];
- } catch (\Exception $e) {
- yield $promises[$i + 2];
- yield $promises[$i + 3];
- }
- }
- });
-
- for ($i = 0; $i < 20; $i += 4) {
- $promises[$i]->resolve($i);
- $promises[$i + 1]->reject($i + 1);
- $promises[$i + 2]->resolve($i + 2);
- $promises[$i + 3]->resolve($i + 3);
- }
-
- $co->then(function ($value) use (&$result) { $result = $value; });
- P\Utils::queue()->run();
- $this->assertSame(19, $result);
- }
-
- public function testCanWaitOnPromiseAfterFulfilled()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $f = function () {
- static $i = 0;
- $i++;
- return $p = new Promise(function () use (&$p, $i) {
- $p->resolve($i . '-bar');
- });
- };
-
- $promises = [];
- for ($i = 0; $i < 20; $i++) {
- $promises[] = $f();
- }
-
- $p = P\Coroutine::of(function () use ($promises) {
- yield new FulfilledPromise('foo!');
- foreach ($promises as $promise) {
- yield $promise;
- }
- });
-
- $this->assertSame('20-bar', $p->wait());
- }
-
- public function testCanWaitOnErroredPromises()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $p1 = new Promise(function () use (&$p1) { $p1->reject('a'); });
- $p2 = new Promise(function () use (&$p2) { $p2->resolve('b'); });
- $p3 = new Promise(function () use (&$p3) { $p3->resolve('c'); });
- $p4 = new Promise(function () use (&$p4) { $p4->reject('d'); });
- $p5 = new Promise(function () use (&$p5) { $p5->resolve('e'); });
- $p6 = new Promise(function () use (&$p6) { $p6->reject('f'); });
-
- $co = P\Coroutine::of(function () use ($p1, $p2, $p3, $p4, $p5, $p6) {
- try {
- yield $p1;
- } catch (\Exception $e) {
- yield $p2;
- try {
- yield $p3;
- yield $p4;
- } catch (\Exception $e) {
- yield $p5;
- yield $p6;
- }
- }
- });
-
- $res = P\Utils::inspect($co);
- $this->assertSame('f', $res['reason']);
- }
-
- public function testCoroutineOtherwiseIntegrationTest()
- {
- if (defined('HHVM_VERSION')) {
- $this->markTestIncomplete('Broken on HHVM.');
- }
-
- $a = new Promise();
- $b = new Promise();
- $promise = P\Coroutine::of(function () use ($a, $b) {
- // Execute the pool of commands concurrently, and process errors.
- yield $a;
- yield $b;
- })->otherwise(function (\Exception $e) {
- // Throw errors from the operations as a specific Multipart error.
- throw new \OutOfBoundsException('a', 0, $e);
- });
- $a->resolve('a');
- $b->reject('b');
- $reason = P\Utils::inspect($promise)['reason'];
- $this->assertInstanceOf(\OutOfBoundsException::class, $reason);
- $this->assertInstanceOf(RejectionException::class, $reason->getPrevious());
- }
-
- public function testCanManuallySettleTaskQueueGeneratedPromises()
- {
- $p1 = P\Utils::task(function () { return 'a'; });
- $p2 = P\Utils::task(function () { return 'b'; });
- $p3 = P\Utils::task(function () { return 'c'; });
-
- $p1->cancel();
- $p2->resolve('b2');
-
- $results = P\Utils::inspectAll([$p1, $p2, $p3]);
-
- $this->assertSame([
- ['state' => 'rejected', 'reason' => 'Promise has been cancelled'],
- ['state' => 'fulfilled', 'value' => 'b2'],
- ['state' => 'fulfilled', 'value' => 'c']
- ], $results);
- }
-}
diff --git a/lib/Google/vendor/guzzlehttp/psr7/CHANGELOG.md b/lib/Google/vendor/guzzlehttp/psr7/CHANGELOG.md
index fa716c094..d897feedd 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/CHANGELOG.md
+++ b/lib/Google/vendor/guzzlehttp/psr7/CHANGELOG.md
@@ -5,7 +5,28 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## Unreleased
+## 2.6.1 - 2023-08-27
+
+### Fixed
+
+- Properly handle the fact that PHP transforms numeric strings in array keys to ints
+
+## 2.6.0 - 2023-08-03
+
+### Changed
+
+- Updated the mime type map to add some new entries, fix a couple of invalid entries, and remove an invalid entry
+- Fallback to `application/octet-stream` if we are unable to guess the content type for a multipart file upload
+
+## 2.5.1 - 2023-08-03
+
+### Fixed
+
+- Corrected mime type for `.acc` files to `audio/aac`
+
+### Changed
+
+- PHP 8.3 support
## 2.5.0 - 2023-04-17
diff --git a/lib/Google/vendor/guzzlehttp/psr7/README.md b/lib/Google/vendor/guzzlehttp/psr7/README.md
index 9566a7d47..a64ec9046 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/README.md
+++ b/lib/Google/vendor/guzzlehttp/psr7/README.md
@@ -8,16 +8,24 @@ functionality like query string parsing.

-# Installation
+## Features
+
+This package comes with a number of stream implementations and stream
+decorators.
+
+
+## Installation
```shell
composer require guzzlehttp/psr7
```
-# Stream implementation
+## Version Guidance
-This package comes with a number of stream implementations and stream
-decorators.
+| Version | Status | PHP Version |
+|---------|---------------------|--------------|
+| 1.x | Security fixes only | >=5.4,<8.1 |
+| 2.x | Latest | >=7.2.5,<8.4 |
## AppendStream
@@ -855,14 +863,6 @@ This of course assumes they will be resolved against the same base URI. If this
equivalence or difference of relative references does not mean anything.
-## Version Guidance
-
-| Version | Status | PHP Version |
-|---------|----------------|------------------|
-| 1.x | Security fixes | >=5.4,<8.1 |
-| 2.x | Latest | ^7.2.5 \|\| ^8.0 |
-
-
## Security
If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/psr7/security/policy) for more information.
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/AppendStream.php b/lib/Google/vendor/guzzlehttp/psr7/src/AppendStream.php
index cbcfaee65..ee8f37882 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/AppendStream.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/AppendStream.php
@@ -40,12 +40,14 @@ public function __toString(): string
{
try {
$this->rewind();
+
return $this->getContents();
} catch (\Throwable $e) {
if (\PHP_VERSION_ID >= 70400) {
throw $e;
}
trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
return '';
}
}
@@ -138,9 +140,9 @@ public function getSize(): ?int
public function eof(): bool
{
- return !$this->streams ||
- ($this->current >= count($this->streams) - 1 &&
- $this->streams[$this->current]->eof());
+ return !$this->streams
+ || ($this->current >= count($this->streams) - 1
+ && $this->streams[$this->current]->eof());
}
public function rewind(): void
@@ -167,7 +169,7 @@ public function seek($offset, $whence = SEEK_SET): void
$stream->rewind();
} catch (\Exception $e) {
throw new \RuntimeException('Unable to seek stream '
- . $i . ' of the AppendStream', 0, $e);
+ .$i.' of the AppendStream', 0, $e);
}
}
@@ -197,7 +199,7 @@ public function read($length): string
if ($this->current === $total) {
break;
}
- $this->current++;
+ ++$this->current;
}
$result = $this->streams[$this->current]->read($remaining);
@@ -237,8 +239,6 @@ public function write($string): int
}
/**
- * {@inheritdoc}
- *
* @return mixed
*/
public function getMetadata($key = null)
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/BufferStream.php b/lib/Google/vendor/guzzlehttp/psr7/src/BufferStream.php
index 21be8c0a9..2b0eb77be 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/BufferStream.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/BufferStream.php
@@ -134,8 +134,6 @@ public function write($string): int
}
/**
- * {@inheritdoc}
- *
* @return mixed
*/
public function getMetadata($key = null)
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/FnStream.php b/lib/Google/vendor/guzzlehttp/psr7/src/FnStream.php
index 3a1a9512e..9fdddb9c6 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/FnStream.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/FnStream.php
@@ -18,7 +18,7 @@ final class FnStream implements StreamInterface
private const SLOTS = [
'__toString', 'close', 'detach', 'rewind',
'getSize', 'tell', 'eof', 'isSeekable', 'seek', 'isWritable', 'write',
- 'isReadable', 'read', 'getContents', 'getMetadata'
+ 'isReadable', 'read', 'getContents', 'getMetadata',
];
/** @var array */
@@ -33,7 +33,7 @@ public function __construct(array $methods)
// Create the functions on the class
foreach ($methods as $name => $fn) {
- $this->{'_fn_' . $name} = $fn;
+ $this->{'_fn_'.$name} = $fn;
}
}
@@ -45,7 +45,7 @@ public function __construct(array $methods)
public function __get(string $name): void
{
throw new \BadMethodCallException(str_replace('_fn_', '', $name)
- . '() is not implemented in the FnStream');
+ .'() is not implemented in the FnStream');
}
/**
@@ -99,6 +99,7 @@ public function __toString(): string
throw $e;
}
trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
return '';
}
}
@@ -169,8 +170,6 @@ public function getContents(): string
}
/**
- * {@inheritdoc}
- *
* @return mixed
*/
public function getMetadata($key = null)
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/Header.php b/lib/Google/vendor/guzzlehttp/psr7/src/Header.php
index 4d7005b22..6e38e0031 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/Header.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/Header.php
@@ -89,7 +89,7 @@ public static function splitList($values): array
$v = '';
$isQuoted = false;
$isEscaped = false;
- for ($i = 0, $max = \strlen($value); $i < $max; $i++) {
+ for ($i = 0, $max = \strlen($value); $i < $max; ++$i) {
if ($isEscaped) {
$v .= $value[$i];
$isEscaped = false;
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/HttpFactory.php b/lib/Google/vendor/guzzlehttp/psr7/src/HttpFactory.php
index 30be222fc..73d17e337 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/HttpFactory.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/HttpFactory.php
@@ -23,13 +23,7 @@
* Note: in consuming code it is recommended to require the implemented interfaces
* and inject the instance of this class multiple times.
*/
-final class HttpFactory implements
- RequestFactoryInterface,
- ResponseFactoryInterface,
- ServerRequestFactoryInterface,
- StreamFactoryInterface,
- UploadedFileFactoryInterface,
- UriFactoryInterface
+final class HttpFactory implements RequestFactoryInterface, ResponseFactoryInterface, ServerRequestFactoryInterface, StreamFactoryInterface, UploadedFileFactoryInterface, UriFactoryInterface
{
public function createUploadedFile(
StreamInterface $stream,
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/InflateStream.php b/lib/Google/vendor/guzzlehttp/psr7/src/InflateStream.php
index 8e00f1c32..599b55da3 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/InflateStream.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/InflateStream.php
@@ -13,9 +13,9 @@
* then appends the zlib.inflate filter. The stream is then converted back
* to a Guzzle stream resource to be used as a Guzzle stream.
*
- * @link http://tools.ietf.org/html/rfc1950
- * @link http://tools.ietf.org/html/rfc1952
- * @link http://php.net/manual/en/filters.compression.php
+ * @see http://tools.ietf.org/html/rfc1950
+ * @see http://tools.ietf.org/html/rfc1952
+ * @see http://php.net/manual/en/filters.compression.php
*/
final class InflateStream implements StreamInterface
{
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/Message.php b/lib/Google/vendor/guzzlehttp/psr7/src/Message.php
index c1e15f826..6e6c3e51b 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/Message.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/Message.php
@@ -18,31 +18,31 @@ final class Message
public static function toString(MessageInterface $message): string
{
if ($message instanceof RequestInterface) {
- $msg = trim($message->getMethod() . ' '
- . $message->getRequestTarget())
- . ' HTTP/' . $message->getProtocolVersion();
+ $msg = trim($message->getMethod().' '
+ .$message->getRequestTarget())
+ .' HTTP/'.$message->getProtocolVersion();
if (!$message->hasHeader('host')) {
- $msg .= "\r\nHost: " . $message->getUri()->getHost();
+ $msg .= "\r\nHost: ".$message->getUri()->getHost();
}
} elseif ($message instanceof ResponseInterface) {
- $msg = 'HTTP/' . $message->getProtocolVersion() . ' '
- . $message->getStatusCode() . ' '
- . $message->getReasonPhrase();
+ $msg = 'HTTP/'.$message->getProtocolVersion().' '
+ .$message->getStatusCode().' '
+ .$message->getReasonPhrase();
} else {
throw new \InvalidArgumentException('Unknown message type');
}
foreach ($message->getHeaders() as $name => $values) {
- if (strtolower($name) === 'set-cookie') {
+ if (is_string($name) && strtolower($name) === 'set-cookie') {
foreach ($values as $value) {
- $msg .= "\r\n{$name}: " . $value;
+ $msg .= "\r\n{$name}: ".$value;
}
} else {
- $msg .= "\r\n{$name}: " . implode(', ', $values);
+ $msg .= "\r\n{$name}: ".implode(', ', $values);
}
}
- return "{$msg}\r\n\r\n" . $message->getBody();
+ return "{$msg}\r\n\r\n".$message->getBody();
}
/**
@@ -190,7 +190,7 @@ public static function parseRequestUri(string $path, array $headers): string
$host = $headers[reset($hostKey)][0];
$scheme = substr($host, -4) === ':443' ? 'https' : 'http';
- return $scheme . '://' . $host . '/' . ltrim($path, '/');
+ return $scheme.'://'.$host.'/'.ltrim($path, '/');
}
/**
@@ -231,7 +231,7 @@ public static function parseResponse(string $message): ResponseInterface
// between status-code and reason-phrase is required. But browsers accept
// responses without space and reason as well.
if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
- throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']);
+ throw new \InvalidArgumentException('Invalid response string: '.$data['start-line']);
}
$parts = explode(' ', $data['start-line'], 3);
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/MessageTrait.php b/lib/Google/vendor/guzzlehttp/psr7/src/MessageTrait.php
index 464bdfaa4..e05ebea88 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/MessageTrait.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/MessageTrait.php
@@ -12,11 +12,11 @@
*/
trait MessageTrait
{
- /** @var array Map of all registered headers, as original name => array of values */
+ /** @var string[][] Map of all registered headers, as original name => array of values */
private $headers = [];
- /** @var array Map of lowercase header name => original name at registration */
- private $headerNames = [];
+ /** @var string[] Map of lowercase header name => original name at registration */
+ private $headerNames = [];
/** @var string */
private $protocol = '1.1';
@@ -37,6 +37,7 @@ public function withProtocolVersion($version): MessageInterface
$new = clone $this;
$new->protocol = $version;
+
return $new;
}
@@ -135,6 +136,7 @@ public function withBody(StreamInterface $body): MessageInterface
$new = clone $this;
$new->stream = $body;
+
return $new;
}
@@ -224,7 +226,7 @@ private function assertHeader($header): void
));
}
- if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) {
+ if (!preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) {
throw new \InvalidArgumentException(
sprintf('"%s" is not valid header name.', $header)
);
@@ -254,7 +256,7 @@ private function assertValue(string $value): void
// Clients must not send a request with line folding and a server sending folded headers is
// likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting
// folding is not likely to break any legitimate use case.
- if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) {
+ if (!preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) {
throw new \InvalidArgumentException(
sprintf('"%s" is not valid header value.', $value)
);
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/MimeType.php b/lib/Google/vendor/guzzlehttp/psr7/src/MimeType.php
index 0debbd18c..b131bdbe7 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/MimeType.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/MimeType.php
@@ -18,7 +18,7 @@ final class MimeType
'7zip' => 'application/x-7z-compressed',
'123' => 'application/vnd.lotus-1-2-3',
'aab' => 'application/x-authorware-bin',
- 'aac' => 'audio/x-acc',
+ 'aac' => 'audio/aac',
'aam' => 'application/x-authorware-map',
'aas' => 'application/x-authorware-seg',
'abw' => 'application/x-abiword',
@@ -29,6 +29,7 @@ final class MimeType
'acu' => 'application/vnd.acucobol',
'acutc' => 'application/vnd.acucorp',
'adp' => 'audio/adpcm',
+ 'adts' => 'audio/aac',
'aep' => 'application/vnd.audiograph',
'afm' => 'application/x-font-type1',
'afp' => 'application/vnd.ibm.modcap',
@@ -41,11 +42,16 @@ final class MimeType
'air' => 'application/vnd.adobe.air-application-installer-package+zip',
'ait' => 'application/vnd.dvb.ait',
'ami' => 'application/vnd.amiga.ami',
+ 'aml' => 'application/automationml-aml+xml',
+ 'amlx' => 'application/automationml-amlx+zip',
'amr' => 'audio/amr',
'apk' => 'application/vnd.android.package-archive',
'apng' => 'image/apng',
'appcache' => 'text/cache-manifest',
+ 'appinstaller' => 'application/appinstaller',
'application' => 'application/x-ms-application',
+ 'appx' => 'application/appx',
+ 'appxbundle' => 'application/appxbundle',
'apr' => 'application/vnd.lotus-approach',
'arc' => 'application/x-freearc',
'arj' => 'application/x-arj',
@@ -90,6 +96,7 @@ final class MimeType
'bpk' => 'application/octet-stream',
'bpmn' => 'application/octet-stream',
'bsp' => 'model/vnd.valve.source.compiled-map',
+ 'btf' => 'image/prs.btif',
'btif' => 'image/prs.btif',
'buffer' => 'application/octet-stream',
'bz' => 'application/x-bzip',
@@ -141,6 +148,7 @@ final class MimeType
'cjs' => 'application/node',
'cla' => 'application/vnd.claymore',
'class' => 'application/octet-stream',
+ 'cld' => 'model/vnd.cld',
'clkk' => 'application/vnd.crick.clicker.keyboard',
'clkp' => 'application/vnd.crick.clicker.palette',
'clkt' => 'application/vnd.crick.clicker.template',
@@ -175,6 +183,7 @@ final class MimeType
'csv' => 'text/csv',
'cu' => 'application/cu-seeme',
'curl' => 'text/vnd.curl',
+ 'cwl' => 'application/cwl',
'cww' => 'application/prs.cww',
'cxt' => 'application/x-director',
'cxx' => 'text/x-c',
@@ -197,6 +206,7 @@ final class MimeType
'der' => 'application/x-x509-ca-cert',
'dfac' => 'application/vnd.dreamfactory',
'dgc' => 'application/x-dgc-compressed',
+ 'dib' => 'image/bmp',
'dic' => 'text/x-c',
'dir' => 'application/x-director',
'dis' => 'application/vnd.mobius.dis',
@@ -219,6 +229,7 @@ final class MimeType
'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
'dp' => 'application/vnd.osgi.dp',
'dpg' => 'application/vnd.dpgraph',
+ 'dpx' => 'image/dpx',
'dra' => 'audio/vnd.dra',
'drle' => 'image/dicom-rle',
'dsc' => 'text/prs.lines.tag',
@@ -255,7 +266,6 @@ final class MimeType
'eot' => 'application/vnd.ms-fontobject',
'eps' => 'application/postscript',
'epub' => 'application/epub+zip',
- 'es' => 'application/ecmascript',
'es3' => 'application/vnd.eszigno3+xml',
'esa' => 'application/vnd.osgi.subsystem',
'esf' => 'application/vnd.epson.esf',
@@ -448,6 +458,7 @@ final class MimeType
'jsonld' => 'application/ld+json',
'jsonml' => 'application/jsonml+json',
'jsx' => 'text/jsx',
+ 'jt' => 'model/jt',
'jxr' => 'image/jxr',
'jxra' => 'image/jxra',
'jxrs' => 'image/jxrs',
@@ -552,7 +563,7 @@ final class MimeType
'mime' => 'message/rfc822',
'mj2' => 'video/mj2',
'mjp2' => 'video/mj2',
- 'mjs' => 'application/javascript',
+ 'mjs' => 'text/javascript',
'mk3d' => 'video/x-matroska',
'mka' => 'audio/x-matroska',
'mkd' => 'text/x-markdown',
@@ -602,6 +613,8 @@ final class MimeType
'msg' => 'application/vnd.ms-outlook',
'msh' => 'model/mesh',
'msi' => 'application/x-msdownload',
+ 'msix' => 'application/msix',
+ 'msixbundle' => 'application/msixbundle',
'msl' => 'application/vnd.mobius.msl',
'msm' => 'application/octet-stream',
'msp' => 'application/octet-stream',
@@ -775,6 +788,8 @@ final class MimeType
'pvb' => 'application/vnd.3gpp.pic-bw-var',
'pwn' => 'application/vnd.3m.post-it-notes',
'pya' => 'audio/vnd.ms-playready.media.pya',
+ 'pyo' => 'model/vnd.pytha.pyox',
+ 'pyox' => 'model/vnd.pytha.pyox',
'pyv' => 'video/vnd.ms-playready.media.pyv',
'qam' => 'application/vnd.epson.quickanime',
'qbo' => 'application/vnd.intu.qbo',
@@ -923,10 +938,12 @@ final class MimeType
'st' => 'application/vnd.sailingtracker.track',
'stc' => 'application/vnd.sun.xml.calc.template',
'std' => 'application/vnd.sun.xml.draw.template',
+ 'step' => 'application/STEP',
'stf' => 'application/vnd.wt.stf',
'sti' => 'application/vnd.sun.xml.impress.template',
'stk' => 'application/hyperstudio',
'stl' => 'model/stl',
+ 'stp' => 'application/STEP',
'stpx' => 'model/step+xml',
'stpxz' => 'model/step-xml+zip',
'stpz' => 'model/step+zip',
@@ -1013,10 +1030,12 @@ final class MimeType
'ulx' => 'application/x-glulx',
'umj' => 'application/vnd.umajin',
'unityweb' => 'application/vnd.unity',
+ 'uo' => 'application/vnd.uoml+xml',
'uoml' => 'application/vnd.uoml+xml',
'uri' => 'text/uri-list',
'uris' => 'text/uri-list',
'urls' => 'text/uri-list',
+ 'usda' => 'model/vnd.usda',
'usdz' => 'model/vnd.usdz+zip',
'ustar' => 'application/x-ustar',
'utz' => 'application/vnd.uiq.theme',
@@ -1096,6 +1115,7 @@ final class MimeType
'webmanifest' => 'application/manifest+json',
'webp' => 'image/webp',
'wg' => 'application/vnd.pmi.widget',
+ 'wgsl' => 'text/wgsl',
'wgt' => 'application/widget',
'wif' => 'application/watcherinfo+xml',
'wks' => 'application/vnd.ms-works',
@@ -1150,9 +1170,10 @@ final class MimeType
'xel' => 'application/xcap-el+xml',
'xenc' => 'application/xenc+xml',
'xer' => 'application/patch-ops-error+xml',
- 'xfdf' => 'application/vnd.adobe.xfdf',
+ 'xfdf' => 'application/xfdf',
'xfdl' => 'application/vnd.xfdl',
'xht' => 'application/xhtml+xml',
+ 'xhtm' => 'application/vnd.pwg-xhtml-print+xml',
'xhtml' => 'application/xhtml+xml',
'xhvml' => 'application/xv+xml',
'xif' => 'image/vnd.xiff',
@@ -1183,6 +1204,7 @@ final class MimeType
'xpw' => 'application/vnd.intercon.formnet',
'xpx' => 'application/vnd.intercon.formnet',
'xsd' => 'application/xml',
+ 'xsf' => 'application/prs.xsf+xml',
'xsl' => 'application/xml',
'xslt' => 'application/xslt+xml',
'xsm' => 'application/vnd.syncml+xml',
@@ -1218,7 +1240,7 @@ final class MimeType
/**
* Determines the mimetype of a file by looking at its extension.
*
- * @link https://raw.githubusercontent.com/jshttp/mime-db/master/db.json
+ * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json
*/
public static function fromFilename(string $filename): ?string
{
@@ -1228,7 +1250,7 @@ public static function fromFilename(string $filename): ?string
/**
* Maps a file extensions to a mimetype.
*
- * @link https://raw.githubusercontent.com/jshttp/mime-db/master/db.json
+ * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json
*/
public static function fromExtension(string $extension): ?string
{
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/MultipartStream.php b/lib/Google/vendor/guzzlehttp/psr7/src/MultipartStream.php
index 3e12b74d1..41c48eef8 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/MultipartStream.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/MultipartStream.php
@@ -60,7 +60,7 @@ private function getHeaders(array $headers): string
$str .= "{$key}: {$value}\r\n";
}
- return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n";
+ return "--{$this->boundary}\r\n".trim($str)."\r\n\r\n";
}
/**
@@ -72,7 +72,7 @@ protected function createStream(array $elements = []): StreamInterface
foreach ($elements as $element) {
if (!is_array($element)) {
- throw new \UnexpectedValueException("An array is expected");
+ throw new \UnexpectedValueException('An array is expected');
}
$this->addElement($stream, $element);
}
@@ -137,9 +137,7 @@ private function createElement(string $name, StreamInterface $stream, ?string $f
// Set a default Content-Type if one was not supplied
$type = $this->getHeader($headers, 'content-type');
if (!$type && ($filename === '0' || $filename)) {
- if ($type = MimeType::fromFilename($filename)) {
- $headers['Content-Type'] = $type;
- }
+ $headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream';
}
return [$stream, $headers];
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/PumpStream.php b/lib/Google/vendor/guzzlehttp/psr7/src/PumpStream.php
index e90389c3b..5585190cf 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/PumpStream.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/PumpStream.php
@@ -34,7 +34,7 @@ final class PumpStream implements StreamInterface
private $buffer;
/**
- * @param callable(int): (string|null|false) $source Source of the stream data. The callable MAY
+ * @param callable(int): (string|false|null) $source Source of the stream data. The callable MAY
* accept an integer argument used to control the
* amount of data to return. The callable MUST
* return a string when called, or false|null on error
@@ -60,6 +60,7 @@ public function __toString(): string
throw $e;
}
trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
return '';
}
}
@@ -149,8 +150,6 @@ public function getContents(): string
}
/**
- * {@inheritdoc}
- *
* @return mixed
*/
public function getMetadata($key = null)
@@ -169,6 +168,7 @@ private function pump(int $length): void
$data = call_user_func($this->source, $length);
if ($data === false || $data === null) {
$this->source = null;
+
return;
}
$this->buffer->write($data);
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/Query.php b/lib/Google/vendor/guzzlehttp/psr7/src/Query.php
index 2faab3a88..8b9492797 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/Query.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/Query.php
@@ -93,7 +93,7 @@ public static function build(array $params, $encoding = PHP_QUERY_RFC3986): stri
$qs .= $k;
$v = is_bool($v) ? (int) $v : $v;
if ($v !== null) {
- $qs .= '=' . $encoder((string) $v);
+ $qs .= '='.$encoder((string) $v);
}
$qs .= '&';
} else {
@@ -101,7 +101,7 @@ public static function build(array $params, $encoding = PHP_QUERY_RFC3986): stri
$qs .= $k;
$vv = is_bool($vv) ? (int) $vv : $vv;
if ($vv !== null) {
- $qs .= '=' . $encoder((string) $vv);
+ $qs .= '='.$encoder((string) $vv);
}
$qs .= '&';
}
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/Request.php b/lib/Google/vendor/guzzlehttp/psr7/src/Request.php
index b17af66a2..db29d95d3 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/Request.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/Request.php
@@ -69,7 +69,7 @@ public function getRequestTarget(): string
$target = '/';
}
if ($this->uri->getQuery() != '') {
- $target .= '?' . $this->uri->getQuery();
+ $target .= '?'.$this->uri->getQuery();
}
return $target;
@@ -85,6 +85,7 @@ public function withRequestTarget($requestTarget): RequestInterface
$new = clone $this;
$new->requestTarget = $requestTarget;
+
return $new;
}
@@ -98,6 +99,7 @@ public function withMethod($method): RequestInterface
$this->assertMethod($method);
$new = clone $this;
$new->method = strtoupper($method);
+
return $new;
}
@@ -131,7 +133,7 @@ private function updateHostFromUri(): void
}
if (($port = $this->uri->getPort()) !== null) {
- $host .= ':' . $port;
+ $host .= ':'.$port;
}
if (isset($this->headerNames['host'])) {
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/Response.php b/lib/Google/vendor/guzzlehttp/psr7/src/Response.php
index 4c6ee6f03..8fc11478b 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/Response.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/Response.php
@@ -138,6 +138,7 @@ public function withStatus($code, $reasonPhrase = ''): ResponseInterface
$reasonPhrase = self::PHRASES[$new->statusCode];
}
$new->reasonPhrase = (string) $reasonPhrase;
+
return $new;
}
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/Rfc7230.php b/lib/Google/vendor/guzzlehttp/psr7/src/Rfc7230.php
index 30224018d..8219dba4d 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/Rfc7230.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/Rfc7230.php
@@ -14,7 +14,7 @@ final class Rfc7230
*
* Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons.
*
- * @link https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15
+ * @see https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15
*
* @license https://github.com/amphp/http/blob/v1.0.1/LICENSE
*/
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/ServerRequest.php b/lib/Google/vendor/guzzlehttp/psr7/src/ServerRequest.php
index b2aa382da..c852d96f5 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/ServerRequest.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/ServerRequest.php
@@ -144,10 +144,10 @@ private static function normalizeNestedFileSpec(array $files = []): array
foreach (array_keys($files['tmp_name']) as $key) {
$spec = [
'tmp_name' => $files['tmp_name'][$key],
- 'size' => $files['size'][$key] ?? null,
- 'error' => $files['error'][$key] ?? null,
- 'name' => $files['name'][$key] ?? null,
- 'type' => $files['type'][$key] ?? null,
+ 'size' => $files['size'][$key] ?? null,
+ 'error' => $files['error'][$key] ?? null,
+ 'name' => $files['name'][$key] ?? null,
+ 'type' => $files['type'][$key] ?? null,
];
$normalizedFiles[$key] = self::createUploadedFileFromSpec($spec);
}
@@ -182,7 +182,7 @@ public static function fromGlobals(): ServerRequestInterface
private static function extractHostAndPortFromAuthority(string $authority): array
{
- $uri = 'http://' . $authority;
+ $uri = 'http://'.$authority;
$parts = parse_url($uri);
if (false === $parts) {
return [null, null];
@@ -286,8 +286,6 @@ public function withQueryParams(array $query): ServerRequestInterface
}
/**
- * {@inheritdoc}
- *
* @return array|object|null
*/
public function getParsedBody()
@@ -309,8 +307,6 @@ public function getAttributes(): array
}
/**
- * {@inheritdoc}
- *
* @return mixed
*/
public function getAttribute($attribute, $default = null)
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/Stream.php b/lib/Google/vendor/guzzlehttp/psr7/src/Stream.php
index ecd31861e..f730ddacf 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/Stream.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/Stream.php
@@ -61,8 +61,8 @@ public function __construct($stream, array $options = [])
$this->stream = $stream;
$meta = stream_get_meta_data($this->stream);
$this->seekable = $meta['seekable'];
- $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']);
- $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']);
+ $this->readable = (bool) preg_match(self::READABLE_MODES, $meta['mode']);
+ $this->writable = (bool) preg_match(self::WRITABLE_MODES, $meta['mode']);
$this->uri = $this->getMetadata('uri');
}
@@ -80,12 +80,14 @@ public function __toString(): string
if ($this->isSeekable()) {
$this->seek(0);
}
+
return $this->getContents();
} catch (\Throwable $e) {
if (\PHP_VERSION_ID >= 70400) {
throw $e;
}
trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
return '';
}
}
@@ -145,6 +147,7 @@ public function getSize(): ?int
$stats = fstat($this->stream);
if (is_array($stats) && isset($stats['size'])) {
$this->size = $stats['size'];
+
return $this->size;
}
@@ -207,7 +210,7 @@ public function seek($offset, $whence = SEEK_SET): void
}
if (fseek($this->stream, $offset, $whence) === -1) {
throw new \RuntimeException('Unable to seek to stream position '
- . $offset . ' with whence ' . var_export($whence, true));
+ .$offset.' with whence '.var_export($whence, true));
}
}
@@ -261,8 +264,6 @@ public function write($string): int
}
/**
- * {@inheritdoc}
- *
* @return mixed
*/
public function getMetadata($key = null)
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/lib/Google/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
index 56d4104d4..96196a3ea 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
@@ -31,6 +31,7 @@ public function __get(string $name)
{
if ($name === 'stream') {
$this->stream = $this->createStream();
+
return $this->stream;
}
@@ -43,12 +44,14 @@ public function __toString(): string
if ($this->isSeekable()) {
$this->seek(0);
}
+
return $this->getContents();
} catch (\Throwable $e) {
if (\PHP_VERSION_ID >= 70400) {
throw $e;
}
trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR);
+
return '';
}
}
@@ -79,8 +82,6 @@ public function close(): void
}
/**
- * {@inheritdoc}
- *
* @return mixed
*/
public function getMetadata($key = null)
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/lib/Google/vendor/guzzlehttp/psr7/src/StreamWrapper.php
index 2a9346403..b3655cb3a 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/StreamWrapper.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/StreamWrapper.php
@@ -41,7 +41,7 @@ public static function getResource(StreamInterface $stream)
$mode = 'w';
} else {
throw new \InvalidArgumentException('The stream must be readable, '
- . 'writable, or both.');
+ .'writable, or both.');
}
return fopen('guzzle://stream', $mode, false, self::createStreamContext($stream));
@@ -55,7 +55,7 @@ public static function getResource(StreamInterface $stream)
public static function createStreamContext(StreamInterface $stream)
{
return stream_context_create([
- 'guzzle' => ['stream' => $stream]
+ 'guzzle' => ['stream' => $stream],
]);
}
@@ -115,7 +115,7 @@ public function stream_seek(int $offset, int $whence): bool
*/
public function stream_cast(int $cast_as)
{
- $stream = clone($this->stream);
+ $stream = clone $this->stream;
$resource = $stream->detach();
return $resource ?? false;
@@ -127,27 +127,27 @@ public function stream_cast(int $cast_as)
public function stream_stat(): array
{
static $modeMap = [
- 'r' => 33060,
+ 'r' => 33060,
'rb' => 33060,
'r+' => 33206,
- 'w' => 33188,
- 'wb' => 33188
+ 'w' => 33188,
+ 'wb' => 33188,
];
return [
- 'dev' => 0,
- 'ino' => 0,
- 'mode' => $modeMap[$this->mode],
- 'nlink' => 0,
- 'uid' => 0,
- 'gid' => 0,
- 'rdev' => 0,
- 'size' => $this->stream->getSize() ?: 0,
- 'atime' => 0,
- 'mtime' => 0,
- 'ctime' => 0,
+ 'dev' => 0,
+ 'ino' => 0,
+ 'mode' => $modeMap[$this->mode],
+ 'nlink' => 0,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'rdev' => 0,
+ 'size' => $this->stream->getSize() ?: 0,
+ 'atime' => 0,
+ 'mtime' => 0,
+ 'ctime' => 0,
'blksize' => 0,
- 'blocks' => 0
+ 'blocks' => 0,
];
}
@@ -157,19 +157,19 @@ public function stream_stat(): array
public function url_stat(string $path, int $flags): array
{
return [
- 'dev' => 0,
- 'ino' => 0,
- 'mode' => 0,
- 'nlink' => 0,
- 'uid' => 0,
- 'gid' => 0,
- 'rdev' => 0,
- 'size' => 0,
- 'atime' => 0,
- 'mtime' => 0,
- 'ctime' => 0,
+ 'dev' => 0,
+ 'ino' => 0,
+ 'mode' => 0,
+ 'nlink' => 0,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'rdev' => 0,
+ 'size' => 0,
+ 'atime' => 0,
+ 'mtime' => 0,
+ 'ctime' => 0,
'blksize' => 0,
- 'blocks' => 0
+ 'blocks' => 0,
];
}
}
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/Uri.php b/lib/Google/vendor/guzzlehttp/psr7/src/Uri.php
index 09e878d3d..fbba7f123 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/Uri.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/Uri.php
@@ -25,7 +25,7 @@ class Uri implements UriInterface, \JsonSerializable
private const HTTP_DEFAULT_HOST = 'localhost';
private const DEFAULT_PORTS = [
- 'http' => 80,
+ 'http' => 80,
'https' => 443,
'ftp' => 21,
'gopher' => 70,
@@ -41,14 +41,14 @@ class Uri implements UriInterface, \JsonSerializable
/**
* Unreserved characters for use in a regex.
*
- * @link https://tools.ietf.org/html/rfc3986#section-2.3
+ * @see https://tools.ietf.org/html/rfc3986#section-2.3
*/
private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~';
/**
* Sub-delims for use in a regex.
*
- * @link https://tools.ietf.org/html/rfc3986#section-2.2
+ * @see https://tools.ietf.org/html/rfc3986#section-2.2
*/
private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;=';
private const QUERY_SEPARATORS_REPLACEMENT = ['=' => '%3D', '&' => '%26'];
@@ -87,6 +87,7 @@ public function __construct(string $uri = '')
$this->applyParts($parts);
}
}
+
/**
* UTF-8 aware \parse_url() replacement.
*
@@ -121,7 +122,7 @@ static function ($matches) {
$url
);
- $result = parse_url($prefix . $encodedUrl);
+ $result = parse_url($prefix.$encodedUrl);
if ($result === false) {
return false;
@@ -161,7 +162,7 @@ public function __toString(): string
* `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to
* that format).
*
- * @link https://tools.ietf.org/html/rfc3986#section-5.3
+ * @see https://tools.ietf.org/html/rfc3986#section-5.3
*/
public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment): string
{
@@ -169,25 +170,25 @@ public static function composeComponents(?string $scheme, ?string $authority, st
// weak type checks to also accept null until we can add scalar type hints
if ($scheme != '') {
- $uri .= $scheme . ':';
+ $uri .= $scheme.':';
}
if ($authority != '' || $scheme === 'file') {
- $uri .= '//' . $authority;
+ $uri .= '//'.$authority;
}
if ($authority != '' && $path != '' && $path[0] != '/') {
- $path = '/' . $path;
+ $path = '/'.$path;
}
$uri .= $path;
if ($query != '') {
- $uri .= '?' . $query;
+ $uri .= '?'.$query;
}
if ($fragment != '') {
- $uri .= '#' . $fragment;
+ $uri .= '#'.$fragment;
}
return $uri;
@@ -218,7 +219,7 @@ public static function isDefaultPort(UriInterface $uri): bool
* @see Uri::isNetworkPathReference
* @see Uri::isAbsolutePathReference
* @see Uri::isRelativePathReference
- * @link https://tools.ietf.org/html/rfc3986#section-4
+ * @see https://tools.ietf.org/html/rfc3986#section-4
*/
public static function isAbsolute(UriInterface $uri): bool
{
@@ -230,7 +231,7 @@ public static function isAbsolute(UriInterface $uri): bool
*
* A relative reference that begins with two slash characters is termed an network-path reference.
*
- * @link https://tools.ietf.org/html/rfc3986#section-4.2
+ * @see https://tools.ietf.org/html/rfc3986#section-4.2
*/
public static function isNetworkPathReference(UriInterface $uri): bool
{
@@ -242,7 +243,7 @@ public static function isNetworkPathReference(UriInterface $uri): bool
*
* A relative reference that begins with a single slash character is termed an absolute-path reference.
*
- * @link https://tools.ietf.org/html/rfc3986#section-4.2
+ * @see https://tools.ietf.org/html/rfc3986#section-4.2
*/
public static function isAbsolutePathReference(UriInterface $uri): bool
{
@@ -257,7 +258,7 @@ public static function isAbsolutePathReference(UriInterface $uri): bool
*
* A relative reference that does not begin with a slash character is termed a relative-path reference.
*
- * @link https://tools.ietf.org/html/rfc3986#section-4.2
+ * @see https://tools.ietf.org/html/rfc3986#section-4.2
*/
public static function isRelativePathReference(UriInterface $uri): bool
{
@@ -276,7 +277,7 @@ public static function isRelativePathReference(UriInterface $uri): bool
* @param UriInterface $uri The URI to check
* @param UriInterface|null $base An optional base URI to compare against
*
- * @link https://tools.ietf.org/html/rfc3986#section-4.4
+ * @see https://tools.ietf.org/html/rfc3986#section-4.4
*/
public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool
{
@@ -352,7 +353,7 @@ public static function withQueryValues(UriInterface $uri, array $keyValueArray):
/**
* Creates a URI from a hash of `parse_url` components.
*
- * @link http://php.net/manual/en/function.parse-url.php
+ * @see http://php.net/manual/en/function.parse-url.php
*
* @throws MalformedUriException If the components do not form a valid URI.
*/
@@ -374,11 +375,11 @@ public function getAuthority(): string
{
$authority = $this->host;
if ($this->userInfo !== '') {
- $authority = $this->userInfo . '@' . $authority;
+ $authority = $this->userInfo.'@'.$authority;
}
if ($this->port !== null) {
- $authority .= ':' . $this->port;
+ $authority .= ':'.$this->port;
}
return $authority;
@@ -435,7 +436,7 @@ public function withUserInfo($user, $password = null): UriInterface
{
$info = $this->filterUserInfoComponent($user);
if ($password !== null) {
- $info .= ':' . $this->filterUserInfoComponent($password);
+ $info .= ':'.$this->filterUserInfoComponent($password);
}
if ($this->userInfo === $info) {
@@ -563,7 +564,7 @@ private function applyParts(array $parts): void
? $this->filterQueryAndFragment($parts['fragment'])
: '';
if (isset($parts['pass'])) {
- $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']);
+ $this->userInfo .= ':'.$this->filterUserInfoComponent($parts['pass']);
}
$this->removeDefaultPort();
@@ -595,7 +596,7 @@ private function filterUserInfoComponent($component): string
}
return preg_replace_callback(
- '/(?:[^%' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . ']+|%(?![A-Fa-f0-9]{2}))/',
+ '/(?:[^%'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.']+|%(?![A-Fa-f0-9]{2}))/',
[$this, 'rawurlencodeMatchZero'],
$component
);
@@ -627,7 +628,7 @@ private function filterPort($port): ?int
}
$port = (int) $port;
- if (0 > $port || 0xffff < $port) {
+ if (0 > $port || 0xFFFF < $port) {
throw new \InvalidArgumentException(
sprintf('Invalid port: %d. Must be between 0 and 65535', $port)
);
@@ -664,7 +665,7 @@ private static function generateQueryString(string $key, ?string $value): string
$queryString = strtr($key, self::QUERY_SEPARATORS_REPLACEMENT);
if ($value !== null) {
- $queryString .= '=' . strtr($value, self::QUERY_SEPARATORS_REPLACEMENT);
+ $queryString .= '='.strtr($value, self::QUERY_SEPARATORS_REPLACEMENT);
}
return $queryString;
@@ -691,7 +692,7 @@ private function filterPath($path): string
}
return preg_replace_callback(
- '/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/',
+ '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/]++|%(?![A-Fa-f0-9]{2}))/',
[$this, 'rawurlencodeMatchZero'],
$path
);
@@ -711,7 +712,7 @@ private function filterQueryAndFragment($str): string
}
return preg_replace_callback(
- '/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/',
+ '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/',
[$this, 'rawurlencodeMatchZero'],
$str
);
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/lib/Google/vendor/guzzlehttp/psr7/src/UriNormalizer.php
index e12971edd..cd4c383aa 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/UriNormalizer.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/UriNormalizer.php
@@ -11,7 +11,7 @@
*
* @author Tobias Schultze
*
- * @link https://tools.ietf.org/html/rfc3986#section-6
+ * @see https://tools.ietf.org/html/rfc3986#section-6
*/
final class UriNormalizer
{
@@ -119,7 +119,7 @@ final class UriNormalizer
* @param UriInterface $uri The URI to normalize
* @param int $flags A bitmask of normalizations to apply, see constants
*
- * @link https://tools.ietf.org/html/rfc3986#section-6.2
+ * @see https://tools.ietf.org/html/rfc3986#section-6.2
*/
public static function normalize(UriInterface $uri, int $flags = self::PRESERVING_NORMALIZATIONS): UriInterface
{
@@ -131,8 +131,8 @@ public static function normalize(UriInterface $uri, int $flags = self::PRESERVIN
$uri = self::decodeUnreservedCharacters($uri);
}
- if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === '' &&
- ($uri->getScheme() === 'http' || $uri->getScheme() === 'https')
+ if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === ''
+ && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https')
) {
$uri = $uri->withPath('/');
}
@@ -174,7 +174,7 @@ public static function normalize(UriInterface $uri, int $flags = self::PRESERVIN
* @param UriInterface $uri2 An URI to compare
* @param int $normalizations A bitmask of normalizations to apply, see constants
*
- * @link https://tools.ietf.org/html/rfc3986#section-6.1
+ * @see https://tools.ietf.org/html/rfc3986#section-6.1
*/
public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS): bool
{
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/UriResolver.php b/lib/Google/vendor/guzzlehttp/psr7/src/UriResolver.php
index 426e5c9ad..38d5793c7 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/UriResolver.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/UriResolver.php
@@ -11,14 +11,14 @@
*
* @author Tobias Schultze
*
- * @link https://tools.ietf.org/html/rfc3986#section-5
+ * @see https://tools.ietf.org/html/rfc3986#section-5
*/
final class UriResolver
{
/**
* Removes dot segments from a path and returns the new path.
*
- * @link http://tools.ietf.org/html/rfc3986#section-5.2.4
+ * @see http://tools.ietf.org/html/rfc3986#section-5.2.4
*/
public static function removeDotSegments(string $path): string
{
@@ -40,7 +40,7 @@ public static function removeDotSegments(string $path): string
if ($path[0] === '/' && (!isset($newPath[0]) || $newPath[0] !== '/')) {
// Re-add the leading slash if necessary for cases like "/.."
- $newPath = '/' . $newPath;
+ $newPath = '/'.$newPath;
} elseif ($newPath !== '' && ($segment === '.' || $segment === '..')) {
// Add the trailing slash if necessary
// If newPath is not empty, then $segment must be set and is the last segment from the foreach
@@ -53,7 +53,7 @@ public static function removeDotSegments(string $path): string
/**
* Converts the relative URI into a new URI that is resolved against the base URI.
*
- * @link http://tools.ietf.org/html/rfc3986#section-5.2
+ * @see http://tools.ietf.org/html/rfc3986#section-5.2
*/
public static function resolve(UriInterface $base, UriInterface $rel): UriInterface
{
@@ -80,13 +80,13 @@ public static function resolve(UriInterface $base, UriInterface $rel): UriInterf
$targetPath = $rel->getPath();
} else {
if ($targetAuthority != '' && $base->getPath() === '') {
- $targetPath = '/' . $rel->getPath();
+ $targetPath = '/'.$rel->getPath();
} else {
$lastSlashPos = strrpos($base->getPath(), '/');
if ($lastSlashPos === false) {
$targetPath = $rel->getPath();
} else {
- $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath();
+ $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1).$rel->getPath();
}
}
}
@@ -127,8 +127,8 @@ public static function resolve(UriInterface $base, UriInterface $rel): UriInterf
*/
public static function relativize(UriInterface $base, UriInterface $target): UriInterface
{
- if ($target->getScheme() !== '' &&
- ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '')
+ if ($target->getScheme() !== ''
+ && ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '')
) {
return $target;
}
@@ -185,7 +185,7 @@ private static function getRelativePath(UriInterface $base, UriInterface $target
}
}
$targetSegments[] = $targetLastSegment;
- $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments);
+ $relativePath = str_repeat('../', count($sourceSegments)).implode('/', $targetSegments);
// A reference to am empty last segment or an empty first sub-segment must be prefixed with "./".
// This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used
diff --git a/lib/Google/vendor/guzzlehttp/psr7/src/Utils.php b/lib/Google/vendor/guzzlehttp/psr7/src/Utils.php
index 3a4cf3946..917c05e30 100644
--- a/lib/Google/vendor/guzzlehttp/psr7/src/Utils.php
+++ b/lib/Google/vendor/guzzlehttp/psr7/src/Utils.php
@@ -90,6 +90,7 @@ public static function copyToString(StreamInterface $stream, int $maxLen = -1):
}
$buffer .= $buf;
}
+
return $buffer;
}
@@ -174,7 +175,7 @@ public static function modifyRequest(RequestInterface $request, array $changes):
$standardPorts = ['http' => 80, 'https' => 443];
$scheme = $changes['uri']->getScheme();
if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
- $changes['set_headers']['Host'] .= ':' . $port;
+ $changes['set_headers']['Host'] .= ':'.$port;
}
}
}
@@ -230,7 +231,7 @@ public static function modifyRequest(RequestInterface $request, array $changes):
* @param StreamInterface $stream Stream to read from
* @param int|null $maxLength Maximum buffer length
*/
- public static function readLine(StreamInterface $stream, ?int $maxLength = null): string
+ public static function readLine(StreamInterface $stream, int $maxLength = null): string
{
$buffer = '';
$size = 0;
@@ -291,6 +292,7 @@ public static function streamFor($resource = '', array $options = []): StreamInt
fwrite($stream, (string) $resource);
fseek($stream, 0);
}
+
return new Stream($stream, $options);
}
@@ -308,6 +310,7 @@ public static function streamFor($resource = '', array $options = []): StreamInt
fseek($stream, 0);
$resource = $stream;
}
+
return new Stream($resource, $options);
case 'object':
/** @var object $resource */
@@ -320,6 +323,7 @@ public static function streamFor($resource = '', array $options = []): StreamInt
}
$result = $resource->current();
$resource->next();
+
return $result;
}, $options);
} elseif (method_exists($resource, '__toString')) {
@@ -334,7 +338,7 @@ public static function streamFor($resource = '', array $options = []): StreamInt
return new PumpStream($resource, $options);
}
- throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource));
+ throw new \InvalidArgumentException('Invalid resource type: '.gettype($resource));
}
/**
diff --git a/lib/Google/vendor/monolog/monolog/CHANGELOG.md b/lib/Google/vendor/monolog/monolog/CHANGELOG.md
index 8a8c65124..aca1bdd0d 100644
--- a/lib/Google/vendor/monolog/monolog/CHANGELOG.md
+++ b/lib/Google/vendor/monolog/monolog/CHANGELOG.md
@@ -1,3 +1,9 @@
+### 2.9.2 (2023-10-27)
+
+ * Fixed display_errors parsing in ErrorHandler which did not support string values (#1804)
+ * Fixed bug where the previous error handler would not be restored in some cases where StreamHandler fails (#1815)
+ * Fixed normalization error when normalizing incomplete classes (#1833)
+
### 2.9.1 (2023-02-06)
* Fixed Logger not being serializable anymore (#1792)
diff --git a/lib/Google/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/lib/Google/vendor/monolog/monolog/src/Monolog/ErrorHandler.php
index 576f1713f..1406d34e8 100644
--- a/lib/Google/vendor/monolog/monolog/src/Monolog/ErrorHandler.php
+++ b/lib/Google/vendor/monolog/monolog/src/Monolog/ErrorHandler.php
@@ -198,7 +198,7 @@ private function handleException(\Throwable $e): void
($this->previousExceptionHandler)($e);
}
- if (!headers_sent() && !ini_get('display_errors')) {
+ if (!headers_sent() && in_array(strtolower((string) ini_get('display_errors')), ['0', '', 'false', 'off', 'none', 'no'], true)) {
http_response_code(500);
}
diff --git a/lib/Google/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/lib/Google/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php
index b31b2971a..e6e789833 100644
--- a/lib/Google/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php
+++ b/lib/Google/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php
@@ -155,7 +155,7 @@ protected function normalizeException(\Throwable $e, int $depth = 0): string
do {
$depth++;
if ($depth > $this->maxNormalizeDepth) {
- $str .= '\n[previous exception] Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization';
+ $str .= "\n[previous exception] Over " . $this->maxNormalizeDepth . ' levels deep, aborting normalization';
break;
}
diff --git a/lib/Google/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/lib/Google/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php
index 5441bc0aa..f926a842f 100644
--- a/lib/Google/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php
+++ b/lib/Google/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php
@@ -174,6 +174,9 @@ protected function normalize($data, int $depth = 0)
if ($data instanceof \JsonSerializable) {
/** @var null|scalar|array $value */
$value = $data->jsonSerialize();
+ } elseif (\get_class($data) === '__PHP_Incomplete_Class') {
+ $accessor = new \ArrayObject($data);
+ $value = (string) $accessor['__PHP_Incomplete_Class_Name'];
} elseif (method_exists($data, '__toString')) {
/** @var string $value */
$value = $data->__toString();
diff --git a/lib/Google/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php b/lib/Google/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php
similarity index 100%
rename from lib/Google/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php
rename to lib/Google/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php
diff --git a/lib/Google/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/lib/Google/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
index 651835122..82c048e1c 100644
--- a/lib/Google/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
+++ b/lib/Google/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
@@ -135,11 +135,14 @@ protected function write(array $record): void
$this->createDir($url);
$this->errorMessage = null;
set_error_handler([$this, 'customErrorHandler']);
- $stream = fopen($url, 'a');
- if ($this->filePermission !== null) {
- @chmod($url, $this->filePermission);
+ try {
+ $stream = fopen($url, 'a');
+ if ($this->filePermission !== null) {
+ @chmod($url, $this->filePermission);
+ }
+ } finally {
+ restore_error_handler();
}
- restore_error_handler();
if (!is_resource($stream)) {
$this->stream = null;
diff --git a/lib/Google/vendor/phpseclib/phpseclib/BACKERS.md b/lib/Google/vendor/phpseclib/phpseclib/BACKERS.md
index 5e5c6d99b..4ee6a4f9b 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/BACKERS.md
+++ b/lib/Google/vendor/phpseclib/phpseclib/BACKERS.md
@@ -12,4 +12,5 @@ phpseclib ongoing development is made possible by [Tidelift](https://tidelift.co
- [Charles Severance](https://github.com/csev)
- [Rachel Fish](https://github.com/itsrachelfish)
- Tharyrok
-- [cjhaas](https://github.com/cjhaas)
\ No newline at end of file
+- [cjhaas](https://github.com/cjhaas)
+- [istiak-tridip](https://github.com/istiak-tridip)
\ No newline at end of file
diff --git a/lib/Google/vendor/phpseclib/phpseclib/README.md b/lib/Google/vendor/phpseclib/phpseclib/README.md
index 64c06ba28..bbb1e9f06 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/README.md
+++ b/lib/Google/vendor/phpseclib/phpseclib/README.md
@@ -51,8 +51,7 @@ SSH-2, SFTP, X.509, an arbitrary-precision integer arithmetic library, Ed25519 /
* PHP4 compatible
* Composer compatible (PSR-0 autoloading)
* Install using Composer: `composer require phpseclib/phpseclib:~1.0`
-* Install using PEAR: See [phpseclib PEAR Channel Documentation](http://phpseclib.sourceforge.net/pear.htm)
-* [Download 1.0.20 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.20.zip/download)
+* [Download 1.0.21 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.21.zip/download)
## Security contact information
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/AsymmetricKey.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/AsymmetricKey.php
index 407f03699..256c86906 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/AsymmetricKey.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/AsymmetricKey.php
@@ -130,7 +130,7 @@ protected static function initialize_static_variables()
*
* @param string $key
* @param string $password optional
- * @return AsymmetricKey
+ * @return \phpseclib3\Crypt\Common\PublicKey|\phpseclib3\Crypt\Common\PrivateKey
*/
public static function load($key, $password = false)
{
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php
index 2a376f113..00bfdd45c 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php
@@ -668,11 +668,11 @@ protected static function initialize_static_variables()
switch (true) {
// PHP_OS & "\xDF\xDF\xDF" == strtoupper(substr(PHP_OS, 0, 3)), but a lot faster
case (PHP_OS & "\xDF\xDF\xDF") === 'WIN':
- case (php_uname('m') & "\xDF\xDF\xDF") != 'ARM':
+ case !(is_string(php_uname('m')) && (php_uname('m') & "\xDF\xDF\xDF") == 'ARM'):
case defined('PHP_INT_SIZE') && PHP_INT_SIZE == 8:
self::$use_reg_intval = true;
break;
- case (php_uname('m') & "\xDF\xDF\xDF") == 'ARM':
+ case is_string(php_uname('m')) && (php_uname('m') & "\xDF\xDF\xDF") == 'ARM':
switch (true) {
/* PHP 7.0.0 introduced a bug that affected 32-bit ARM processors:
@@ -917,7 +917,7 @@ public function setKey($key)
* @see Crypt/Hash.php
* @param string $password
* @param string $method
- * @param string[] ...$func_args
+ * @param int|string ...$func_args
* @throws \LengthException if pbkdf1 is being used and the derived key length exceeds the hash length
* @throws \RuntimeException if bcrypt is being used and a salt isn't provided
* @return bool
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php
index 7b935cc2d..135719979 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php
@@ -841,15 +841,15 @@ public function withPadding($padding)
self::ENCRYPTION_PKCS1,
self::ENCRYPTION_NONE
];
- $numSelected = 0;
+ $encryptedCount = 0;
$selected = 0;
foreach ($masks as $mask) {
if ($padding & $mask) {
$selected = $mask;
- $numSelected++;
+ $encryptedCount++;
}
}
- if ($numSelected > 1) {
+ if ($encryptedCount > 1) {
throw new InconsistentSetupException('Multiple encryption padding modes have been selected; at most only one should be selected');
}
$encryptionPadding = $selected;
@@ -859,22 +859,26 @@ public function withPadding($padding)
self::SIGNATURE_RELAXED_PKCS1,
self::SIGNATURE_PKCS1
];
- $numSelected = 0;
+ $signatureCount = 0;
$selected = 0;
foreach ($masks as $mask) {
if ($padding & $mask) {
$selected = $mask;
- $numSelected++;
+ $signatureCount++;
}
}
- if ($numSelected > 1) {
+ if ($signatureCount > 1) {
throw new InconsistentSetupException('Multiple signature padding modes have been selected; at most only one should be selected');
}
$signaturePadding = $selected;
$new = clone $this;
- $new->encryptionPadding = $encryptionPadding;
- $new->signaturePadding = $signaturePadding;
+ if ($encryptedCount) {
+ $new->encryptionPadding = $encryptionPadding;
+ }
+ if ($signatureCount) {
+ $new->signaturePadding = $signaturePadding;
+ }
return $new;
}
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php
index cd8b76272..ff31f9c88 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php
@@ -833,7 +833,6 @@ protected function setupInlineCrypt()
// Generating encrypt code:
$init_encrypt .= '
- static $tables;
if (empty($tables)) {
$tables = &$this->getTables();
}
@@ -890,7 +889,6 @@ protected function setupInlineCrypt()
// Generating decrypt code:
$init_decrypt .= '
- static $invtables;
if (empty($invtables)) {
$invtables = &$this->getInvTables();
}
@@ -947,7 +945,7 @@ protected function setupInlineCrypt()
$this->inline_crypt = $this->createInlineCryptFunction(
[
- 'init_crypt' => '',
+ 'init_crypt' => 'static $tables; static $invtables;',
'init_encrypt' => $init_encrypt,
'init_decrypt' => $init_decrypt,
'encrypt_block' => $encrypt_block,
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php
index e21589c51..3096ff1a1 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php
@@ -21,7 +21,6 @@
namespace phpseclib3\File;
-use DateTime;
use phpseclib3\Common\Functions\Strings;
use phpseclib3\File\ASN1\Element;
use phpseclib3\Math\BigInteger;
@@ -205,7 +204,7 @@ public static function decodeBER($encoded)
return null;
}
- return [self::decode_ber($encoded)];
+ return [$decoded];
}
/**
@@ -1403,7 +1402,7 @@ public static function convert($in, $from = self::TYPE_UTF8_STRING, $to = self::
return false;
}
break;
- case ($c & 0x80000000) != 0:
+ case ($c & (PHP_INT_SIZE == 8 ? 0x80000000 : (1 << 31))) != 0:
return false;
case $c >= 0x04000000:
$v .= chr(0x80 | ($c & 0x3F));
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/X509.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/X509.php
index 7aa278f2a..5e2f073f4 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/X509.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/File/X509.php
@@ -164,7 +164,7 @@ class X509
*
* @var array
*/
- private $CAs;
+ private $CAs = [];
/**
* The currently loaded certificate
@@ -315,6 +315,10 @@ public function __construct()
'id-at-uniqueIdentifier' => '2.5.4.45',
'id-at-role' => '2.5.4.72',
'id-at-postalAddress' => '2.5.4.16',
+ 'jurisdictionOfIncorporationCountryName' => '1.3.6.1.4.1.311.60.2.1.3',
+ 'jurisdictionOfIncorporationStateOrProvinceName' => '1.3.6.1.4.1.311.60.2.1.2',
+ 'jurisdictionLocalityName' => '1.3.6.1.4.1.311.60.2.1.1',
+ 'id-at-businessCategory' => '2.5.4.15',
//'id-domainComponent' => '0.9.2342.19200300.100.1.25',
//'pkcs-9' => '1.2.840.113549.1.9',
@@ -1038,7 +1042,8 @@ public function validateURL($url)
if ($names = $this->getExtension('id-ce-subjectAltName')) {
foreach ($names as $name) {
foreach ($name as $key => $value) {
- $value = str_replace(['.', '*'], ['\.', '[^.]*'], $value);
+ $value = preg_quote($value);
+ $value = str_replace('\*', '[^.]*', $value);
switch ($key) {
case 'dNSName':
/* From RFC2818 "HTTP over TLS":
@@ -1538,6 +1543,20 @@ public static function encodeIP($ip)
private function translateDNProp($propName)
{
switch (strtolower($propName)) {
+ case 'jurisdictionofincorporationcountryname':
+ case 'jurisdictioncountryname':
+ case 'jurisdictionc':
+ return 'jurisdictionOfIncorporationCountryName';
+ case 'jurisdictionofincorporationstateorprovincename':
+ case 'jurisdictionstateorprovincename':
+ case 'jurisdictionst':
+ return 'jurisdictionOfIncorporationStateOrProvinceName';
+ case 'jurisdictionlocalityname':
+ case 'jurisdictionl':
+ return 'jurisdictionLocalityName';
+ case 'id-at-businesscategory':
+ case 'businesscategory':
+ return 'id-at-businessCategory';
case 'id-at-countryname':
case 'countryname':
case 'c':
@@ -2030,9 +2049,6 @@ public function getChain()
if (!is_array($this->currentCert) || !isset($this->currentCert['tbsCertificate'])) {
return false;
}
- if (empty($this->CAs)) {
- return $chain;
- }
while (true) {
$currentCert = $chain[count($chain) - 1];
for ($i = 0; $i < count($this->CAs); $i++) {
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php
index 70491abd6..3f4dc2ed7 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php
@@ -29,6 +29,7 @@
use phpseclib3\Exception\BadConfigurationException;
use phpseclib3\Math\BigInteger\Engines\Engine;
+use UnexpectedValueException;
/**
* Pure-PHP arbitrary precision integer arithmetic library. Supports base-2, base-10, base-16, and base-256
@@ -100,10 +101,6 @@ public static function setEngine($main, array $modexps = ['DefaultEngine'])
/** @var class-string $fqmain */
self::$mainEngine = $fqmain;
- if (!in_array('Default', $modexps)) {
- $modexps[] = 'DefaultEngine';
- }
-
$found = false;
foreach ($modexps as $modexp) {
try {
@@ -140,18 +137,23 @@ private static function initialize_static_variables()
{
if (!isset(self::$mainEngine)) {
$engines = [
- ['GMP'],
+ ['GMP', ['DefaultEngine']],
['PHP64', ['OpenSSL']],
['BCMath', ['OpenSSL']],
- ['PHP32', ['OpenSSL']]
+ ['PHP32', ['OpenSSL']],
+ ['PHP64', ['DefaultEngine']],
+ ['PHP32', ['DefaultEngine']]
];
+
foreach ($engines as $engine) {
try {
- self::setEngine($engine[0], isset($engine[1]) ? $engine[1] : []);
- break;
+ self::setEngine($engine[0], $engine[1]);
+ return;
} catch (\Exception $e) {
}
}
+
+ throw new UnexpectedValueException('No valid BigInteger found. This is only possible when JIT is enabled on Windows and neither the GMP or BCMath extensions are available so either disable JIT or install GMP / BCMath');
}
}
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php
index 2b00bc37c..abdf3b475 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php
@@ -644,6 +644,11 @@ protected function powModOuter(Engine $e, Engine $n)
return $this->normalize($temp->powModInner($e, $n));
}
+ if ($this->compare($n) > 0) {
+ list(, $temp) = $this->divide($n);
+ return $temp->powModInner($e, $n);
+ }
+
return $this->powModInner($e, $n);
}
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php
index ab9bdc99b..4c30da564 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php
@@ -1326,4 +1326,18 @@ private function bitwise_small_split($split)
return array_reverse($vals);
}
+
+ /**
+ * @return bool
+ */
+ protected static function testJITOnWindows()
+ {
+ if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && function_exists('opcache_get_status') && !defined('PHPSECLIB_ALLOW_JIT')) {
+ $status = opcache_get_status();
+ if ($status && isset($status['jit']) && $status['jit']['enabled'] && $status['jit']['on']) {
+ return true;
+ }
+ }
+ return false;
+ }
}
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP32.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP32.php
index 964cd170d..3a775e7db 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP32.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP32.php
@@ -80,10 +80,10 @@ protected function initialize($base)
}
$step = count($vals) & 3;
if ($step) {
- $digit = floor($digit / pow(2, 2 * $step));
+ $digit = (int) floor($digit / pow(2, 2 * $step));
}
if ($step != 3) {
- $digit &= static::MAX_DIGIT;
+ $digit = (int) fmod($digit, static::BASE_FULL);
$i++;
}
$vals[] = $digit;
@@ -102,7 +102,7 @@ protected function initialize($base)
*/
public static function isValidEngine()
{
- return PHP_INT_SIZE >= 4;
+ return PHP_INT_SIZE >= 4 && !self::testJITOnWindows();
}
/**
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP64.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP64.php
index ca11c08d4..70a2e173b 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP64.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP64.php
@@ -103,7 +103,7 @@ protected function initialize($base)
*/
public static function isValidEngine()
{
- return PHP_INT_SIZE >= 8;
+ return PHP_INT_SIZE >= 8 && !self::testJITOnWindows();
}
/**
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php
index 748f9a49f..ddb04912d 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php
@@ -312,8 +312,11 @@ public function negate()
*/
public function toBytes()
{
- $length = static::$modulo[$this->instanceID]->getLengthInBytes();
- return str_pad($this->value->toBytes(), $length, "\0", STR_PAD_LEFT);
+ if (isset(static::$modulo[$this->instanceID])) {
+ $length = static::$modulo[$this->instanceID]->getLengthInBytes();
+ return str_pad($this->value->toBytes(), $length, "\0", STR_PAD_LEFT);
+ }
+ return $this->value->toBytes();
}
/**
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php
index 1c675a6e0..cdf0bec69 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php
@@ -93,7 +93,7 @@ class SFTP extends SSH2
* @var array
* @access private
*/
- private $packet_types = [];
+ private static $packet_types = [];
/**
* Status Codes
@@ -102,19 +102,19 @@ class SFTP extends SSH2
* @var array
* @access private
*/
- private $status_codes = [];
+ private static $status_codes = [];
/** @var array */
- private $attributes;
+ private static $attributes;
/** @var array */
- private $open_flags;
+ private static $open_flags;
/** @var array */
- private $open_flags5;
+ private static $open_flags5;
/** @var array */
- private $file_types;
+ private static $file_types;
/**
* The Request ID
@@ -350,7 +350,9 @@ class SFTP extends SSH2
*
* Connects to an SFTP server
*
- * @param string $host
+ * $host can either be a string, representing the host, or a stream resource.
+ *
+ * @param mixed $host
* @param int $port
* @param int $timeout
*/
@@ -360,154 +362,156 @@ public function __construct($host, $port = 22, $timeout = 10)
$this->max_sftp_packet = 1 << 15;
- $this->packet_types = [
- 1 => 'NET_SFTP_INIT',
- 2 => 'NET_SFTP_VERSION',
- 3 => 'NET_SFTP_OPEN',
- 4 => 'NET_SFTP_CLOSE',
- 5 => 'NET_SFTP_READ',
- 6 => 'NET_SFTP_WRITE',
- 7 => 'NET_SFTP_LSTAT',
- 9 => 'NET_SFTP_SETSTAT',
- 10 => 'NET_SFTP_FSETSTAT',
- 11 => 'NET_SFTP_OPENDIR',
- 12 => 'NET_SFTP_READDIR',
- 13 => 'NET_SFTP_REMOVE',
- 14 => 'NET_SFTP_MKDIR',
- 15 => 'NET_SFTP_RMDIR',
- 16 => 'NET_SFTP_REALPATH',
- 17 => 'NET_SFTP_STAT',
- 18 => 'NET_SFTP_RENAME',
- 19 => 'NET_SFTP_READLINK',
- 20 => 'NET_SFTP_SYMLINK',
- 21 => 'NET_SFTP_LINK',
-
- 101 => 'NET_SFTP_STATUS',
- 102 => 'NET_SFTP_HANDLE',
- 103 => 'NET_SFTP_DATA',
- 104 => 'NET_SFTP_NAME',
- 105 => 'NET_SFTP_ATTRS',
-
- 200 => 'NET_SFTP_EXTENDED'
- ];
- $this->status_codes = [
- 0 => 'NET_SFTP_STATUS_OK',
- 1 => 'NET_SFTP_STATUS_EOF',
- 2 => 'NET_SFTP_STATUS_NO_SUCH_FILE',
- 3 => 'NET_SFTP_STATUS_PERMISSION_DENIED',
- 4 => 'NET_SFTP_STATUS_FAILURE',
- 5 => 'NET_SFTP_STATUS_BAD_MESSAGE',
- 6 => 'NET_SFTP_STATUS_NO_CONNECTION',
- 7 => 'NET_SFTP_STATUS_CONNECTION_LOST',
- 8 => 'NET_SFTP_STATUS_OP_UNSUPPORTED',
- 9 => 'NET_SFTP_STATUS_INVALID_HANDLE',
- 10 => 'NET_SFTP_STATUS_NO_SUCH_PATH',
- 11 => 'NET_SFTP_STATUS_FILE_ALREADY_EXISTS',
- 12 => 'NET_SFTP_STATUS_WRITE_PROTECT',
- 13 => 'NET_SFTP_STATUS_NO_MEDIA',
- 14 => 'NET_SFTP_STATUS_NO_SPACE_ON_FILESYSTEM',
- 15 => 'NET_SFTP_STATUS_QUOTA_EXCEEDED',
- 16 => 'NET_SFTP_STATUS_UNKNOWN_PRINCIPAL',
- 17 => 'NET_SFTP_STATUS_LOCK_CONFLICT',
- 18 => 'NET_SFTP_STATUS_DIR_NOT_EMPTY',
- 19 => 'NET_SFTP_STATUS_NOT_A_DIRECTORY',
- 20 => 'NET_SFTP_STATUS_INVALID_FILENAME',
- 21 => 'NET_SFTP_STATUS_LINK_LOOP',
- 22 => 'NET_SFTP_STATUS_CANNOT_DELETE',
- 23 => 'NET_SFTP_STATUS_INVALID_PARAMETER',
- 24 => 'NET_SFTP_STATUS_FILE_IS_A_DIRECTORY',
- 25 => 'NET_SFTP_STATUS_BYTE_RANGE_LOCK_CONFLICT',
- 26 => 'NET_SFTP_STATUS_BYTE_RANGE_LOCK_REFUSED',
- 27 => 'NET_SFTP_STATUS_DELETE_PENDING',
- 28 => 'NET_SFTP_STATUS_FILE_CORRUPT',
- 29 => 'NET_SFTP_STATUS_OWNER_INVALID',
- 30 => 'NET_SFTP_STATUS_GROUP_INVALID',
- 31 => 'NET_SFTP_STATUS_NO_MATCHING_BYTE_RANGE_LOCK'
- ];
- // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-7.1
- // the order, in this case, matters quite a lot - see \phpseclib3\Net\SFTP::_parseAttributes() to understand why
- $this->attributes = [
- 0x00000001 => 'NET_SFTP_ATTR_SIZE',
- 0x00000002 => 'NET_SFTP_ATTR_UIDGID', // defined in SFTPv3, removed in SFTPv4+
- 0x00000080 => 'NET_SFTP_ATTR_OWNERGROUP', // defined in SFTPv4+
- 0x00000004 => 'NET_SFTP_ATTR_PERMISSIONS',
- 0x00000008 => 'NET_SFTP_ATTR_ACCESSTIME',
- 0x00000010 => 'NET_SFTP_ATTR_CREATETIME', // SFTPv4+
- 0x00000020 => 'NET_SFTP_ATTR_MODIFYTIME',
- 0x00000040 => 'NET_SFTP_ATTR_ACL',
- 0x00000100 => 'NET_SFTP_ATTR_SUBSECOND_TIMES',
- 0x00000200 => 'NET_SFTP_ATTR_BITS', // SFTPv5+
- 0x00000400 => 'NET_SFTP_ATTR_ALLOCATION_SIZE', // SFTPv6+
- 0x00000800 => 'NET_SFTP_ATTR_TEXT_HINT',
- 0x00001000 => 'NET_SFTP_ATTR_MIME_TYPE',
- 0x00002000 => 'NET_SFTP_ATTR_LINK_COUNT',
- 0x00004000 => 'NET_SFTP_ATTR_UNTRANSLATED_NAME',
- 0x00008000 => 'NET_SFTP_ATTR_CTIME',
- // 0x80000000 will yield a floating point on 32-bit systems and converting floating points to integers
- // yields inconsistent behavior depending on how php is compiled. so we left shift -1 (which, in
- // two's compliment, consists of all 1 bits) by 31. on 64-bit systems this'll yield 0xFFFFFFFF80000000.
- // that's not a problem, however, and 'anded' and a 32-bit number, as all the leading 1 bits are ignored.
- (PHP_INT_SIZE == 4 ? -1 : 0xFFFFFFFF) => 'NET_SFTP_ATTR_EXTENDED'
- ];
- // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-04#section-6.3
- // the flag definitions change somewhat in SFTPv5+. if SFTPv5+ support is added to this library, maybe name
- // the array for that $this->open5_flags and similarly alter the constant names.
- $this->open_flags = [
- 0x00000001 => 'NET_SFTP_OPEN_READ',
- 0x00000002 => 'NET_SFTP_OPEN_WRITE',
- 0x00000004 => 'NET_SFTP_OPEN_APPEND',
- 0x00000008 => 'NET_SFTP_OPEN_CREATE',
- 0x00000010 => 'NET_SFTP_OPEN_TRUNCATE',
- 0x00000020 => 'NET_SFTP_OPEN_EXCL',
- 0x00000040 => 'NET_SFTP_OPEN_TEXT' // defined in SFTPv4
- ];
- // SFTPv5+ changed the flags up:
- // https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-13#section-8.1.1.3
- $this->open_flags5 = [
- // when SSH_FXF_ACCESS_DISPOSITION is a 3 bit field that controls how the file is opened
- 0x00000000 => 'NET_SFTP_OPEN_CREATE_NEW',
- 0x00000001 => 'NET_SFTP_OPEN_CREATE_TRUNCATE',
- 0x00000002 => 'NET_SFTP_OPEN_OPEN_EXISTING',
- 0x00000003 => 'NET_SFTP_OPEN_OPEN_OR_CREATE',
- 0x00000004 => 'NET_SFTP_OPEN_TRUNCATE_EXISTING',
- // the rest of the flags are not supported
- 0x00000008 => 'NET_SFTP_OPEN_APPEND_DATA', // "the offset field of SS_FXP_WRITE requests is ignored"
- 0x00000010 => 'NET_SFTP_OPEN_APPEND_DATA_ATOMIC',
- 0x00000020 => 'NET_SFTP_OPEN_TEXT_MODE',
- 0x00000040 => 'NET_SFTP_OPEN_BLOCK_READ',
- 0x00000080 => 'NET_SFTP_OPEN_BLOCK_WRITE',
- 0x00000100 => 'NET_SFTP_OPEN_BLOCK_DELETE',
- 0x00000200 => 'NET_SFTP_OPEN_BLOCK_ADVISORY',
- 0x00000400 => 'NET_SFTP_OPEN_NOFOLLOW',
- 0x00000800 => 'NET_SFTP_OPEN_DELETE_ON_CLOSE',
- 0x00001000 => 'NET_SFTP_OPEN_ACCESS_AUDIT_ALARM_INFO',
- 0x00002000 => 'NET_SFTP_OPEN_ACCESS_BACKUP',
- 0x00004000 => 'NET_SFTP_OPEN_BACKUP_STREAM',
- 0x00008000 => 'NET_SFTP_OPEN_OVERRIDE_OWNER',
- ];
- // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-04#section-5.2
- // see \phpseclib3\Net\SFTP::_parseLongname() for an explanation
- $this->file_types = [
- 1 => 'NET_SFTP_TYPE_REGULAR',
- 2 => 'NET_SFTP_TYPE_DIRECTORY',
- 3 => 'NET_SFTP_TYPE_SYMLINK',
- 4 => 'NET_SFTP_TYPE_SPECIAL',
- 5 => 'NET_SFTP_TYPE_UNKNOWN',
- // the following types were first defined for use in SFTPv5+
- // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-05#section-5.2
- 6 => 'NET_SFTP_TYPE_SOCKET',
- 7 => 'NET_SFTP_TYPE_CHAR_DEVICE',
- 8 => 'NET_SFTP_TYPE_BLOCK_DEVICE',
- 9 => 'NET_SFTP_TYPE_FIFO'
- ];
- $this->define_array(
- $this->packet_types,
- $this->status_codes,
- $this->attributes,
- $this->open_flags,
- $this->open_flags5,
- $this->file_types
- );
+ if (empty(self::$packet_types)) {
+ self::$packet_types = [
+ 1 => 'NET_SFTP_INIT',
+ 2 => 'NET_SFTP_VERSION',
+ 3 => 'NET_SFTP_OPEN',
+ 4 => 'NET_SFTP_CLOSE',
+ 5 => 'NET_SFTP_READ',
+ 6 => 'NET_SFTP_WRITE',
+ 7 => 'NET_SFTP_LSTAT',
+ 9 => 'NET_SFTP_SETSTAT',
+ 10 => 'NET_SFTP_FSETSTAT',
+ 11 => 'NET_SFTP_OPENDIR',
+ 12 => 'NET_SFTP_READDIR',
+ 13 => 'NET_SFTP_REMOVE',
+ 14 => 'NET_SFTP_MKDIR',
+ 15 => 'NET_SFTP_RMDIR',
+ 16 => 'NET_SFTP_REALPATH',
+ 17 => 'NET_SFTP_STAT',
+ 18 => 'NET_SFTP_RENAME',
+ 19 => 'NET_SFTP_READLINK',
+ 20 => 'NET_SFTP_SYMLINK',
+ 21 => 'NET_SFTP_LINK',
+
+ 101 => 'NET_SFTP_STATUS',
+ 102 => 'NET_SFTP_HANDLE',
+ 103 => 'NET_SFTP_DATA',
+ 104 => 'NET_SFTP_NAME',
+ 105 => 'NET_SFTP_ATTRS',
+
+ 200 => 'NET_SFTP_EXTENDED'
+ ];
+ self::$status_codes = [
+ 0 => 'NET_SFTP_STATUS_OK',
+ 1 => 'NET_SFTP_STATUS_EOF',
+ 2 => 'NET_SFTP_STATUS_NO_SUCH_FILE',
+ 3 => 'NET_SFTP_STATUS_PERMISSION_DENIED',
+ 4 => 'NET_SFTP_STATUS_FAILURE',
+ 5 => 'NET_SFTP_STATUS_BAD_MESSAGE',
+ 6 => 'NET_SFTP_STATUS_NO_CONNECTION',
+ 7 => 'NET_SFTP_STATUS_CONNECTION_LOST',
+ 8 => 'NET_SFTP_STATUS_OP_UNSUPPORTED',
+ 9 => 'NET_SFTP_STATUS_INVALID_HANDLE',
+ 10 => 'NET_SFTP_STATUS_NO_SUCH_PATH',
+ 11 => 'NET_SFTP_STATUS_FILE_ALREADY_EXISTS',
+ 12 => 'NET_SFTP_STATUS_WRITE_PROTECT',
+ 13 => 'NET_SFTP_STATUS_NO_MEDIA',
+ 14 => 'NET_SFTP_STATUS_NO_SPACE_ON_FILESYSTEM',
+ 15 => 'NET_SFTP_STATUS_QUOTA_EXCEEDED',
+ 16 => 'NET_SFTP_STATUS_UNKNOWN_PRINCIPAL',
+ 17 => 'NET_SFTP_STATUS_LOCK_CONFLICT',
+ 18 => 'NET_SFTP_STATUS_DIR_NOT_EMPTY',
+ 19 => 'NET_SFTP_STATUS_NOT_A_DIRECTORY',
+ 20 => 'NET_SFTP_STATUS_INVALID_FILENAME',
+ 21 => 'NET_SFTP_STATUS_LINK_LOOP',
+ 22 => 'NET_SFTP_STATUS_CANNOT_DELETE',
+ 23 => 'NET_SFTP_STATUS_INVALID_PARAMETER',
+ 24 => 'NET_SFTP_STATUS_FILE_IS_A_DIRECTORY',
+ 25 => 'NET_SFTP_STATUS_BYTE_RANGE_LOCK_CONFLICT',
+ 26 => 'NET_SFTP_STATUS_BYTE_RANGE_LOCK_REFUSED',
+ 27 => 'NET_SFTP_STATUS_DELETE_PENDING',
+ 28 => 'NET_SFTP_STATUS_FILE_CORRUPT',
+ 29 => 'NET_SFTP_STATUS_OWNER_INVALID',
+ 30 => 'NET_SFTP_STATUS_GROUP_INVALID',
+ 31 => 'NET_SFTP_STATUS_NO_MATCHING_BYTE_RANGE_LOCK'
+ ];
+ // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-7.1
+ // the order, in this case, matters quite a lot - see \phpseclib3\Net\SFTP::_parseAttributes() to understand why
+ self::$attributes = [
+ 0x00000001 => 'NET_SFTP_ATTR_SIZE',
+ 0x00000002 => 'NET_SFTP_ATTR_UIDGID', // defined in SFTPv3, removed in SFTPv4+
+ 0x00000080 => 'NET_SFTP_ATTR_OWNERGROUP', // defined in SFTPv4+
+ 0x00000004 => 'NET_SFTP_ATTR_PERMISSIONS',
+ 0x00000008 => 'NET_SFTP_ATTR_ACCESSTIME',
+ 0x00000010 => 'NET_SFTP_ATTR_CREATETIME', // SFTPv4+
+ 0x00000020 => 'NET_SFTP_ATTR_MODIFYTIME',
+ 0x00000040 => 'NET_SFTP_ATTR_ACL',
+ 0x00000100 => 'NET_SFTP_ATTR_SUBSECOND_TIMES',
+ 0x00000200 => 'NET_SFTP_ATTR_BITS', // SFTPv5+
+ 0x00000400 => 'NET_SFTP_ATTR_ALLOCATION_SIZE', // SFTPv6+
+ 0x00000800 => 'NET_SFTP_ATTR_TEXT_HINT',
+ 0x00001000 => 'NET_SFTP_ATTR_MIME_TYPE',
+ 0x00002000 => 'NET_SFTP_ATTR_LINK_COUNT',
+ 0x00004000 => 'NET_SFTP_ATTR_UNTRANSLATED_NAME',
+ 0x00008000 => 'NET_SFTP_ATTR_CTIME',
+ // 0x80000000 will yield a floating point on 32-bit systems and converting floating points to integers
+ // yields inconsistent behavior depending on how php is compiled. so we left shift -1 (which, in
+ // two's compliment, consists of all 1 bits) by 31. on 64-bit systems this'll yield 0xFFFFFFFF80000000.
+ // that's not a problem, however, and 'anded' and a 32-bit number, as all the leading 1 bits are ignored.
+ (PHP_INT_SIZE == 4 ? (-1 << 31) : 0x80000000) => 'NET_SFTP_ATTR_EXTENDED'
+ ];
+ // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-04#section-6.3
+ // the flag definitions change somewhat in SFTPv5+. if SFTPv5+ support is added to this library, maybe name
+ // the array for that $this->open5_flags and similarly alter the constant names.
+ self::$open_flags = [
+ 0x00000001 => 'NET_SFTP_OPEN_READ',
+ 0x00000002 => 'NET_SFTP_OPEN_WRITE',
+ 0x00000004 => 'NET_SFTP_OPEN_APPEND',
+ 0x00000008 => 'NET_SFTP_OPEN_CREATE',
+ 0x00000010 => 'NET_SFTP_OPEN_TRUNCATE',
+ 0x00000020 => 'NET_SFTP_OPEN_EXCL',
+ 0x00000040 => 'NET_SFTP_OPEN_TEXT' // defined in SFTPv4
+ ];
+ // SFTPv5+ changed the flags up:
+ // https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-13#section-8.1.1.3
+ self::$open_flags5 = [
+ // when SSH_FXF_ACCESS_DISPOSITION is a 3 bit field that controls how the file is opened
+ 0x00000000 => 'NET_SFTP_OPEN_CREATE_NEW',
+ 0x00000001 => 'NET_SFTP_OPEN_CREATE_TRUNCATE',
+ 0x00000002 => 'NET_SFTP_OPEN_OPEN_EXISTING',
+ 0x00000003 => 'NET_SFTP_OPEN_OPEN_OR_CREATE',
+ 0x00000004 => 'NET_SFTP_OPEN_TRUNCATE_EXISTING',
+ // the rest of the flags are not supported
+ 0x00000008 => 'NET_SFTP_OPEN_APPEND_DATA', // "the offset field of SS_FXP_WRITE requests is ignored"
+ 0x00000010 => 'NET_SFTP_OPEN_APPEND_DATA_ATOMIC',
+ 0x00000020 => 'NET_SFTP_OPEN_TEXT_MODE',
+ 0x00000040 => 'NET_SFTP_OPEN_BLOCK_READ',
+ 0x00000080 => 'NET_SFTP_OPEN_BLOCK_WRITE',
+ 0x00000100 => 'NET_SFTP_OPEN_BLOCK_DELETE',
+ 0x00000200 => 'NET_SFTP_OPEN_BLOCK_ADVISORY',
+ 0x00000400 => 'NET_SFTP_OPEN_NOFOLLOW',
+ 0x00000800 => 'NET_SFTP_OPEN_DELETE_ON_CLOSE',
+ 0x00001000 => 'NET_SFTP_OPEN_ACCESS_AUDIT_ALARM_INFO',
+ 0x00002000 => 'NET_SFTP_OPEN_ACCESS_BACKUP',
+ 0x00004000 => 'NET_SFTP_OPEN_BACKUP_STREAM',
+ 0x00008000 => 'NET_SFTP_OPEN_OVERRIDE_OWNER',
+ ];
+ // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-04#section-5.2
+ // see \phpseclib3\Net\SFTP::_parseLongname() for an explanation
+ self::$file_types = [
+ 1 => 'NET_SFTP_TYPE_REGULAR',
+ 2 => 'NET_SFTP_TYPE_DIRECTORY',
+ 3 => 'NET_SFTP_TYPE_SYMLINK',
+ 4 => 'NET_SFTP_TYPE_SPECIAL',
+ 5 => 'NET_SFTP_TYPE_UNKNOWN',
+ // the following types were first defined for use in SFTPv5+
+ // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-05#section-5.2
+ 6 => 'NET_SFTP_TYPE_SOCKET',
+ 7 => 'NET_SFTP_TYPE_CHAR_DEVICE',
+ 8 => 'NET_SFTP_TYPE_BLOCK_DEVICE',
+ 9 => 'NET_SFTP_TYPE_FIFO'
+ ];
+ self::define_array(
+ self::$packet_types,
+ self::$status_codes,
+ self::$attributes,
+ self::$open_flags,
+ self::$open_flags5,
+ self::$file_types
+ );
+ }
if (!defined('NET_SFTP_QUEUE_SIZE')) {
define('NET_SFTP_QUEUE_SIZE', 32);
@@ -543,22 +547,7 @@ private function precheck()
*/
private function partial_init_sftp_connection()
{
- $this->window_size_server_to_client[self::CHANNEL] = $this->window_size;
-
- $packet = Strings::packSSH2(
- 'CsN3',
- NET_SSH2_MSG_CHANNEL_OPEN,
- 'session',
- self::CHANNEL,
- $this->window_size,
- 0x4000
- );
-
- $this->send_binary_packet($packet);
-
- $this->channel_status[self::CHANNEL] = NET_SSH2_MSG_CHANNEL_OPEN;
-
- $response = $this->get_channel_packet(self::CHANNEL, true);
+ $response = $this->openChannel(self::CHANNEL, true);
if ($response === true && $this->isTimeout()) {
return false;
}
@@ -815,7 +804,7 @@ private function logError($response, $status = -1)
list($status) = Strings::unpackSSH2('N', $response);
}
- $error = $this->status_codes[$status];
+ $error = self::$status_codes[$status];
if ($this->version > 2) {
list($message) = Strings::unpackSSH2('s', $response);
@@ -2138,7 +2127,7 @@ public function put($remote_file, $data, $mode = self::SOURCE_STRING, $start = -
if ($start >= 0) {
$offset = $start;
- } elseif ($mode & self::RESUME) {
+ } elseif ($mode & (self::RESUME | self::RESUME_START)) {
// if NET_SFTP_OPEN_APPEND worked as it should _size() wouldn't need to be called
$size = $this->stat($remote_file)['size'];
$offset = $size !== false ? $size : 0;
@@ -2210,6 +2199,9 @@ public function put($remote_file, $data, $mode = self::SOURCE_STRING, $start = -
if ($local_start >= 0) {
fseek($fp, $local_start);
$size -= $local_start;
+ } elseif ($mode & self::RESUME) {
+ fseek($fp, $offset);
+ $size -= $offset;
}
} elseif ($dataCallback) {
$size = 0;
@@ -2497,14 +2489,6 @@ public function get($remote_file, $local_file = false, $offset = 0, $length = -1
}
}
- if ($length > 0 && $length <= $offset - $start) {
- if ($local_file === false) {
- $content = substr($content, 0, $length);
- } else {
- ftruncate($fp, $length + $res_offset);
- }
- }
-
if ($fclose_check) {
fclose($fp);
@@ -2840,15 +2824,37 @@ public function filegroup($path)
return $this->get_stat_cache_prop($path, 'gid');
}
+ /**
+ * Recursively go through rawlist() output to get the total filesize
+ *
+ * @return int
+ */
+ private static function recursiveFilesize(array $files)
+ {
+ $size = 0;
+ foreach ($files as $name => $file) {
+ if ($name == '.' || $name == '..') {
+ continue;
+ }
+ $size += is_array($file) ?
+ self::recursiveFilesize($file) :
+ $file->size;
+ }
+ return $size;
+ }
+
/**
* Gets file size
*
* @param string $path
+ * @param bool $recursive
* @return mixed
*/
- public function filesize($path)
+ public function filesize($path, $recursive = false)
{
- return $this->get_stat_cache_prop($path, 'size');
+ return !$recursive || $this->filetype($path) != 'dir' ?
+ $this->get_stat_cache_prop($path, 'size') :
+ self::recursiveFilesize($this->rawlist($path, true));
}
/**
@@ -3041,7 +3047,7 @@ protected function parseAttributes(&$response)
list($flags) = Strings::unpackSSH2('N', $response);
}
- foreach ($this->attributes as $key => $value) {
+ foreach (self::$attributes as $key => $value) {
switch ($flags & $key) {
case NET_SFTP_ATTR_UIDGID:
if ($this->version > 3) {
@@ -3272,7 +3278,7 @@ private function send_sftp_packet($type, $data, $request_id = 1)
$stop = microtime(true);
if (defined('NET_SFTP_LOGGING')) {
- $packet_type = '-> ' . $this->packet_types[$type] .
+ $packet_type = '-> ' . self::$packet_types[$type] .
' (' . round($stop - $start, 4) . 's)';
$this->append_log($packet_type, $data);
}
@@ -3376,7 +3382,7 @@ private function get_sftp_packet($request_id = null)
$packet = Strings::shift($this->packet_buffer, $length);
if (defined('NET_SFTP_LOGGING')) {
- $packet_type = '<- ' . $this->packet_types[$this->packet_type] .
+ $packet_type = '<- ' . self::$packet_types[$this->packet_type] .
' (' . round($stop - $start, 4) . 's)';
$this->append_log($packet_type, $packet);
}
@@ -3420,7 +3426,7 @@ private function append_log($message_number, $message)
*
* Returns a string if NET_SFTP_LOGGING == self::LOG_COMPLEX, an array if NET_SFTP_LOGGING == self::LOG_SIMPLE and false if !defined('NET_SFTP_LOGGING')
*
- * @return array|string
+ * @return array|string|false
*/
public function getSFTPLog()
{
diff --git a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php
index 9a0133fdc..581b05966 100644
--- a/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php
+++ b/lib/Google/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php
@@ -553,7 +553,7 @@ class SSH2
* @var array
* @access private
*/
- private $message_numbers = [];
+ private static $message_numbers = [];
/**
* Disconnection Message 'reason codes' defined in RFC4253
@@ -562,7 +562,7 @@ class SSH2
* @var array
* @access private
*/
- private $disconnect_reasons = [];
+ private static $disconnect_reasons = [];
/**
* SSH_MSG_CHANNEL_OPEN_FAILURE 'reason codes', defined in RFC4254
@@ -571,7 +571,7 @@ class SSH2
* @var array
* @access private
*/
- private $channel_open_failure_reasons = [];
+ private static $channel_open_failure_reasons = [];
/**
* Terminal Modes
@@ -581,7 +581,7 @@ class SSH2
* @var array
* @access private
*/
- private $terminal_modes = [];
+ private static $terminal_modes = [];
/**
* SSH_MSG_CHANNEL_EXTENDED_DATA's data_type_codes
@@ -591,7 +591,7 @@ class SSH2
* @var array
* @access private
*/
- private $channel_extended_data_type_codes = [];
+ private static $channel_extended_data_type_codes = [];
/**
* Send Sequence Number
@@ -646,6 +646,14 @@ class SSH2
*/
protected $channel_status = [];
+ /**
+ * The identifier of the interactive channel which was opened most recently
+ *
+ * @see self::getInteractiveChannelId()
+ * @var int
+ */
+ private $channel_id_last_interactive = 0;
+
/**
* Packet Size
*
@@ -837,20 +845,6 @@ class SSH2
*/
private $request_pty = false;
- /**
- * Flag set while exec() is running when using enablePTY()
- *
- * @var bool
- */
- private $in_request_pty_exec = false;
-
- /**
- * Flag set after startSubsystem() is called
- *
- * @var bool
- */
- private $in_subsystem;
-
/**
* Contents of stdError
*
@@ -1093,6 +1087,21 @@ class SSH2
*/
private $smartMFA = true;
+ /**
+ * How many channels are currently opened
+ *
+ * @var int
+ */
+ private $channelCount = 0;
+
+ /**
+ * Does the server support multiple channels? If not then error out
+ * when multiple channels are attempted to be opened
+ *
+ * @var bool
+ */
+ private $errorOnMultipleChannels;
+
/**
* Default Constructor.
*
@@ -1105,84 +1114,86 @@ class SSH2
*/
public function __construct($host, $port = 22, $timeout = 10)
{
- $this->message_numbers = [
- 1 => 'NET_SSH2_MSG_DISCONNECT',
- 2 => 'NET_SSH2_MSG_IGNORE',
- 3 => 'NET_SSH2_MSG_UNIMPLEMENTED',
- 4 => 'NET_SSH2_MSG_DEBUG',
- 5 => 'NET_SSH2_MSG_SERVICE_REQUEST',
- 6 => 'NET_SSH2_MSG_SERVICE_ACCEPT',
- 20 => 'NET_SSH2_MSG_KEXINIT',
- 21 => 'NET_SSH2_MSG_NEWKEYS',
- 30 => 'NET_SSH2_MSG_KEXDH_INIT',
- 31 => 'NET_SSH2_MSG_KEXDH_REPLY',
- 50 => 'NET_SSH2_MSG_USERAUTH_REQUEST',
- 51 => 'NET_SSH2_MSG_USERAUTH_FAILURE',
- 52 => 'NET_SSH2_MSG_USERAUTH_SUCCESS',
- 53 => 'NET_SSH2_MSG_USERAUTH_BANNER',
-
- 80 => 'NET_SSH2_MSG_GLOBAL_REQUEST',
- 81 => 'NET_SSH2_MSG_REQUEST_SUCCESS',
- 82 => 'NET_SSH2_MSG_REQUEST_FAILURE',
- 90 => 'NET_SSH2_MSG_CHANNEL_OPEN',
- 91 => 'NET_SSH2_MSG_CHANNEL_OPEN_CONFIRMATION',
- 92 => 'NET_SSH2_MSG_CHANNEL_OPEN_FAILURE',
- 93 => 'NET_SSH2_MSG_CHANNEL_WINDOW_ADJUST',
- 94 => 'NET_SSH2_MSG_CHANNEL_DATA',
- 95 => 'NET_SSH2_MSG_CHANNEL_EXTENDED_DATA',
- 96 => 'NET_SSH2_MSG_CHANNEL_EOF',
- 97 => 'NET_SSH2_MSG_CHANNEL_CLOSE',
- 98 => 'NET_SSH2_MSG_CHANNEL_REQUEST',
- 99 => 'NET_SSH2_MSG_CHANNEL_SUCCESS',
- 100 => 'NET_SSH2_MSG_CHANNEL_FAILURE'
- ];
- $this->disconnect_reasons = [
- 1 => 'NET_SSH2_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT',
- 2 => 'NET_SSH2_DISCONNECT_PROTOCOL_ERROR',
- 3 => 'NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED',
- 4 => 'NET_SSH2_DISCONNECT_RESERVED',
- 5 => 'NET_SSH2_DISCONNECT_MAC_ERROR',
- 6 => 'NET_SSH2_DISCONNECT_COMPRESSION_ERROR',
- 7 => 'NET_SSH2_DISCONNECT_SERVICE_NOT_AVAILABLE',
- 8 => 'NET_SSH2_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED',
- 9 => 'NET_SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE',
- 10 => 'NET_SSH2_DISCONNECT_CONNECTION_LOST',
- 11 => 'NET_SSH2_DISCONNECT_BY_APPLICATION',
- 12 => 'NET_SSH2_DISCONNECT_TOO_MANY_CONNECTIONS',
- 13 => 'NET_SSH2_DISCONNECT_AUTH_CANCELLED_BY_USER',
- 14 => 'NET_SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE',
- 15 => 'NET_SSH2_DISCONNECT_ILLEGAL_USER_NAME'
- ];
- $this->channel_open_failure_reasons = [
- 1 => 'NET_SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED'
- ];
- $this->terminal_modes = [
- 0 => 'NET_SSH2_TTY_OP_END'
- ];
- $this->channel_extended_data_type_codes = [
- 1 => 'NET_SSH2_EXTENDED_DATA_STDERR'
- ];
+ if (empty(self::$message_numbers)) {
+ self::$message_numbers = [
+ 1 => 'NET_SSH2_MSG_DISCONNECT',
+ 2 => 'NET_SSH2_MSG_IGNORE',
+ 3 => 'NET_SSH2_MSG_UNIMPLEMENTED',
+ 4 => 'NET_SSH2_MSG_DEBUG',
+ 5 => 'NET_SSH2_MSG_SERVICE_REQUEST',
+ 6 => 'NET_SSH2_MSG_SERVICE_ACCEPT',
+ 20 => 'NET_SSH2_MSG_KEXINIT',
+ 21 => 'NET_SSH2_MSG_NEWKEYS',
+ 30 => 'NET_SSH2_MSG_KEXDH_INIT',
+ 31 => 'NET_SSH2_MSG_KEXDH_REPLY',
+ 50 => 'NET_SSH2_MSG_USERAUTH_REQUEST',
+ 51 => 'NET_SSH2_MSG_USERAUTH_FAILURE',
+ 52 => 'NET_SSH2_MSG_USERAUTH_SUCCESS',
+ 53 => 'NET_SSH2_MSG_USERAUTH_BANNER',
+
+ 80 => 'NET_SSH2_MSG_GLOBAL_REQUEST',
+ 81 => 'NET_SSH2_MSG_REQUEST_SUCCESS',
+ 82 => 'NET_SSH2_MSG_REQUEST_FAILURE',
+ 90 => 'NET_SSH2_MSG_CHANNEL_OPEN',
+ 91 => 'NET_SSH2_MSG_CHANNEL_OPEN_CONFIRMATION',
+ 92 => 'NET_SSH2_MSG_CHANNEL_OPEN_FAILURE',
+ 93 => 'NET_SSH2_MSG_CHANNEL_WINDOW_ADJUST',
+ 94 => 'NET_SSH2_MSG_CHANNEL_DATA',
+ 95 => 'NET_SSH2_MSG_CHANNEL_EXTENDED_DATA',
+ 96 => 'NET_SSH2_MSG_CHANNEL_EOF',
+ 97 => 'NET_SSH2_MSG_CHANNEL_CLOSE',
+ 98 => 'NET_SSH2_MSG_CHANNEL_REQUEST',
+ 99 => 'NET_SSH2_MSG_CHANNEL_SUCCESS',
+ 100 => 'NET_SSH2_MSG_CHANNEL_FAILURE'
+ ];
+ self::$disconnect_reasons = [
+ 1 => 'NET_SSH2_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT',
+ 2 => 'NET_SSH2_DISCONNECT_PROTOCOL_ERROR',
+ 3 => 'NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED',
+ 4 => 'NET_SSH2_DISCONNECT_RESERVED',
+ 5 => 'NET_SSH2_DISCONNECT_MAC_ERROR',
+ 6 => 'NET_SSH2_DISCONNECT_COMPRESSION_ERROR',
+ 7 => 'NET_SSH2_DISCONNECT_SERVICE_NOT_AVAILABLE',
+ 8 => 'NET_SSH2_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED',
+ 9 => 'NET_SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE',
+ 10 => 'NET_SSH2_DISCONNECT_CONNECTION_LOST',
+ 11 => 'NET_SSH2_DISCONNECT_BY_APPLICATION',
+ 12 => 'NET_SSH2_DISCONNECT_TOO_MANY_CONNECTIONS',
+ 13 => 'NET_SSH2_DISCONNECT_AUTH_CANCELLED_BY_USER',
+ 14 => 'NET_SSH2_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE',
+ 15 => 'NET_SSH2_DISCONNECT_ILLEGAL_USER_NAME'
+ ];
+ self::$channel_open_failure_reasons = [
+ 1 => 'NET_SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED'
+ ];
+ self::$terminal_modes = [
+ 0 => 'NET_SSH2_TTY_OP_END'
+ ];
+ self::$channel_extended_data_type_codes = [
+ 1 => 'NET_SSH2_EXTENDED_DATA_STDERR'
+ ];
- $this->define_array(
- $this->message_numbers,
- $this->disconnect_reasons,
- $this->channel_open_failure_reasons,
- $this->terminal_modes,
- $this->channel_extended_data_type_codes,
- [60 => 'NET_SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ'],
- [60 => 'NET_SSH2_MSG_USERAUTH_PK_OK'],
- [60 => 'NET_SSH2_MSG_USERAUTH_INFO_REQUEST',
- 61 => 'NET_SSH2_MSG_USERAUTH_INFO_RESPONSE'],
- // RFC 4419 - diffie-hellman-group-exchange-sha{1,256}
- [30 => 'NET_SSH2_MSG_KEXDH_GEX_REQUEST_OLD',
- 31 => 'NET_SSH2_MSG_KEXDH_GEX_GROUP',
- 32 => 'NET_SSH2_MSG_KEXDH_GEX_INIT',
- 33 => 'NET_SSH2_MSG_KEXDH_GEX_REPLY',
- 34 => 'NET_SSH2_MSG_KEXDH_GEX_REQUEST'],
- // RFC 5656 - Elliptic Curves (for curve25519-sha256@libssh.org)
- [30 => 'NET_SSH2_MSG_KEX_ECDH_INIT',
- 31 => 'NET_SSH2_MSG_KEX_ECDH_REPLY']
- );
+ self::define_array(
+ self::$message_numbers,
+ self::$disconnect_reasons,
+ self::$channel_open_failure_reasons,
+ self::$terminal_modes,
+ self::$channel_extended_data_type_codes,
+ [60 => 'NET_SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ'],
+ [60 => 'NET_SSH2_MSG_USERAUTH_PK_OK'],
+ [60 => 'NET_SSH2_MSG_USERAUTH_INFO_REQUEST',
+ 61 => 'NET_SSH2_MSG_USERAUTH_INFO_RESPONSE'],
+ // RFC 4419 - diffie-hellman-group-exchange-sha{1,256}
+ [30 => 'NET_SSH2_MSG_KEXDH_GEX_REQUEST_OLD',
+ 31 => 'NET_SSH2_MSG_KEXDH_GEX_GROUP',
+ 32 => 'NET_SSH2_MSG_KEXDH_GEX_INIT',
+ 33 => 'NET_SSH2_MSG_KEXDH_GEX_REPLY',
+ 34 => 'NET_SSH2_MSG_KEXDH_GEX_REQUEST'],
+ // RFC 5656 - Elliptic Curves (for curve25519-sha256@libssh.org)
+ [30 => 'NET_SSH2_MSG_KEX_ECDH_INIT',
+ 31 => 'NET_SSH2_MSG_KEX_ECDH_REPLY']
+ );
+ }
/**
* Typehint is required due to a bug in Psalm: https://github.com/vimeo/psalm/issues/7508
@@ -1269,6 +1280,32 @@ public function sendKEXINITLast()
$this->send_kex_first = false;
}
+ /**
+ * stream_select wrapper
+ *
+ * Quoting https://stackoverflow.com/a/14262151/569976,
+ * "The general approach to `EINTR` is to simply handle the error and retry the operation again"
+ *
+ * This wrapper does that loop
+ */
+ private static function stream_select(&$read, &$write, &$except, $seconds, $microseconds = null)
+ {
+ $remaining = $seconds + $microseconds / 1000000;
+ $start = microtime(true);
+ while (true) {
+ $result = @stream_select($read, $write, $except, $seconds, $microseconds);
+ if ($result !== false) {
+ return $result;
+ }
+ $elapsed = microtime(true) - $start;
+ $seconds = (int) ($remaining - floor($elapsed));
+ $microseconds = (int) (1000000 * ($remaining - $seconds));
+ if ($elapsed >= $remaining) {
+ return false;
+ }
+ }
+ }
+
/**
* Connect to an SSHv2 server
*
@@ -1333,7 +1370,7 @@ private function connect()
$start = microtime(true);
$sec = (int) floor($this->curTimeout);
$usec = (int) (1000000 * ($this->curTimeout - $sec));
- if (@stream_select($read, $write, $except, $sec, $usec) === false) {
+ if (static::stream_select($read, $write, $except, $sec, $usec) === false) {
throw new \RuntimeException('Connection timed out whilst receiving server identification string');
}
$elapsed = microtime(true) - $start;
@@ -1388,6 +1425,18 @@ private function connect()
throw new UnableToConnectException("Cannot connect to SSH $matches[3] servers");
}
+ // Ubuntu's OpenSSH from 5.8 to 6.9 didn't work with multiple channels. see
+ // https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1334916 for more info.
+ // https://lists.ubuntu.com/archives/oneiric-changes/2011-July/005772.html discusses
+ // when consolekit was incorporated.
+ // https://marc.info/?l=openssh-unix-dev&m=163409903417589&w=2 discusses some of the
+ // issues with how Ubuntu incorporated consolekit
+ $pattern = '#^SSH-2\.0-OpenSSH_([\d.]+)[^ ]* Ubuntu-.*$#';
+ $match = preg_match($pattern, $this->server_identifier, $matches);
+ $match = $match && version_compare('5.8', $matches[1], '<=');
+ $match = $match && version_compare('6.9', $matches[1], '>=');
+ $this->errorOnMultipleChannels = $match;
+
if (!$this->send_id_string_first) {
fputs($this->fsock, $this->identifier . "\r\n");
}
@@ -2121,7 +2170,7 @@ private static function bad_algorithm_candidate($algorithm)
* The $password parameter can be a plaintext password, a \phpseclib3\Crypt\RSA|EC|DSA object, a \phpseclib3\System\SSH\Agent object or an array
*
* @param string $username
- * @param string|AsymmetricKey|array[]|Agent|null ...$args
+ * @param string|PrivateKey|array[]|Agent|null ...$args
* @return bool
* @see self::_login()
*/
@@ -2146,7 +2195,7 @@ public function login($username, ...$args)
* Login Helper
*
* @param string $username
- * @param string ...$args
+ * @param string|PrivateKey|array[]|Agent|null ...$args
* @return bool
* @see self::_login_helper()
*/
@@ -2729,32 +2778,11 @@ public function exec($command, callable $callback = null)
return false;
}
- if ($this->in_request_pty_exec) {
- throw new \RuntimeException('If you want to run multiple exec()\'s you will need to disable (and re-enable if appropriate) a PTY for each one.');
- }
+ //if ($this->isPTYOpen()) {
+ // throw new \RuntimeException('If you want to run multiple exec()\'s you will need to disable (and re-enable if appropriate) a PTY for each one.');
+ //}
- // RFC4254 defines the (client) window size as "bytes the other party can send before it must wait for the window to
- // be adjusted". 0x7FFFFFFF is, at 2GB, the max size. technically, it should probably be decremented, but,
- // honestly, if you're transferring more than 2GB, you probably shouldn't be using phpseclib, anyway.
- // see http://tools.ietf.org/html/rfc4254#section-5.2 for more info
- $this->window_size_server_to_client[self::CHANNEL_EXEC] = $this->window_size;
- // 0x8000 is the maximum max packet size, per http://tools.ietf.org/html/rfc4253#section-6.1, although since PuTTy
- // uses 0x4000, that's what will be used here, as well.
- $packet_size = 0x4000;
-
- $packet = Strings::packSSH2(
- 'CsN3',
- NET_SSH2_MSG_CHANNEL_OPEN,
- 'session',
- self::CHANNEL_EXEC,
- $this->window_size_server_to_client[self::CHANNEL_EXEC],
- $packet_size
- );
- $this->send_binary_packet($packet);
-
- $this->channel_status[self::CHANNEL_EXEC] = NET_SSH2_MSG_CHANNEL_OPEN;
-
- $this->get_channel_packet(self::CHANNEL_EXEC);
+ $this->openChannel(self::CHANNEL_EXEC);
if ($this->request_pty === true) {
$terminal_modes = pack('C', NET_SSH2_TTY_OP_END);
@@ -2779,8 +2807,6 @@ public function exec($command, callable $callback = null)
$this->disconnect_helper(NET_SSH2_DISCONNECT_BY_APPLICATION);
throw new \RuntimeException('Unable to request pseudo-terminal');
}
-
- $this->in_request_pty_exec = true;
}
// sending a pty-req SSH_MSG_CHANNEL_REQUEST message is unnecessary and, in fact, in most cases, slows things
@@ -2810,7 +2836,8 @@ public function exec($command, callable $callback = null)
$this->channel_status[self::CHANNEL_EXEC] = NET_SSH2_MSG_CHANNEL_DATA;
- if ($this->in_request_pty_exec) {
+ if ($this->request_pty === true) {
+ $this->channel_id_last_interactive = self::CHANNEL_EXEC;
return true;
}
@@ -2836,37 +2863,80 @@ public function exec($command, callable $callback = null)
}
/**
- * Creates an interactive shell
+ * How many channels are currently open?
*
- * @see self::read()
- * @see self::write()
+ * @return int
+ */
+ public function getOpenChannelCount()
+ {
+ return $this->channelCount;
+ }
+
+ /**
+ * Opens a channel
+ *
+ * @param string $channel
+ * @param bool $skip_extended
* @return bool
- * @throws \UnexpectedValueException on receipt of unexpected packets
- * @throws \RuntimeException on other errors
*/
- private function initShell()
+ protected function openChannel($channel, $skip_extended = false)
{
- if ($this->in_request_pty_exec === true) {
- return true;
+ if (isset($this->channel_status[$channel]) && $this->channel_status[$channel] != NET_SSH2_MSG_CHANNEL_CLOSE) {
+ throw new \RuntimeException('Please close the channel (' . $channel . ') before trying to open it again');
+ }
+
+ $this->channelCount++;
+
+ if ($this->channelCount > 1 && $this->errorOnMultipleChannels) {
+ throw new \RuntimeException("Ubuntu's OpenSSH from 5.8 to 6.9 doesn't work with multiple channels");
}
- $this->window_size_server_to_client[self::CHANNEL_SHELL] = $this->window_size;
+ // RFC4254 defines the (client) window size as "bytes the other party can send before it must wait for the window to
+ // be adjusted". 0x7FFFFFFF is, at 2GB, the max size. technically, it should probably be decremented, but,
+ // honestly, if you're transferring more than 2GB, you probably shouldn't be using phpseclib, anyway.
+ // see http://tools.ietf.org/html/rfc4254#section-5.2 for more info
+ $this->window_size_server_to_client[$channel] = $this->window_size;
+ // 0x8000 is the maximum max packet size, per http://tools.ietf.org/html/rfc4253#section-6.1, although since PuTTy
+ // uses 0x4000, that's what will be used here, as well.
$packet_size = 0x4000;
$packet = Strings::packSSH2(
'CsN3',
NET_SSH2_MSG_CHANNEL_OPEN,
'session',
- self::CHANNEL_SHELL,
- $this->window_size_server_to_client[self::CHANNEL_SHELL],
+ $channel,
+ $this->window_size_server_to_client[$channel],
$packet_size
);
$this->send_binary_packet($packet);
- $this->channel_status[self::CHANNEL_SHELL] = NET_SSH2_MSG_CHANNEL_OPEN;
+ $this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_OPEN;
+
+ return $this->get_channel_packet($channel, $skip_extended);
+ }
+
+ /**
+ * Creates an interactive shell
+ *
+ * Returns bool(true) if the shell was opened.
+ * Returns bool(false) if the shell was already open.
+ *
+ * @see self::isShellOpen()
+ * @see self::read()
+ * @see self::write()
+ * @return bool
+ * @throws InsufficientSetupException if not authenticated
+ * @throws \UnexpectedValueException on receipt of unexpected packets
+ * @throws \RuntimeException on other errors
+ */
+ public function openShell()
+ {
+ if (!$this->isAuthenticated()) {
+ throw new InsufficientSetupException('Operation disallowed prior to login()');
+ }
- $this->get_channel_packet(self::CHANNEL_SHELL);
+ $this->openChannel(self::CHANNEL_SHELL);
$terminal_modes = pack('C', NET_SSH2_TTY_OP_END);
$packet = Strings::packSSH2(
@@ -2907,14 +2977,18 @@ private function initShell()
$this->channel_status[self::CHANNEL_SHELL] = NET_SSH2_MSG_CHANNEL_DATA;
+ $this->channel_id_last_interactive = self::CHANNEL_SHELL;
+
$this->bitmap |= self::MASK_SHELL;
return true;
}
/**
- * Return the channel to be used with read() / write()
- *
+ * Return the channel to be used with read(), write(), and reset(), if none were specified
+ * @deprecated for lack of transparency in intended channel target, to be potentially replaced
+ * with method which guarantees open-ness of all yielded channels and throws
+ * error for multiple open channels
* @see self::read()
* @see self::write()
* @return int
@@ -2922,15 +2996,26 @@ private function initShell()
private function get_interactive_channel()
{
switch (true) {
- case $this->in_subsystem:
+ case $this->is_channel_status_data(self::CHANNEL_SUBSYSTEM):
return self::CHANNEL_SUBSYSTEM;
- case $this->in_request_pty_exec:
+ case $this->is_channel_status_data(self::CHANNEL_EXEC):
return self::CHANNEL_EXEC;
default:
return self::CHANNEL_SHELL;
}
}
+ /**
+ * Indicates the DATA status on the given channel
+ *
+ * @param int $channel The channel number to evaluate
+ * @return bool
+ */
+ private function is_channel_status_data($channel)
+ {
+ return isset($this->channel_status[$channel]) && $this->channel_status[$channel] == NET_SSH2_MSG_CHANNEL_DATA;
+ }
+
/**
* Return an available open channel
*
@@ -2987,26 +3072,41 @@ public function requestAgentForwarding()
* Returns when there's a match for $expect, which can take the form of a string literal or,
* if $mode == self::READ_REGEX, a regular expression.
*
+ * If not specifying a channel, an open interactive channel will be selected, or, if there are
+ * no open channels, an interactive shell will be created. If there are multiple open
+ * interactive channels, a legacy behavior will apply in which channel selection prioritizes
+ * an active subsystem, the exec pty, and, lastly, the shell. If using multiple interactive
+ * channels, callers are discouraged from relying on this legacy behavior and should specify
+ * the intended channel.
+ *
* @see self::write()
* @param string $expect
- * @param int $mode
+ * @param int $mode One of the self::READ_* constants
+ * @param int|null $channel Channel id returned by self::getInteractiveChannelId()
* @return string|bool|null
* @throws \RuntimeException on connection error
+ * @throws InsufficientSetupException on unexpected channel status, possibly due to closure
*/
- public function read($expect = '', $mode = self::READ_SIMPLE)
+ public function read($expect = '', $mode = self::READ_SIMPLE, $channel = null)
{
- $this->curTimeout = $this->timeout;
- $this->is_timeout = false;
-
if (!$this->isAuthenticated()) {
throw new InsufficientSetupException('Operation disallowed prior to login()');
}
- if (!($this->bitmap & self::MASK_SHELL) && !$this->initShell()) {
- throw new \RuntimeException('Unable to initiate an interactive shell session');
+ $this->curTimeout = $this->timeout;
+ $this->is_timeout = false;
+
+ if ($channel === null) {
+ $channel = $this->get_interactive_channel();
}
- $channel = $this->get_interactive_channel();
+ if (!$this->is_channel_status_data($channel) && empty($this->channel_buffers[$channel])) {
+ if ($channel != self::CHANNEL_SHELL) {
+ throw new InsufficientSetupException('Data is not available on channel');
+ } elseif (!$this->openShell()) {
+ throw new \RuntimeException('Unable to initiate an interactive shell session');
+ }
+ }
if ($mode == self::READ_NEXT) {
return $this->get_channel_packet($channel);
@@ -3024,7 +3124,6 @@ public function read($expect = '', $mode = self::READ_SIMPLE)
}
$response = $this->get_channel_packet($channel);
if ($response === true) {
- $this->in_request_pty_exec = false;
return Strings::shift($this->interactiveBuffer, strlen($this->interactiveBuffer));
}
@@ -3035,22 +3134,39 @@ public function read($expect = '', $mode = self::READ_SIMPLE)
/**
* Inputs a command into an interactive shell.
*
+ * If not specifying a channel, an open interactive channel will be selected, or, if there are
+ * no open channels, an interactive shell will be created. If there are multiple open
+ * interactive channels, a legacy behavior will apply in which channel selection prioritizes
+ * an active subsystem, the exec pty, and, lastly, the shell. If using multiple interactive
+ * channels, callers are discouraged from relying on this legacy behavior and should specify
+ * the intended channel.
+ *
* @see SSH2::read()
* @param string $cmd
+ * @param int|null $channel Channel id returned by self::getInteractiveChannelId()
* @return void
* @throws \RuntimeException on connection error
+ * @throws InsufficientSetupException on unexpected channel status, possibly due to closure
*/
- public function write($cmd)
+ public function write($cmd, $channel = null)
{
if (!$this->isAuthenticated()) {
throw new InsufficientSetupException('Operation disallowed prior to login()');
}
- if (!($this->bitmap & self::MASK_SHELL) && !$this->initShell()) {
- throw new \RuntimeException('Unable to initiate an interactive shell session');
+ if ($channel === null) {
+ $channel = $this->get_interactive_channel();
}
- $this->send_channel_packet($this->get_interactive_channel(), $cmd);
+ if (!$this->is_channel_status_data($channel)) {
+ if ($channel != self::CHANNEL_SHELL) {
+ throw new InsufficientSetupException('Data is not available on channel');
+ } elseif (!$this->openShell()) {
+ throw new \RuntimeException('Unable to initiate an interactive shell session');
+ }
+ }
+
+ $this->send_channel_packet($channel, $cmd);
}
/**
@@ -3068,22 +3184,7 @@ public function write($cmd)
*/
public function startSubsystem($subsystem)
{
- $this->window_size_server_to_client[self::CHANNEL_SUBSYSTEM] = $this->window_size;
-
- $packet = Strings::packSSH2(
- 'CsN3',
- NET_SSH2_MSG_CHANNEL_OPEN,
- 'session',
- self::CHANNEL_SUBSYSTEM,
- $this->window_size,
- 0x4000
- );
-
- $this->send_binary_packet($packet);
-
- $this->channel_status[self::CHANNEL_SUBSYSTEM] = NET_SSH2_MSG_CHANNEL_OPEN;
-
- $this->get_channel_packet(self::CHANNEL_SUBSYSTEM);
+ $this->openChannel(self::CHANNEL_SUBSYSTEM);
$packet = Strings::packSSH2(
'CNsCs',
@@ -3103,8 +3204,7 @@ public function startSubsystem($subsystem)
$this->channel_status[self::CHANNEL_SUBSYSTEM] = NET_SSH2_MSG_CHANNEL_DATA;
- $this->bitmap |= self::MASK_SHELL;
- $this->in_subsystem = true;
+ $this->channel_id_last_interactive = self::CHANNEL_SUBSYSTEM;
return true;
}
@@ -3117,8 +3217,9 @@ public function startSubsystem($subsystem)
*/
public function stopSubsystem()
{
- $this->in_subsystem = false;
- $this->close_channel(self::CHANNEL_SUBSYSTEM);
+ if ($this->isInteractiveChannelOpen(self::CHANNEL_SUBSYSTEM)) {
+ $this->close_channel(self::CHANNEL_SUBSYSTEM);
+ }
return true;
}
@@ -3127,10 +3228,23 @@ public function stopSubsystem()
*
* If read() timed out you might want to just close the channel and have it auto-restart on the next read() call
*
+ * If not specifying a channel, an open interactive channel will be selected. If there are
+ * multiple open interactive channels, a legacy behavior will apply in which channel selection
+ * prioritizes an active subsystem, the exec pty, and, lastly, the shell. If using multiple
+ * interactive channels, callers are discouraged from relying on this legacy behavior and
+ * should specify the intended channel.
+ *
+ * @param int|null $channel Channel id returned by self::getInteractiveChannelId()
+ * @return void
*/
- public function reset()
+ public function reset($channel = null)
{
- $this->close_channel($this->get_interactive_channel());
+ if ($channel === null) {
+ $channel = $this->get_interactive_channel();
+ }
+ if ($this->isInteractiveChannelOpen($channel)) {
+ $this->close_channel($channel);
+ }
}
/**
@@ -3176,7 +3290,7 @@ public function __destruct()
*/
public function isConnected()
{
- return (bool) ($this->bitmap & self::MASK_CONNECTED);
+ return ($this->bitmap & self::MASK_CONNECTED) && is_resource($this->fsock) && !feof($this->fsock);
}
/**
@@ -3189,6 +3303,49 @@ public function isAuthenticated()
return (bool) ($this->bitmap & self::MASK_LOGIN);
}
+ /**
+ * Is the interactive shell active?
+ *
+ * @return bool
+ */
+ public function isShellOpen()
+ {
+ return $this->isInteractiveChannelOpen(self::CHANNEL_SHELL);
+ }
+
+ /**
+ * Is the exec pty active?
+ *
+ * @return bool
+ */
+ public function isPTYOpen()
+ {
+ return $this->isInteractiveChannelOpen(self::CHANNEL_EXEC);
+ }
+
+ /**
+ * Is the given interactive channel active?
+ *
+ * @param int $channel Channel id returned by self::getInteractiveChannelId()
+ * @return bool
+ */
+ public function isInteractiveChannelOpen($channel)
+ {
+ return $this->isAuthenticated() && $this->is_channel_status_data($channel);
+ }
+
+ /**
+ * Returns a channel identifier, presently of the last interactive channel opened, regardless of current status.
+ * Returns 0 if no interactive channel has been opened.
+ *
+ * @see self::isInteractiveChannelOpen()
+ * @return int
+ */
+ public function getInteractiveChannelId()
+ {
+ return $this->channel_id_last_interactive;
+ }
+
/**
* Pings a server connection, or tries to reconnect if the connection has gone down
*
@@ -3205,23 +3362,8 @@ public function ping()
return false;
}
- $this->window_size_server_to_client[self::CHANNEL_KEEP_ALIVE] = $this->window_size;
- $packet_size = 0x4000;
- $packet = Strings::packSSH2(
- 'CsN3',
- NET_SSH2_MSG_CHANNEL_OPEN,
- 'session',
- self::CHANNEL_KEEP_ALIVE,
- $this->window_size_server_to_client[self::CHANNEL_KEEP_ALIVE],
- $packet_size
- );
-
try {
- $this->send_binary_packet($packet);
-
- $this->channel_status[self::CHANNEL_KEEP_ALIVE] = NET_SSH2_MSG_CHANNEL_OPEN;
-
- $response = $this->get_channel_packet(self::CHANNEL_KEEP_ALIVE);
+ $this->openChannel(self::CHANNEL_KEEP_ALIVE);
} catch (\RuntimeException $e) {
return $this->reconnect();
}
@@ -3283,9 +3425,9 @@ private function get_binary_packet($skip_channel_filter = false)
if (!$this->curTimeout) {
if ($this->keepAlive <= 0) {
- @stream_select($read, $write, $except, null);
+ static::stream_select($read, $write, $except, null);
} else {
- if (!@stream_select($read, $write, $except, $this->keepAlive)) {
+ if (!static::stream_select($read, $write, $except, $this->keepAlive)) {
$this->send_binary_packet(pack('CN', NET_SSH2_MSG_IGNORE, 0));
return $this->get_binary_packet(true);
}
@@ -3299,7 +3441,7 @@ private function get_binary_packet($skip_channel_filter = false)
$start = microtime(true);
if ($this->keepAlive > 0 && $this->keepAlive < $this->curTimeout) {
- if (!@stream_select($read, $write, $except, $this->keepAlive)) {
+ if (!static::stream_select($read, $write, $except, $this->keepAlive)) {
$this->send_binary_packet(pack('CN', NET_SSH2_MSG_IGNORE, 0));
$elapsed = microtime(true) - $start;
$this->curTimeout -= $elapsed;
@@ -3313,7 +3455,7 @@ private function get_binary_packet($skip_channel_filter = false)
$usec = (int) (1000000 * ($this->curTimeout - $sec));
// this can return a "stream_select(): unable to select [4]: Interrupted system call" error
- if (!@stream_select($read, $write, $except, $sec, $usec)) {
+ if (!static::stream_select($read, $write, $except, $sec, $usec)) {
$this->is_timeout = true;
return true;
}
@@ -3504,7 +3646,7 @@ private function get_binary_packet($skip_channel_filter = false)
if (defined('NET_SSH2_LOGGING')) {
$current = microtime(true);
- $message_number = isset($this->message_numbers[ord($payload[0])]) ? $this->message_numbers[ord($payload[0])] : 'UNKNOWN (' . ord($payload[0]) . ')';
+ $message_number = isset(self::$message_numbers[ord($payload[0])]) ? self::$message_numbers[ord($payload[0])] : 'UNKNOWN (' . ord($payload[0]) . ')';
$message_number = '<- ' . $message_number .
' (since last: ' . round($current - $this->last_packet, 4) . ', network: ' . round($stop - $start, 4) . 's)';
$this->append_log($message_number, $payload);
@@ -3586,7 +3728,7 @@ private function filter($payload, $skip_channel_filter)
case NET_SSH2_MSG_DISCONNECT:
Strings::shift($payload, 1);
list($reason_code, $message) = Strings::unpackSSH2('Ns', $payload);
- $this->errors[] = 'SSH_MSG_DISCONNECT: ' . $this->disconnect_reasons[$reason_code] . "\r\n$message";
+ $this->errors[] = 'SSH_MSG_DISCONNECT: ' . self::$disconnect_reasons[$reason_code] . "\r\n$message";
$this->bitmap = 0;
return false;
case NET_SSH2_MSG_IGNORE:
@@ -3773,9 +3915,8 @@ public function enablePTY()
*/
public function disablePTY()
{
- if ($this->in_request_pty_exec) {
+ if ($this->isPTYOpen()) {
$this->close_channel(self::CHANNEL_EXEC);
- $this->in_request_pty_exec = false;
}
$this->request_pty = false;
}
@@ -3801,6 +3942,7 @@ public function isPTYEnabled()
* - if the connection times out
* - if the channel status is CHANNEL_OPEN and the response was CHANNEL_OPEN_CONFIRMATION
* - if the channel status is CHANNEL_REQUEST and the response was CHANNEL_SUCCESS
+ * - if the channel status is CHANNEL_CLOSE and the response was CHANNEL_CLOSE
*
* bool(false) is returned if:
*
@@ -3968,7 +4110,10 @@ protected function get_channel_packet($client_channel, $skip_extended = false)
throw new \RuntimeException('Unable to fulfill channel request');
}
case NET_SSH2_MSG_CHANNEL_CLOSE:
- return $type == NET_SSH2_MSG_CHANNEL_CLOSE ? true : $this->get_channel_packet($client_channel, $skip_extended);
+ if ($client_channel == $channel && $type == NET_SSH2_MSG_CHANNEL_CLOSE) {
+ return true;
+ }
+ return $this->get_channel_packet($client_channel, $skip_extended);
}
}
@@ -4003,14 +4148,15 @@ protected function get_channel_packet($client_channel, $skip_extended = false)
case NET_SSH2_MSG_CHANNEL_CLOSE:
$this->curTimeout = 5;
- if ($this->bitmap & self::MASK_SHELL) {
- $this->bitmap &= ~self::MASK_SHELL;
- }
+ $this->close_channel_bitmap($channel);
+
if ($this->channel_status[$channel] != NET_SSH2_MSG_CHANNEL_EOF) {
$this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$channel]));
}
$this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_CLOSE;
+ $this->channelCount--;
+
if ($client_channel == $channel) {
return true;
}
@@ -4157,7 +4303,7 @@ protected function send_binary_packet($data, $logged = null)
if (defined('NET_SSH2_LOGGING')) {
$current = microtime(true);
- $message_number = isset($this->message_numbers[ord($logged[0])]) ? $this->message_numbers[ord($logged[0])] : 'UNKNOWN (' . ord($logged[0]) . ')';
+ $message_number = isset(self::$message_numbers[ord($logged[0])]) ? self::$message_numbers[ord($logged[0])] : 'UNKNOWN (' . ord($logged[0]) . ')';
$message_number = '-> ' . $message_number .
' (since last: ' . round($current - $this->last_packet, 4) . ', network: ' . round($stop - $start, 4) . 's)';
$this->append_log($message_number, $logged);
@@ -4166,7 +4312,10 @@ protected function send_binary_packet($data, $logged = null)
if (strlen($packet) != $sent) {
$this->bitmap = 0;
- throw new \RuntimeException("Only $sent of " . strlen($packet) . " bytes were sent");
+ $message = $sent === false ?
+ 'Unable to write ' . strlen($packet) . ' bytes' :
+ "Only $sent of " . strlen($packet) . " bytes were sent";
+ throw new \RuntimeException($message);
}
}
@@ -4342,22 +4491,36 @@ private function close_channel($client_channel, $want_reply = false)
}
$this->channel_status[$client_channel] = NET_SSH2_MSG_CHANNEL_CLOSE;
+ $this->channelCount--;
$this->curTimeout = 5;
while (!is_bool($this->get_channel_packet($client_channel))) {
}
- if ($this->is_timeout) {
- $this->disconnect();
- }
-
if ($want_reply) {
$this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$client_channel]));
}
- if ($this->bitmap & self::MASK_SHELL) {
- $this->bitmap &= ~self::MASK_SHELL;
+ $this->close_channel_bitmap($client_channel);
+ }
+
+ /**
+ * Maintains execution state bitmap in response to channel closure
+ *
+ * @param int $client_channel The channel number to maintain closure status of
+ * @return void
+ */
+ private function close_channel_bitmap($client_channel)
+ {
+ switch ($client_channel) {
+ case self::CHANNEL_SHELL:
+ // Shell status has been maintained in the bitmap for backwards
+ // compatibility sake, but can be removed going forward
+ if ($this->bitmap & self::MASK_SHELL) {
+ $this->bitmap &= ~self::MASK_SHELL;
+ }
+ break;
}
}
@@ -4395,7 +4558,7 @@ protected function disconnect_helper($reason)
* @param mixed[] ...$args
* @access protected
*/
- protected function define_array(...$args)
+ protected static function define_array(...$args)
{
foreach ($args as $arg) {
foreach ($arg as $key => $value) {
@@ -4800,6 +4963,14 @@ public function getAlgorithmsNegotiated()
];
}
+ /**
+ * Force multiple channels (even if phpseclib has decided to disable them)
+ */
+ public function forceMultipleChannels()
+ {
+ $this->errorOnMultipleChannels = false;
+ }
+
/**
* Allows you to set the terminal
*
diff --git a/lib/Google/vendor/psr/cache/src/CacheItemInterface.php b/lib/Google/vendor/psr/cache/src/CacheItemInterface.php
index 5e736e382..893315e6e 100644
--- a/lib/Google/vendor/psr/cache/src/CacheItemInterface.php
+++ b/lib/Google/vendor/psr/cache/src/CacheItemInterface.php
@@ -86,7 +86,7 @@ public function set(mixed $value);
* @return static
* The called object.
*/
- public function expiresAt($expiration);
+ public function expiresAt(?\DateTimeInterface $expiration);
/**
* Sets the expiration time for this cache item.
@@ -101,5 +101,5 @@ public function expiresAt($expiration);
* @return static
* The called object.
*/
- public function expiresAfter($time);
+ public function expiresAfter(int|\DateInterval|null $time);
}
diff --git a/lib/Google/vendor/psr/http-client/CHANGELOG.md b/lib/Google/vendor/psr/http-client/CHANGELOG.md
index e2dc25f51..babba7c7b 100644
--- a/lib/Google/vendor/psr/http-client/CHANGELOG.md
+++ b/lib/Google/vendor/psr/http-client/CHANGELOG.md
@@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file, in reverse chronological order by release.
+## 1.0.3
+
+Add `source` link in composer.json. No code changes.
+
+## 1.0.2
+
+Allow PSR-7 (psr/http-message) 2.0. No code changes.
+
## 1.0.1
Allow installation with PHP 8. No code changes.
diff --git a/lib/Google/vendor/psr/http-client/composer.json b/lib/Google/vendor/psr/http-client/composer.json
index e4cab2f3e..6fed350be 100644
--- a/lib/Google/vendor/psr/http-client/composer.json
+++ b/lib/Google/vendor/psr/http-client/composer.json
@@ -10,6 +10,9 @@
"homepage": "https://www.php-fig.org/"
}
],
+ "support": {
+ "source": "https://github.com/php-fig/http-client"
+ },
"require": {
"php": "^7.0 || ^8.0",
"psr/http-message": "^1.0 || ^2.0"
diff --git a/lib/Google/vendor/psr/http-message/composer.json b/lib/Google/vendor/psr/http-message/composer.json
index 56e8c0a6d..c66e5aba4 100644
--- a/lib/Google/vendor/psr/http-message/composer.json
+++ b/lib/Google/vendor/psr/http-message/composer.json
@@ -7,7 +7,7 @@
"authors": [
{
"name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "homepage": "https://www.php-fig.org/"
}
],
"require": {
@@ -20,7 +20,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "2.0.x-dev"
}
}
}
diff --git a/lib/Google/vendor/psr/http-message/src/MessageInterface.php b/lib/Google/vendor/psr/http-message/src/MessageInterface.php
index 8cdb4ed63..a83c98518 100644
--- a/lib/Google/vendor/psr/http-message/src/MessageInterface.php
+++ b/lib/Google/vendor/psr/http-message/src/MessageInterface.php
@@ -1,7 +1,5 @@
data[$offset]);
}
@@ -80,12 +82,13 @@ public function offsetExists(mixed $offset): bool
*
* @param array-key $offset The offset for which a value should be returned.
*
- * @return T the value stored at the offset, or null if the offset
+ * @return T|null the value stored at the offset, or null if the offset
* does not exist.
*/
- public function offsetGet(mixed $offset): mixed
+ #[\ReturnTypeWillChange] // phpcs:ignore
+ public function offsetGet($offset)
{
- return $this->data[$offset];
+ return $this->data[$offset] ?? null;
}
/**
@@ -93,11 +96,12 @@ public function offsetGet(mixed $offset): mixed
*
* @link http://php.net/manual/en/arrayaccess.offsetset.php ArrayAccess::offsetSet()
*
- * @param array-key | null $offset The offset to set. If `null`, the value
- * may be set at a numerically-indexed offset.
+ * @param array-key|null $offset The offset to set. If `null`, the value may be
+ * set at a numerically-indexed offset.
* @param T $value The value to set at the given offset.
*/
- public function offsetSet(mixed $offset, mixed $value): void
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function offsetSet($offset, $value): void
{
if ($offset === null) {
$this->data[] = $value;
@@ -113,11 +117,25 @@ public function offsetSet(mixed $offset, mixed $value): void
*
* @param array-key $offset The offset to remove from the array.
*/
- public function offsetUnset(mixed $offset): void
+ public function offsetUnset($offset): void
{
unset($this->data[$offset]);
}
+ /**
+ * Returns a serialized string representation of this array object.
+ *
+ * @deprecated The Serializable interface will go away in PHP 9.
+ *
+ * @link http://php.net/manual/en/serializable.serialize.php Serializable::serialize()
+ *
+ * @return string a PHP serialized string.
+ */
+ public function serialize(): string
+ {
+ return serialize($this->data);
+ }
+
/**
* Returns data suitable for PHP serialization.
*
@@ -131,6 +149,25 @@ public function __serialize(): array
return $this->data;
}
+ /**
+ * Converts a serialized string representation into an instance object.
+ *
+ * @deprecated The Serializable interface will go away in PHP 9.
+ *
+ * @link http://php.net/manual/en/serializable.unserialize.php Serializable::unserialize()
+ *
+ * @param string $serialized A PHP serialized string to unserialize.
+ *
+ * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ */
+ public function unserialize($serialized): void
+ {
+ /** @var array $data */
+ $data = unserialize($serialized, ['allowed_classes' => false]);
+
+ $this->data = $data;
+ }
+
/**
* Adds unserialized data to the object.
*
@@ -166,6 +203,6 @@ public function toArray(): array
public function isEmpty(): bool
{
- return $this->data === [];
+ return count($this->data) === 0;
}
}
diff --git a/lib/Google/vendor/ramsey/collection/src/AbstractCollection.php b/lib/Google/vendor/ramsey/collection/src/AbstractCollection.php
index 8cb21ec02..38ef7144c 100644
--- a/lib/Google/vendor/ramsey/collection/src/AbstractCollection.php
+++ b/lib/Google/vendor/ramsey/collection/src/AbstractCollection.php
@@ -17,27 +17,27 @@
use Closure;
use Ramsey\Collection\Exception\CollectionMismatchException;
use Ramsey\Collection\Exception\InvalidArgumentException;
-use Ramsey\Collection\Exception\InvalidPropertyOrMethod;
-use Ramsey\Collection\Exception\NoSuchElementException;
-use Ramsey\Collection\Exception\UnsupportedOperationException;
+use Ramsey\Collection\Exception\InvalidSortOrderException;
+use Ramsey\Collection\Exception\OutOfBoundsException;
use Ramsey\Collection\Tool\TypeTrait;
use Ramsey\Collection\Tool\ValueExtractorTrait;
use Ramsey\Collection\Tool\ValueToStringTrait;
use function array_filter;
-use function array_key_first;
-use function array_key_last;
use function array_map;
use function array_merge;
-use function array_reduce;
use function array_search;
use function array_udiff;
use function array_uintersect;
+use function current;
+use function end;
use function in_array;
use function is_int;
use function is_object;
+use function reset;
use function spl_object_id;
use function sprintf;
+use function unserialize;
use function usort;
/**
@@ -55,24 +55,27 @@ abstract class AbstractCollection extends AbstractArray implements CollectionInt
use ValueExtractorTrait;
/**
- * @throws InvalidArgumentException if $element is of the wrong type.
+ * @inheritDoc
*/
- public function add(mixed $element): bool
+ public function add($element): bool
{
$this[] = $element;
return true;
}
- public function contains(mixed $element, bool $strict = true): bool
+ /**
+ * @inheritDoc
+ */
+ public function contains($element, bool $strict = true): bool
{
return in_array($element, $this->data, $strict);
}
/**
- * @throws InvalidArgumentException if $element is of the wrong type.
+ * @inheritDoc
*/
- public function offsetSet(mixed $offset, mixed $value): void
+ public function offsetSet($offset, $value): void
{
if ($this->checkType($this->getType(), $value) === false) {
throw new InvalidArgumentException(
@@ -88,7 +91,10 @@ public function offsetSet(mixed $offset, mixed $value): void
}
}
- public function remove(mixed $element): bool
+ /**
+ * @inheritDoc
+ */
+ public function remove($element): bool
{
if (($position = array_search($element, $this->data, true)) !== false) {
unset($this[$position]);
@@ -100,11 +106,6 @@ public function remove(mixed $element): bool
}
/**
- * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist
- * on the elements in this collection.
- * @throws UnsupportedOperationException if unable to call column() on this
- * collection.
- *
* @inheritDoc
*/
public function column(string $propertyOrMethod): array
@@ -112,55 +113,55 @@ public function column(string $propertyOrMethod): array
$temp = [];
foreach ($this->data as $item) {
+ /** @var mixed $value */
+ $value = $this->extractValue($item, $propertyOrMethod);
+
/** @psalm-suppress MixedAssignment */
- $temp[] = $this->extractValue($item, $propertyOrMethod);
+ $temp[] = $value;
}
return $temp;
}
/**
- * @return T
- *
- * @throws NoSuchElementException if this collection is empty.
+ * @inheritDoc
*/
- public function first(): mixed
+ public function first()
{
- $firstIndex = array_key_first($this->data);
-
- if ($firstIndex === null) {
- throw new NoSuchElementException('Can\'t determine first item. Collection is empty');
+ if ($this->isEmpty()) {
+ throw new OutOfBoundsException('Can\'t determine first item. Collection is empty');
}
- return $this->data[$firstIndex];
+ reset($this->data);
+
+ /** @var T $first */
+ $first = current($this->data);
+
+ return $first;
}
/**
- * @return T
- *
- * @throws NoSuchElementException if this collection is empty.
+ * @inheritDoc
*/
- public function last(): mixed
+ public function last()
{
- $lastIndex = array_key_last($this->data);
-
- if ($lastIndex === null) {
- throw new NoSuchElementException('Can\'t determine last item. Collection is empty');
+ if ($this->isEmpty()) {
+ throw new OutOfBoundsException('Can\'t determine last item. Collection is empty');
}
- return $this->data[$lastIndex];
+ /** @var T $item */
+ $item = end($this->data);
+ reset($this->data);
+
+ return $item;
}
- /**
- * @return CollectionInterface
- *
- * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist
- * on the elements in this collection.
- * @throws UnsupportedOperationException if unable to call sort() on this
- * collection.
- */
- public function sort(?string $propertyOrMethod = null, Sort $order = Sort::Ascending): CollectionInterface
+ public function sort(string $propertyOrMethod, string $order = self::SORT_ASC): CollectionInterface
{
+ if (!in_array($order, [self::SORT_ASC, self::SORT_DESC], true)) {
+ throw new InvalidSortOrderException('Invalid sort order given: ' . $order);
+ }
+
$collection = clone $this;
usort(
@@ -169,25 +170,20 @@ public function sort(?string $propertyOrMethod = null, Sort $order = Sort::Ascen
* @param T $a
* @param T $b
*/
- function (mixed $a, mixed $b) use ($propertyOrMethod, $order): int {
+ function ($a, $b) use ($propertyOrMethod, $order): int {
/** @var mixed $aValue */
$aValue = $this->extractValue($a, $propertyOrMethod);
/** @var mixed $bValue */
$bValue = $this->extractValue($b, $propertyOrMethod);
- return ($aValue <=> $bValue) * ($order === Sort::Descending ? -1 : 1);
+ return ($aValue <=> $bValue) * ($order === self::SORT_DESC ? -1 : 1);
},
);
return $collection;
}
- /**
- * @param callable(T): bool $callback A callable to use for filtering elements.
- *
- * @return CollectionInterface
- */
public function filter(callable $callback): CollectionInterface
{
$collection = clone $this;
@@ -197,66 +193,23 @@ public function filter(callable $callback): CollectionInterface
}
/**
- * @return CollectionInterface
- *
- * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist
- * on the elements in this collection.
- * @throws UnsupportedOperationException if unable to call where() on this
- * collection.
+ * {@inheritdoc}
*/
- public function where(?string $propertyOrMethod, mixed $value): CollectionInterface
+ public function where(string $propertyOrMethod, $value): CollectionInterface
{
- return $this->filter(
- /**
- * @param T $item
- */
- function (mixed $item) use ($propertyOrMethod, $value): bool {
- /** @var mixed $accessorValue */
- $accessorValue = $this->extractValue($item, $propertyOrMethod);
+ return $this->filter(function ($item) use ($propertyOrMethod, $value) {
+ /** @var mixed $accessorValue */
+ $accessorValue = $this->extractValue($item, $propertyOrMethod);
- return $accessorValue === $value;
- },
- );
+ return $accessorValue === $value;
+ });
}
- /**
- * @param callable(T): TCallbackReturn $callback A callable to apply to each
- * item of the collection.
- *
- * @return CollectionInterface
- *
- * @template TCallbackReturn
- */
public function map(callable $callback): CollectionInterface
{
- /** @var Collection */
return new Collection('mixed', array_map($callback, $this->data));
}
- /**
- * @param callable(TCarry, T): TCarry $callback A callable to apply to each
- * item of the collection to reduce it to a single value.
- * @param TCarry $initial This is the initial value provided to the callback.
- *
- * @return TCarry
- *
- * @template TCarry
- */
- public function reduce(callable $callback, mixed $initial): mixed
- {
- /** @var TCarry */
- return array_reduce($this->data, $callback, $initial);
- }
-
- /**
- * @param CollectionInterface $other The collection to check for divergent
- * items.
- *
- * @return CollectionInterface
- *
- * @throws CollectionMismatchException if the compared collections are of
- * differing types.
- */
public function diff(CollectionInterface $other): CollectionInterface
{
$this->compareCollectionTypes($other);
@@ -273,15 +226,6 @@ public function diff(CollectionInterface $other): CollectionInterface
return $collection;
}
- /**
- * @param CollectionInterface $other The collection to check for
- * intersecting items.
- *
- * @return CollectionInterface
- *
- * @throws CollectionMismatchException if the compared collections are of
- * differing types.
- */
public function intersect(CollectionInterface $other): CollectionInterface
{
$this->compareCollectionTypes($other);
@@ -295,15 +239,6 @@ public function intersect(CollectionInterface $other): CollectionInterface
return $collection;
}
- /**
- * @param CollectionInterface ...$collections The collections to merge.
- *
- * @return CollectionInterface
- *
- * @throws CollectionMismatchException if unable to merge any of the given
- * collections or items within the given collections due to type
- * mismatch errors.
- */
public function merge(CollectionInterface ...$collections): CollectionInterface
{
$mergedCollection = clone $this;
@@ -339,10 +274,19 @@ public function merge(CollectionInterface ...$collections): CollectionInterface
return $mergedCollection;
}
+ /**
+ * @inheritDoc
+ */
+ public function unserialize($serialized): void
+ {
+ /** @var array $data */
+ $data = unserialize($serialized, ['allowed_classes' => [$this->getType()]]);
+
+ $this->data = $data;
+ }
+
/**
* @param CollectionInterface $other
- *
- * @throws CollectionMismatchException
*/
private function compareCollectionTypes(CollectionInterface $other): void
{
@@ -363,7 +307,7 @@ private function getComparator(): Closure
* @param T $a
* @param T $b
*/
- function (mixed $a, mixed $b): int {
+ function ($a, $b): int {
// If the two values are object, we convert them to unique scalars.
// If the collection contains mixed values (unlikely) where some are objects
// and some are not, we leave them as they are.
@@ -383,11 +327,15 @@ function (mixed $a, mixed $b): int {
*/
private function getUniformType(CollectionInterface $collection): string
{
- return match ($collection->getType()) {
- 'integer' => 'int',
- 'boolean' => 'bool',
- 'double' => 'float',
- default => $collection->getType(),
- };
+ switch ($collection->getType()) {
+ case 'integer':
+ return 'int';
+ case 'boolean':
+ return 'bool';
+ case 'double':
+ return 'float';
+ default:
+ return $collection->getType();
+ }
}
}
diff --git a/lib/Google/vendor/ramsey/collection/src/AbstractSet.php b/lib/Google/vendor/ramsey/collection/src/AbstractSet.php
index 7186939d7..1126ccb0a 100644
--- a/lib/Google/vendor/ramsey/collection/src/AbstractSet.php
+++ b/lib/Google/vendor/ramsey/collection/src/AbstractSet.php
@@ -24,7 +24,10 @@
*/
abstract class AbstractSet extends AbstractCollection
{
- public function add(mixed $element): bool
+ /**
+ * @inheritDoc
+ */
+ public function add($element): bool
{
if ($this->contains($element)) {
return false;
@@ -33,7 +36,10 @@ public function add(mixed $element): bool
return parent::add($element);
}
- public function offsetSet(mixed $offset, mixed $value): void
+ /**
+ * @inheritDoc
+ */
+ public function offsetSet($offset, $value): void
{
if ($this->contains($value)) {
return;
diff --git a/lib/Google/vendor/ramsey/collection/src/ArrayInterface.php b/lib/Google/vendor/ramsey/collection/src/ArrayInterface.php
index bc7f6f424..27af6102b 100644
--- a/lib/Google/vendor/ramsey/collection/src/ArrayInterface.php
+++ b/lib/Google/vendor/ramsey/collection/src/ArrayInterface.php
@@ -17,6 +17,7 @@
use ArrayAccess;
use Countable;
use IteratorAggregate;
+use Serializable;
/**
* `ArrayInterface` provides traversable array functionality to data types.
@@ -28,7 +29,8 @@
interface ArrayInterface extends
ArrayAccess,
Countable,
- IteratorAggregate
+ IteratorAggregate,
+ Serializable
{
/**
* Removes all items from this array.
diff --git a/lib/Google/vendor/ramsey/collection/src/Collection.php b/lib/Google/vendor/ramsey/collection/src/Collection.php
index 44d26bf2e..532b971b6 100644
--- a/lib/Google/vendor/ramsey/collection/src/Collection.php
+++ b/lib/Google/vendor/ramsey/collection/src/Collection.php
@@ -75,16 +75,25 @@
*/
class Collection extends AbstractCollection
{
+ /**
+ * The type of elements stored in this collection.
+ *
+ * A collection's type is immutable once it is set. For this reason, this
+ * property is set private.
+ */
+ private string $collectionType;
+
/**
* Constructs a collection object of the specified type, optionally with the
* specified data.
*
- * @param string $collectionType The type or class name associated with this
+ * @param string $collectionType The type (FQCN) associated with this
* collection.
* @param array $data The initial items to store in the collection.
*/
- public function __construct(private readonly string $collectionType, array $data = [])
+ public function __construct(string $collectionType, array $data = [])
{
+ $this->collectionType = $collectionType;
parent::__construct($data);
}
diff --git a/lib/Google/vendor/ramsey/collection/src/CollectionInterface.php b/lib/Google/vendor/ramsey/collection/src/CollectionInterface.php
index e3ad01470..9f86a2837 100644
--- a/lib/Google/vendor/ramsey/collection/src/CollectionInterface.php
+++ b/lib/Google/vendor/ramsey/collection/src/CollectionInterface.php
@@ -14,14 +14,8 @@
namespace Ramsey\Collection;
-use Ramsey\Collection\Exception\CollectionMismatchException;
-use Ramsey\Collection\Exception\InvalidArgumentException;
-use Ramsey\Collection\Exception\InvalidPropertyOrMethod;
-use Ramsey\Collection\Exception\NoSuchElementException;
-use Ramsey\Collection\Exception\UnsupportedOperationException;
-
/**
- * A collection represents a group of values, known as its elements.
+ * A collection represents a group of objects, known as its elements.
*
* Some collections allow duplicate elements and others do not. Some are ordered
* and others unordered.
@@ -31,6 +25,16 @@
*/
interface CollectionInterface extends ArrayInterface
{
+ /**
+ * Ascending sort type.
+ */
+ public const SORT_ASC = 'asc';
+
+ /**
+ * Descending sort type.
+ */
+ public const SORT_DESC = 'desc';
+
/**
* Ensures that this collection contains the specified element (optional
* operation).
@@ -54,11 +58,9 @@ interface CollectionInterface extends ArrayInterface
* @param T $element The element to add to the collection.
*
* @return bool `true` if this collection changed as a result of the call.
- *
- * @throws InvalidArgumentException if the collection refuses to add the
- * $element for any reason other than that it already contains the element.
*/
- public function add(mixed $element): bool;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function add($element): bool;
/**
* Returns `true` if this collection contains the specified element.
@@ -66,7 +68,8 @@ public function add(mixed $element): bool;
* @param T $element The element to check whether the collection contains.
* @param bool $strict Whether to perform a strict type check on the value.
*/
- public function contains(mixed $element, bool $strict = true): bool;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function contains($element, bool $strict = true): bool;
/**
* Returns the type associated with this collection.
@@ -81,20 +84,15 @@ public function getType(): string;
*
* @return bool `true` if an element was removed as a result of this call.
*/
- public function remove(mixed $element): bool;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function remove($element): bool;
/**
- * Returns the values from the given property, method, or array key.
- *
- * @param string $propertyOrMethod The name of the property, method, or
- * array key to evaluate and return.
+ * Returns the values from the given property or method.
*
- * @return array
+ * @param string $propertyOrMethod The property or method name to filter by.
*
- * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist
- * on the elements in this collection.
- * @throws UnsupportedOperationException if unable to call column() on this
- * collection.
+ * @return list
*/
public function column(string $propertyOrMethod): array;
@@ -102,41 +100,29 @@ public function column(string $propertyOrMethod): array;
* Returns the first item of the collection.
*
* @return T
- *
- * @throws NoSuchElementException if this collection is empty.
*/
- public function first(): mixed;
+ public function first();
/**
* Returns the last item of the collection.
*
* @return T
- *
- * @throws NoSuchElementException if this collection is empty.
*/
- public function last(): mixed;
+ public function last();
/**
- * Sort the collection by a property, method, or array key with the given
- * sort order.
- *
- * If $propertyOrMethod is `null`, this will sort by comparing each element.
+ * Sort the collection by a property or method with the given sort order.
*
* This will always leave the original collection untouched and will return
* a new one.
*
- * @param string | null $propertyOrMethod The property, method, or array key
- * to sort by.
- * @param Sort $order The sort order for the resulting collection.
+ * @param string $propertyOrMethod The property or method to sort by.
+ * @param string $order The sort order for the resulting collection (one of
+ * this interface's `SORT_*` constants).
*
* @return CollectionInterface
- *
- * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist
- * on the elements in this collection.
- * @throws UnsupportedOperationException if unable to call sort() on this
- * collection.
*/
- public function sort(?string $propertyOrMethod = null, Sort $order = Sort::Ascending): self;
+ public function sort(string $propertyOrMethod, string $order = self::SORT_ASC): self;
/**
* Filter out items of the collection which don't match the criteria of
@@ -148,31 +134,25 @@ public function sort(?string $propertyOrMethod = null, Sort $order = Sort::Ascen
* See the {@link http://php.net/manual/en/function.array-filter.php PHP array_filter() documentation}
* for examples of how the `$callback` parameter works.
*
- * @param callable(T): bool $callback A callable to use for filtering elements.
+ * @param callable(T):bool $callback A callable to use for filtering elements.
*
* @return CollectionInterface
*/
public function filter(callable $callback): self;
/**
- * Create a new collection where the result of the given property, method,
- * or array key of each item in the collection equals the given value.
+ * Create a new collection where items match the criteria of given callback.
*
* This will always leave the original collection untouched and will return
* a new one.
*
- * @param string | null $propertyOrMethod The property, method, or array key
- * to evaluate. If `null`, the element itself is compared to $value.
+ * @param string $propertyOrMethod The property or method to evaluate.
* @param mixed $value The value to match.
*
* @return CollectionInterface
- *
- * @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist
- * on the elements in this collection.
- * @throws UnsupportedOperationException if unable to call where() on this
- * collection.
*/
- public function where(?string $propertyOrMethod, mixed $value): self;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function where(string $propertyOrMethod, $value): self;
/**
* Apply a given callback method on each item of the collection.
@@ -184,7 +164,7 @@ public function where(?string $propertyOrMethod, mixed $value): self;
* See the {@link http://php.net/manual/en/function.array-map.php PHP array_map() documentation}
* for examples of how the `$callback` parameter works.
*
- * @param callable(T): TCallbackReturn $callback A callable to apply to each
+ * @param callable(T):TCallbackReturn $callback A callable to apply to each
* item of the collection.
*
* @return CollectionInterface
@@ -193,23 +173,6 @@ public function where(?string $propertyOrMethod, mixed $value): self;
*/
public function map(callable $callback): self;
- /**
- * Apply a given callback method on each item of the collection
- * to reduce it to a single value.
- *
- * See the {@link http://php.net/manual/en/function.array-reduce.php PHP array_reduce() documentation}
- * for examples of how the `$callback` and `$initial` parameters work.
- *
- * @param callable(TCarry, T): TCarry $callback A callable to apply to each
- * item of the collection to reduce it to a single value.
- * @param TCarry $initial This is the initial value provided to the callback.
- *
- * @return TCarry
- *
- * @template TCarry
- */
- public function reduce(callable $callback, mixed $initial): mixed;
-
/**
* Create a new collection with divergent items between current and given
* collection.
@@ -218,9 +181,6 @@ public function reduce(callable $callback, mixed $initial): mixed;
* items.
*
* @return CollectionInterface
- *
- * @throws CollectionMismatchException if the compared collections are of
- * differing types.
*/
public function diff(CollectionInterface $other): self;
@@ -232,9 +192,6 @@ public function diff(CollectionInterface $other): self;
* intersecting items.
*
* @return CollectionInterface
- *
- * @throws CollectionMismatchException if the compared collections are of
- * differing types.
*/
public function intersect(CollectionInterface $other): self;
@@ -244,10 +201,6 @@ public function intersect(CollectionInterface $other): self;
* @param CollectionInterface ...$collections The collections to merge.
*
* @return CollectionInterface
- *
- * @throws CollectionMismatchException if unable to merge any of the given
- * collections or items within the given collections due to type
- * mismatch errors.
*/
public function merge(CollectionInterface ...$collections): self;
}
diff --git a/lib/Google/vendor/ramsey/collection/src/DoubleEndedQueue.php b/lib/Google/vendor/ramsey/collection/src/DoubleEndedQueue.php
index 62947a24f..4d1f71ea4 100644
--- a/lib/Google/vendor/ramsey/collection/src/DoubleEndedQueue.php
+++ b/lib/Google/vendor/ramsey/collection/src/DoubleEndedQueue.php
@@ -17,10 +17,6 @@
use Ramsey\Collection\Exception\InvalidArgumentException;
use Ramsey\Collection\Exception\NoSuchElementException;
-use function array_key_last;
-use function array_pop;
-use function array_unshift;
-
/**
* This class provides a basic implementation of `DoubleEndedQueueInterface`, to
* minimize the effort required to implement this interface.
@@ -32,21 +28,33 @@
class DoubleEndedQueue extends Queue implements DoubleEndedQueueInterface
{
/**
- * Constructs a double-ended queue (dequeue) object of the specified type,
- * optionally with the specified data.
- *
- * @param string $queueType The type or class name associated with this dequeue.
- * @param array $data The initial items to store in the dequeue.
+ * Index of the last element in the queue.
+ */
+ private int $tail = -1;
+
+ /**
+ * @inheritDoc
*/
- public function __construct(private readonly string $queueType, array $data = [])
+ public function offsetSet($offset, $value): void
{
- parent::__construct($this->queueType, $data);
+ if ($this->checkType($this->getType(), $value) === false) {
+ throw new InvalidArgumentException(
+ 'Value must be of type ' . $this->getType() . '; value is '
+ . $this->toolValueToString($value),
+ );
+ }
+
+ $this->tail++;
+
+ $this->data[$this->tail] = $value;
}
/**
* @throws InvalidArgumentException if $element is of the wrong type
+ *
+ * @inheritDoc
*/
- public function addFirst(mixed $element): bool
+ public function addFirst($element): bool
{
if ($this->checkType($this->getType(), $element) === false) {
throw new InvalidArgumentException(
@@ -55,112 +63,125 @@ public function addFirst(mixed $element): bool
);
}
- array_unshift($this->data, $element);
+ $this->index--;
+
+ $this->data[$this->index] = $element;
return true;
}
/**
- * @throws InvalidArgumentException if $element is of the wrong type
+ * @inheritDoc
*/
- public function addLast(mixed $element): bool
+ public function addLast($element): bool
{
return $this->add($element);
}
- public function offerFirst(mixed $element): bool
+ /**
+ * @inheritDoc
+ */
+ public function offerFirst($element): bool
{
try {
return $this->addFirst($element);
- } catch (InvalidArgumentException) {
+ } catch (InvalidArgumentException $e) {
return false;
}
}
- public function offerLast(mixed $element): bool
+ /**
+ * @inheritDoc
+ */
+ public function offerLast($element): bool
{
return $this->offer($element);
}
/**
- * @return T the first element in this queue.
- *
- * @throws NoSuchElementException if the queue is empty
+ * @inheritDoc
*/
- public function removeFirst(): mixed
+ public function removeFirst()
{
return $this->remove();
}
/**
- * @return T the last element in this queue.
- *
- * @throws NoSuchElementException if this queue is empty.
+ * @inheritDoc
*/
- public function removeLast(): mixed
+ public function removeLast()
{
- return $this->pollLast() ?? throw new NoSuchElementException(
- 'Can\'t return element from Queue. Queue is empty.',
- );
+ $tail = $this->pollLast();
+
+ if ($tail === null) {
+ throw new NoSuchElementException('Can\'t return element from Queue. Queue is empty.');
+ }
+
+ return $tail;
}
/**
- * @return T | null the head of this queue, or `null` if this queue is empty.
+ * @inheritDoc
*/
- public function pollFirst(): mixed
+ public function pollFirst()
{
return $this->poll();
}
/**
- * @return T | null the tail of this queue, or `null` if this queue is empty.
+ * @inheritDoc
*/
- public function pollLast(): mixed
+ public function pollLast()
{
- return array_pop($this->data);
+ if ($this->count() === 0) {
+ return null;
+ }
+
+ $tail = $this[$this->tail];
+
+ unset($this[$this->tail]);
+ $this->tail--;
+
+ return $tail;
}
/**
- * @return T the head of this queue.
- *
- * @throws NoSuchElementException if this queue is empty.
+ * @inheritDoc
*/
- public function firstElement(): mixed
+ public function firstElement()
{
return $this->element();
}
/**
- * @return T the tail of this queue.
- *
- * @throws NoSuchElementException if this queue is empty.
+ * @inheritDoc
*/
- public function lastElement(): mixed
+ public function lastElement()
{
- return $this->peekLast() ?? throw new NoSuchElementException(
- 'Can\'t return element from Queue. Queue is empty.',
- );
+ if ($this->count() === 0) {
+ throw new NoSuchElementException('Can\'t return element from Queue. Queue is empty.');
+ }
+
+ return $this->data[$this->tail];
}
/**
- * @return T | null the head of this queue, or `null` if this queue is empty.
+ * @inheritDoc
*/
- public function peekFirst(): mixed
+ public function peekFirst()
{
return $this->peek();
}
/**
- * @return T | null the tail of this queue, or `null` if this queue is empty.
+ * @inheritDoc
*/
- public function peekLast(): mixed
+ public function peekLast()
{
- $lastIndex = array_key_last($this->data);
-
- if ($lastIndex === null) {
+ if ($this->count() === 0) {
return null;
}
- return $this->data[$lastIndex];
+ return $this->data[$this->tail];
}
}
diff --git a/lib/Google/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php b/lib/Google/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php
index 15cc0e97b..3fa4ecab8 100644
--- a/lib/Google/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php
+++ b/lib/Google/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php
@@ -181,7 +181,8 @@ interface DoubleEndedQueueInterface extends QueueInterface
* Implementations should use a more-specific exception that extends
* `\RuntimeException`.
*/
- public function addFirst(mixed $element): bool;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function addFirst($element): bool;
/**
* Inserts the specified element at the end of this queue if it is possible
@@ -201,7 +202,8 @@ public function addFirst(mixed $element): bool;
* Implementations should use a more-specific exception that extends
* `\RuntimeException`.
*/
- public function addLast(mixed $element): bool;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function addLast($element): bool;
/**
* Inserts the specified element at the front of this queue if it is
@@ -215,7 +217,8 @@ public function addLast(mixed $element): bool;
*
* @return bool `true` if the element was added to this queue, else `false`.
*/
- public function offerFirst(mixed $element): bool;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function offerFirst($element): bool;
/**
* Inserts the specified element at the end of this queue if it is possible
@@ -229,7 +232,8 @@ public function offerFirst(mixed $element): bool;
*
* @return bool `true` if the element was added to this queue, else `false`.
*/
- public function offerLast(mixed $element): bool;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function offerLast($element): bool;
/**
* Retrieves and removes the head of this queue.
@@ -241,7 +245,7 @@ public function offerLast(mixed $element): bool;
*
* @throws NoSuchElementException if this queue is empty.
*/
- public function removeFirst(): mixed;
+ public function removeFirst();
/**
* Retrieves and removes the tail of this queue.
@@ -253,23 +257,23 @@ public function removeFirst(): mixed;
*
* @throws NoSuchElementException if this queue is empty.
*/
- public function removeLast(): mixed;
+ public function removeLast();
/**
* Retrieves and removes the head of this queue, or returns `null` if this
* queue is empty.
*
- * @return T | null the head of this queue, or `null` if this queue is empty.
+ * @return T|null the head of this queue, or `null` if this queue is empty.
*/
- public function pollFirst(): mixed;
+ public function pollFirst();
/**
* Retrieves and removes the tail of this queue, or returns `null` if this
* queue is empty.
*
- * @return T | null the tail of this queue, or `null` if this queue is empty.
+ * @return T|null the tail of this queue, or `null` if this queue is empty.
*/
- public function pollLast(): mixed;
+ public function pollLast();
/**
* Retrieves, but does not remove, the head of this queue.
@@ -281,7 +285,7 @@ public function pollLast(): mixed;
*
* @throws NoSuchElementException if this queue is empty.
*/
- public function firstElement(): mixed;
+ public function firstElement();
/**
* Retrieves, but does not remove, the tail of this queue.
@@ -293,21 +297,21 @@ public function firstElement(): mixed;
*
* @throws NoSuchElementException if this queue is empty.
*/
- public function lastElement(): mixed;
+ public function lastElement();
/**
* Retrieves, but does not remove, the head of this queue, or returns `null`
* if this queue is empty.
*
- * @return T | null the head of this queue, or `null` if this queue is empty.
+ * @return T|null the head of this queue, or `null` if this queue is empty.
*/
- public function peekFirst(): mixed;
+ public function peekFirst();
/**
* Retrieves, but does not remove, the tail of this queue, or returns `null`
* if this queue is empty.
*
- * @return T | null the tail of this queue, or `null` if this queue is empty.
+ * @return T|null the tail of this queue, or `null` if this queue is empty.
*/
- public function peekLast(): mixed;
+ public function peekLast();
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php b/lib/Google/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php
index 42f5be2df..7058bcf6e 100644
--- a/lib/Google/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php
+++ b/lib/Google/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php
@@ -19,6 +19,6 @@
/**
* Thrown when attempting to operate on collections of differing types.
*/
-class CollectionMismatchException extends RuntimeException implements CollectionException
+class CollectionMismatchException extends RuntimeException
{
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php b/lib/Google/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php
index 7b41b4a7c..dcc3eac60 100644
--- a/lib/Google/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php
+++ b/lib/Google/vendor/ramsey/collection/src/Exception/InvalidArgumentException.php
@@ -14,11 +14,9 @@
namespace Ramsey\Collection\Exception;
-use InvalidArgumentException as PhpInvalidArgumentException;
-
/**
* Thrown to indicate an argument is not of the expected type.
*/
-class InvalidArgumentException extends PhpInvalidArgumentException implements CollectionException
+class InvalidArgumentException extends \InvalidArgumentException
{
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Exception/CollectionException.php b/lib/Google/vendor/ramsey/collection/src/Exception/InvalidSortOrderException.php
similarity index 70%
rename from lib/Google/vendor/ramsey/collection/src/Exception/CollectionException.php
rename to lib/Google/vendor/ramsey/collection/src/Exception/InvalidSortOrderException.php
index 4aa92bed8..4491429c7 100644
--- a/lib/Google/vendor/ramsey/collection/src/Exception/CollectionException.php
+++ b/lib/Google/vendor/ramsey/collection/src/Exception/InvalidSortOrderException.php
@@ -14,8 +14,11 @@
namespace Ramsey\Collection\Exception;
-use Throwable;
+use RuntimeException;
-interface CollectionException extends Throwable
+/**
+ * Thrown when attempting to use a sort order that is not recognized.
+ */
+class InvalidSortOrderException extends RuntimeException
{
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Exception/NoSuchElementException.php b/lib/Google/vendor/ramsey/collection/src/Exception/NoSuchElementException.php
index cd98f0c0f..cabcb9d88 100644
--- a/lib/Google/vendor/ramsey/collection/src/Exception/NoSuchElementException.php
+++ b/lib/Google/vendor/ramsey/collection/src/Exception/NoSuchElementException.php
@@ -19,6 +19,6 @@
/**
* Thrown when attempting to access an element that does not exist.
*/
-class NoSuchElementException extends RuntimeException implements CollectionException
+class NoSuchElementException extends RuntimeException
{
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php b/lib/Google/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php
index c75294e53..4e9d16fa3 100644
--- a/lib/Google/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php
+++ b/lib/Google/vendor/ramsey/collection/src/Exception/OutOfBoundsException.php
@@ -14,11 +14,9 @@
namespace Ramsey\Collection\Exception;
-use OutOfBoundsException as PhpOutOfBoundsException;
-
/**
* Thrown when attempting to access an element out of the range of the collection.
*/
-class OutOfBoundsException extends PhpOutOfBoundsException implements CollectionException
+class OutOfBoundsException extends \OutOfBoundsException
{
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php b/lib/Google/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php
index d074f45fd..9b6228971 100644
--- a/lib/Google/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php
+++ b/lib/Google/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php
@@ -19,6 +19,6 @@
/**
* Thrown to indicate that the requested operation is not supported.
*/
-class UnsupportedOperationException extends RuntimeException implements CollectionException
+class UnsupportedOperationException extends RuntimeException
{
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Exception/InvalidPropertyOrMethod.php b/lib/Google/vendor/ramsey/collection/src/Exception/ValueExtractionException.php
similarity index 62%
rename from lib/Google/vendor/ramsey/collection/src/Exception/InvalidPropertyOrMethod.php
rename to lib/Google/vendor/ramsey/collection/src/Exception/ValueExtractionException.php
index a53be14aa..32f2a175f 100644
--- a/lib/Google/vendor/ramsey/collection/src/Exception/InvalidPropertyOrMethod.php
+++ b/lib/Google/vendor/ramsey/collection/src/Exception/ValueExtractionException.php
@@ -17,10 +17,8 @@
use RuntimeException;
/**
- * Thrown when attempting to evaluate a property, method, or array key
- * that doesn't exist on an element or cannot otherwise be evaluated in the
- * current context.
+ * Thrown when attempting to extract a value for a method or property that does not exist.
*/
-class InvalidPropertyOrMethod extends RuntimeException implements CollectionException
+class ValueExtractionException extends RuntimeException
{
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Map/AbstractMap.php b/lib/Google/vendor/ramsey/collection/src/Map/AbstractMap.php
index 7a851a80f..378807289 100644
--- a/lib/Google/vendor/ramsey/collection/src/Map/AbstractMap.php
+++ b/lib/Google/vendor/ramsey/collection/src/Map/AbstractMap.php
@@ -16,7 +16,6 @@
use Ramsey\Collection\AbstractArray;
use Ramsey\Collection\Exception\InvalidArgumentException;
-use Traversable;
use function array_key_exists;
use function array_keys;
@@ -27,37 +26,16 @@
* This class provides a basic implementation of `MapInterface`, to minimize the
* effort required to implement this interface.
*
- * @template K of array-key
* @template T
* @extends AbstractArray
- * @implements MapInterface
+ * @implements MapInterface
*/
abstract class AbstractMap extends AbstractArray implements MapInterface
{
/**
- * @param array $data The initial items to add to this map.
- */
- public function __construct(array $data = [])
- {
- parent::__construct($data);
- }
-
- /**
- * @return Traversable
- */
- public function getIterator(): Traversable
- {
- return parent::getIterator();
- }
-
- /**
- * @param K $offset The offset to set
- * @param T $value The value to set at the given offset.
- *
* @inheritDoc
- * @psalm-suppress MoreSpecificImplementedParamType,DocblockTypeContradiction
*/
- public function offsetSet(mixed $offset, mixed $value): void
+ public function offsetSet($offset, $value): void
{
if ($offset === null) {
throw new InvalidArgumentException(
@@ -69,12 +47,18 @@ public function offsetSet(mixed $offset, mixed $value): void
$this->data[$offset] = $value;
}
- public function containsKey(int | string $key): bool
+ /**
+ * @inheritDoc
+ */
+ public function containsKey($key): bool
{
return array_key_exists($key, $this->data);
}
- public function containsValue(mixed $value): bool
+ /**
+ * @inheritDoc
+ */
+ public function containsValue($value): bool
{
return in_array($value, $this->data, true);
}
@@ -88,24 +72,21 @@ public function keys(): array
}
/**
- * @param K $key The key to return from the map.
- * @param T | null $defaultValue The default value to use if `$key` is not found.
- *
- * @return T | null the value or `null` if the key could not be found.
+ * @inheritDoc
*/
- public function get(int | string $key, mixed $defaultValue = null): mixed
+ public function get($key, $defaultValue = null)
{
- return $this[$key] ?? $defaultValue;
+ if (!$this->containsKey($key)) {
+ return $defaultValue;
+ }
+
+ return $this[$key];
}
/**
- * @param K $key The key to put or replace in the map.
- * @param T $value The value to store at `$key`.
- *
- * @return T | null the previous value associated with key, or `null` if
- * there was no mapping for `$key`.
+ * @inheritDoc
*/
- public function put(int | string $key, mixed $value): mixed
+ public function put($key, $value)
{
$previousValue = $this->get($key);
$this[$key] = $value;
@@ -114,13 +95,9 @@ public function put(int | string $key, mixed $value): mixed
}
/**
- * @param K $key The key to put in the map.
- * @param T $value The value to store at `$key`.
- *
- * @return T | null the previous value associated with key, or `null` if
- * there was no mapping for `$key`.
+ * @inheritDoc
*/
- public function putIfAbsent(int | string $key, mixed $value): mixed
+ public function putIfAbsent($key, $value)
{
$currentValue = $this->get($key);
@@ -132,12 +109,9 @@ public function putIfAbsent(int | string $key, mixed $value): mixed
}
/**
- * @param K $key The key to remove from the map.
- *
- * @return T | null the previous value associated with key, or `null` if
- * there was no mapping for `$key`.
+ * @inheritDoc
*/
- public function remove(int | string $key): mixed
+ public function remove($key)
{
$previousValue = $this->get($key);
unset($this[$key]);
@@ -145,7 +119,10 @@ public function remove(int | string $key): mixed
return $previousValue;
}
- public function removeIf(int | string $key, mixed $value): bool
+ /**
+ * @inheritDoc
+ */
+ public function removeIf($key, $value): bool
{
if ($this->get($key) === $value) {
unset($this[$key]);
@@ -157,13 +134,9 @@ public function removeIf(int | string $key, mixed $value): bool
}
/**
- * @param K $key The key to replace.
- * @param T $value The value to set at `$key`.
- *
- * @return T | null the previous value associated with key, or `null` if
- * there was no mapping for `$key`.
+ * @inheritDoc
*/
- public function replace(int | string $key, mixed $value): mixed
+ public function replace($key, $value)
{
$currentValue = $this->get($key);
@@ -174,7 +147,10 @@ public function replace(int | string $key, mixed $value): mixed
return $currentValue;
}
- public function replaceIf(int | string $key, mixed $oldValue, mixed $newValue): bool
+ /**
+ * @inheritDoc
+ */
+ public function replaceIf($key, $oldValue, $newValue): bool
{
if ($this->get($key) === $oldValue) {
$this[$key] = $newValue;
@@ -184,20 +160,4 @@ public function replaceIf(int | string $key, mixed $oldValue, mixed $newValue):
return false;
}
-
- /**
- * @return array
- */
- public function __serialize(): array
- {
- return parent::__serialize();
- }
-
- /**
- * @return array
- */
- public function toArray(): array
- {
- return parent::toArray();
- }
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Map/AbstractTypedMap.php b/lib/Google/vendor/ramsey/collection/src/Map/AbstractTypedMap.php
index 92fdcd54c..486dc2e29 100644
--- a/lib/Google/vendor/ramsey/collection/src/Map/AbstractTypedMap.php
+++ b/lib/Google/vendor/ramsey/collection/src/Map/AbstractTypedMap.php
@@ -18,14 +18,16 @@
use Ramsey\Collection\Tool\TypeTrait;
use Ramsey\Collection\Tool\ValueToStringTrait;
+use function var_export;
+
/**
* This class provides a basic implementation of `TypedMapInterface`, to
* minimize the effort required to implement this interface.
*
* @template K of array-key
* @template T
- * @extends AbstractMap
- * @implements TypedMapInterface
+ * @extends AbstractMap
+ * @implements TypedMapInterface
*/
abstract class AbstractTypedMap extends AbstractMap implements TypedMapInterface
{
@@ -33,14 +35,20 @@ abstract class AbstractTypedMap extends AbstractMap implements TypedMapInterface
use ValueToStringTrait;
/**
- * @param K $offset
+ * @param K|null $offset
* @param T $value
*
* @inheritDoc
- * @psalm-suppress MoreSpecificImplementedParamType
*/
- public function offsetSet(mixed $offset, mixed $value): void
+ public function offsetSet($offset, $value): void
{
+ if ($offset === null) {
+ throw new InvalidArgumentException(
+ 'Map elements are key/value pairs; a key must be provided for '
+ . 'value ' . var_export($value, true),
+ );
+ }
+
if ($this->checkType($this->getKeyType(), $offset) === false) {
throw new InvalidArgumentException(
'Key must be of type ' . $this->getKeyType() . '; key is '
diff --git a/lib/Google/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php b/lib/Google/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php
index 34e4e853b..79a314d96 100644
--- a/lib/Google/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php
+++ b/lib/Google/vendor/ramsey/collection/src/Map/AssociativeArrayMap.php
@@ -17,7 +17,8 @@
/**
* `AssociativeArrayMap` represents a standard associative array object.
*
- * @extends AbstractMap
+ * @template T
+ * @extends AbstractMap
*/
class AssociativeArrayMap extends AbstractMap
{
diff --git a/lib/Google/vendor/ramsey/collection/src/Map/MapInterface.php b/lib/Google/vendor/ramsey/collection/src/Map/MapInterface.php
index 22ba1bdd1..6ed0b2967 100644
--- a/lib/Google/vendor/ramsey/collection/src/Map/MapInterface.php
+++ b/lib/Google/vendor/ramsey/collection/src/Map/MapInterface.php
@@ -21,7 +21,6 @@
*
* A map cannot contain duplicate keys; each key can map to at most one value.
*
- * @template K of array-key
* @template T
* @extends ArrayInterface
*/
@@ -30,9 +29,9 @@ interface MapInterface extends ArrayInterface
/**
* Returns `true` if this map contains a mapping for the specified key.
*
- * @param K $key The key to check in the map.
+ * @param array-key $key The key to check in the map.
*/
- public function containsKey(int | string $key): bool;
+ public function containsKey($key): bool;
/**
* Returns `true` if this map maps one or more keys to the specified value.
@@ -41,12 +40,13 @@ public function containsKey(int | string $key): bool;
*
* @param T $value The value to check in the map.
*/
- public function containsValue(mixed $value): bool;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function containsValue($value): bool;
/**
* Return an array of the keys contained in this map.
*
- * @return list
+ * @return list
*/
public function keys(): array;
@@ -55,12 +55,13 @@ public function keys(): array;
* map contains no mapping for the key, or (optionally) `$defaultValue` if
* this map contains no mapping for the key.
*
- * @param K $key The key to return from the map.
- * @param T | null $defaultValue The default value to use if `$key` is not found.
+ * @param array-key $key The key to return from the map.
+ * @param T|null $defaultValue The default value to use if `$key` is not found.
*
- * @return T | null the value or `null` if the key could not be found.
+ * @return T|null the value or `null` if the key could not be found.
*/
- public function get(int | string $key, mixed $defaultValue = null): mixed;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function get($key, $defaultValue = null);
/**
* Associates the specified value with the specified key in this map.
@@ -68,13 +69,14 @@ public function get(int | string $key, mixed $defaultValue = null): mixed;
* If the map previously contained a mapping for the key, the old value is
* replaced by the specified value.
*
- * @param K $key The key to put or replace in the map.
+ * @param array-key $key The key to put or replace in the map.
* @param T $value The value to store at `$key`.
*
- * @return T | null the previous value associated with key, or `null` if
+ * @return T|null the previous value associated with key, or `null` if
* there was no mapping for `$key`.
*/
- public function put(int | string $key, mixed $value): mixed;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function put($key, $value);
/**
* Associates the specified value with the specified key in this map only if
@@ -83,23 +85,25 @@ public function put(int | string $key, mixed $value): mixed;
* If there is already a value associated with `$key`, this returns that
* value without replacing it.
*
- * @param K $key The key to put in the map.
+ * @param array-key $key The key to put in the map.
* @param T $value The value to store at `$key`.
*
- * @return T | null the previous value associated with key, or `null` if
+ * @return T|null the previous value associated with key, or `null` if
* there was no mapping for `$key`.
*/
- public function putIfAbsent(int | string $key, mixed $value): mixed;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function putIfAbsent($key, $value);
/**
* Removes the mapping for a key from this map if it is present.
*
- * @param K $key The key to remove from the map.
+ * @param array-key $key The key to remove from the map.
*
- * @return T | null the previous value associated with key, or `null` if
+ * @return T|null the previous value associated with key, or `null` if
* there was no mapping for `$key`.
*/
- public function remove(int | string $key): mixed;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function remove($key);
/**
* Removes the entry for the specified key only if it is currently mapped to
@@ -107,24 +111,26 @@ public function remove(int | string $key): mixed;
*
* This performs a strict type check on the value.
*
- * @param K $key The key to remove from the map.
+ * @param array-key $key The key to remove from the map.
* @param T $value The value to match.
*
* @return bool true if the value was removed.
*/
- public function removeIf(int | string $key, mixed $value): bool;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function removeIf($key, $value): bool;
/**
* Replaces the entry for the specified key only if it is currently mapped
* to some value.
*
- * @param K $key The key to replace.
+ * @param array-key $key The key to replace.
* @param T $value The value to set at `$key`.
*
- * @return T | null the previous value associated with key, or `null` if
+ * @return T|null the previous value associated with key, or `null` if
* there was no mapping for `$key`.
*/
- public function replace(int | string $key, mixed $value): mixed;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function replace($key, $value);
/**
* Replaces the entry for the specified key only if currently mapped to the
@@ -132,11 +138,12 @@ public function replace(int | string $key, mixed $value): mixed;
*
* This performs a strict type check on the value.
*
- * @param K $key The key to remove from the map.
+ * @param array-key $key The key to remove from the map.
* @param T $oldValue The value to match.
* @param T $newValue The value to use as a replacement.
*
* @return bool true if the value was replaced.
*/
- public function replaceIf(int | string $key, mixed $oldValue, mixed $newValue): bool;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function replaceIf($key, $oldValue, $newValue): bool;
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Map/NamedParameterMap.php b/lib/Google/vendor/ramsey/collection/src/Map/NamedParameterMap.php
index f948e476c..6e391e970 100644
--- a/lib/Google/vendor/ramsey/collection/src/Map/NamedParameterMap.php
+++ b/lib/Google/vendor/ramsey/collection/src/Map/NamedParameterMap.php
@@ -21,12 +21,13 @@
use function array_combine;
use function array_key_exists;
use function is_int;
+use function var_export;
/**
* `NamedParameterMap` represents a mapping of values to a set of named keys
* that may optionally be typed
*
- * @extends AbstractMap
+ * @extends AbstractMap
*/
class NamedParameterMap extends AbstractMap
{
@@ -38,13 +39,13 @@ class NamedParameterMap extends AbstractMap
*
* @var array
*/
- private readonly array $namedParameters;
+ protected array $namedParameters;
/**
* Constructs a new `NamedParameterMap`.
*
* @param array $namedParameters The named parameters defined for this map.
- * @param array $data An initial set of data to set on this map.
+ * @param array $data An initial set of data to set on this map.
*/
public function __construct(array $namedParameters, array $data = [])
{
@@ -62,12 +63,22 @@ public function getNamedParameters(): array
return $this->namedParameters;
}
- public function offsetSet(mixed $offset, mixed $value): void
+ /**
+ * @inheritDoc
+ */
+ public function offsetSet($offset, $value): void
{
+ if ($offset === null) {
+ throw new InvalidArgumentException(
+ 'Map elements are key/value pairs; a key must be provided for '
+ . 'value ' . var_export($value, true),
+ );
+ }
+
if (!array_key_exists($offset, $this->namedParameters)) {
throw new InvalidArgumentException(
'Attempting to set value for unconfigured parameter \''
- . $this->toolValueToString($offset) . '\'',
+ . $offset . '\'',
);
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Map/TypedMap.php b/lib/Google/vendor/ramsey/collection/src/Map/TypedMap.php
index f914d9c70..77ef8d314 100644
--- a/lib/Google/vendor/ramsey/collection/src/Map/TypedMap.php
+++ b/lib/Google/vendor/ramsey/collection/src/Map/TypedMap.php
@@ -14,6 +14,8 @@
namespace Ramsey\Collection\Map;
+use Ramsey\Collection\Tool\TypeTrait;
+
/**
* A `TypedMap` represents a map of elements where key and value are typed.
*
@@ -84,6 +86,24 @@
*/
class TypedMap extends AbstractTypedMap
{
+ use TypeTrait;
+
+ /**
+ * The data type of keys stored in this collection.
+ *
+ * A map key's type is immutable once it is set. For this reason, this
+ * property is set private.
+ */
+ private string $keyType;
+
+ /**
+ * The data type of values stored in this collection.
+ *
+ * A map value's type is immutable once it is set. For this reason, this
+ * property is set private.
+ */
+ private string $valueType;
+
/**
* Constructs a map object of the specified key and value types,
* optionally with the specified data.
@@ -92,11 +112,11 @@ class TypedMap extends AbstractTypedMap
* @param string $valueType The data type of the map's values.
* @param array $data The initial data to set for this map.
*/
- public function __construct(
- private readonly string $keyType,
- private readonly string $valueType,
- array $data = [],
- ) {
+ public function __construct(string $keyType, string $valueType, array $data = [])
+ {
+ $this->keyType = $keyType;
+ $this->valueType = $valueType;
+
parent::__construct($data);
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Map/TypedMapInterface.php b/lib/Google/vendor/ramsey/collection/src/Map/TypedMapInterface.php
index 5a44f0647..0308109cc 100644
--- a/lib/Google/vendor/ramsey/collection/src/Map/TypedMapInterface.php
+++ b/lib/Google/vendor/ramsey/collection/src/Map/TypedMapInterface.php
@@ -18,9 +18,8 @@
* A `TypedMapInterface` represents a map of elements where key and value are
* typed.
*
- * @template K of array-key
* @template T
- * @extends MapInterface
+ * @extends MapInterface
*/
interface TypedMapInterface extends MapInterface
{
diff --git a/lib/Google/vendor/ramsey/collection/src/Queue.php b/lib/Google/vendor/ramsey/collection/src/Queue.php
index 0f5b33740..bc8c24e1c 100644
--- a/lib/Google/vendor/ramsey/collection/src/Queue.php
+++ b/lib/Google/vendor/ramsey/collection/src/Queue.php
@@ -19,8 +19,6 @@
use Ramsey\Collection\Tool\TypeTrait;
use Ramsey\Collection\Tool\ValueToStringTrait;
-use function array_key_first;
-
/**
* This class provides a basic implementation of `QueueInterface`, to minimize
* the effort required to implement this interface.
@@ -34,15 +32,29 @@ class Queue extends AbstractArray implements QueueInterface
use TypeTrait;
use ValueToStringTrait;
+ /**
+ * The type of elements stored in this queue.
+ *
+ * A queue's type is immutable once it is set. For this reason, this
+ * property is set private.
+ */
+ private string $queueType;
+
+ /**
+ * The index of the head of the queue.
+ */
+ protected int $index = 0;
+
/**
* Constructs a queue object of the specified type, optionally with the
* specified data.
*
- * @param string $queueType The type or class name associated with this queue.
- * @param array $data The initial items to store in the queue.
+ * @param string $queueType The type (FQCN) associated with this queue.
+ * @param array $data The initial items to store in the collection.
*/
- public function __construct(private readonly string $queueType, array $data = [])
+ public function __construct(string $queueType, array $data = [])
{
+ $this->queueType = $queueType;
parent::__construct($data);
}
@@ -53,9 +65,9 @@ public function __construct(private readonly string $queueType, array $data = []
* serves only to fulfill the `ArrayAccess` interface requirements. It is
* invoked by other operations when adding values to the queue.
*
- * @throws InvalidArgumentException if $value is of the wrong type.
+ * @throws InvalidArgumentException if $value is of the wrong type
*/
- public function offsetSet(mixed $offset, mixed $value): void
+ public function offsetSet($offset, $value): void
{
if ($this->checkType($this->getType(), $value) === false) {
throw new InvalidArgumentException(
@@ -68,9 +80,11 @@ public function offsetSet(mixed $offset, mixed $value): void
}
/**
- * @throws InvalidArgumentException if $value is of the wrong type.
+ * @throws InvalidArgumentException if $value is of the wrong type
+ *
+ * @inheritDoc
*/
- public function add(mixed $element): bool
+ public function add($element): bool
{
$this[] = $element;
@@ -78,67 +92,74 @@ public function add(mixed $element): bool
}
/**
- * @return T
- *
- * @throws NoSuchElementException if this queue is empty.
+ * @inheritDoc
*/
- public function element(): mixed
+ public function element()
{
- return $this->peek() ?? throw new NoSuchElementException(
- 'Can\'t return element from Queue. Queue is empty.',
- );
+ $element = $this->peek();
+
+ if ($element === null) {
+ throw new NoSuchElementException(
+ 'Can\'t return element from Queue. Queue is empty.',
+ );
+ }
+
+ return $element;
}
- public function offer(mixed $element): bool
+ /**
+ * @inheritDoc
+ */
+ public function offer($element): bool
{
try {
return $this->add($element);
- } catch (InvalidArgumentException) {
+ } catch (InvalidArgumentException $e) {
return false;
}
}
/**
- * @return T | null
+ * @inheritDoc
*/
- public function peek(): mixed
+ public function peek()
{
- $index = array_key_first($this->data);
-
- if ($index === null) {
+ if ($this->count() === 0) {
return null;
}
- return $this[$index];
+ return $this[$this->index];
}
/**
- * @return T | null
+ * @inheritDoc
*/
- public function poll(): mixed
+ public function poll()
{
- $index = array_key_first($this->data);
-
- if ($index === null) {
+ if ($this->count() === 0) {
return null;
}
- $head = $this[$index];
- unset($this[$index]);
+ $head = $this[$this->index];
+
+ unset($this[$this->index]);
+ $this->index++;
return $head;
}
/**
- * @return T
- *
- * @throws NoSuchElementException if this queue is empty.
+ * @inheritDoc
*/
- public function remove(): mixed
+ public function remove()
{
- return $this->poll() ?? throw new NoSuchElementException(
- 'Can\'t return element from Queue. Queue is empty.',
- );
+ $head = $this->poll();
+
+ if ($head === null) {
+ throw new NoSuchElementException('Can\'t return element from Queue. Queue is empty.');
+ }
+
+ return $head;
}
public function getType(): string
diff --git a/lib/Google/vendor/ramsey/collection/src/QueueInterface.php b/lib/Google/vendor/ramsey/collection/src/QueueInterface.php
index f29ce43ab..4f91487fa 100644
--- a/lib/Google/vendor/ramsey/collection/src/QueueInterface.php
+++ b/lib/Google/vendor/ramsey/collection/src/QueueInterface.php
@@ -129,7 +129,8 @@ interface QueueInterface extends ArrayInterface
* Implementations should use a more-specific exception that extends
* `\RuntimeException`.
*/
- public function add(mixed $element): bool;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function add($element): bool;
/**
* Retrieves, but does not remove, the head of this queue.
@@ -143,7 +144,7 @@ public function add(mixed $element): bool;
*
* @throws NoSuchElementException if this queue is empty.
*/
- public function element(): mixed;
+ public function element();
/**
* Inserts the specified element into this queue if it is possible to do so
@@ -159,7 +160,8 @@ public function element(): mixed;
*
* @return bool `true` if the element was added to this queue, else `false`.
*/
- public function offer(mixed $element): bool;
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ public function offer($element): bool;
/**
* Retrieves, but does not remove, the head of this queue, or returns `null`
@@ -167,9 +169,9 @@ public function offer(mixed $element): bool;
*
* @see self::element()
*
- * @return T | null the head of this queue, or `null` if this queue is empty.
+ * @return T|null the head of this queue, or `null` if this queue is empty.
*/
- public function peek(): mixed;
+ public function peek();
/**
* Retrieves and removes the head of this queue, or returns `null`
@@ -177,9 +179,9 @@ public function peek(): mixed;
*
* @see self::remove()
*
- * @return T | null the head of this queue, or `null` if this queue is empty.
+ * @return T|null the head of this queue, or `null` if this queue is empty.
*/
- public function poll(): mixed;
+ public function poll();
/**
* Retrieves and removes the head of this queue.
@@ -193,7 +195,7 @@ public function poll(): mixed;
*
* @throws NoSuchElementException if this queue is empty.
*/
- public function remove(): mixed;
+ public function remove();
/**
* Returns the type associated with this queue.
diff --git a/lib/Google/vendor/ramsey/collection/src/Set.php b/lib/Google/vendor/ramsey/collection/src/Set.php
index aa93351c4..c1d37ccca 100644
--- a/lib/Google/vendor/ramsey/collection/src/Set.php
+++ b/lib/Google/vendor/ramsey/collection/src/Set.php
@@ -28,7 +28,7 @@
* $foo = new \My\Foo();
* $set = new Set(\My\Foo::class);
*
- * $set->add($foo); // returns TRUE, the element doesn't exist
+ * $set->add($foo); // returns TRUE, the element don't exists
* $set->add($foo); // returns FALSE, the element already exists
*
* $bar = new \My\Foo();
@@ -40,15 +40,23 @@
*/
class Set extends AbstractSet
{
+ /**
+ * The type of elements stored in this set
+ *
+ * A set's type is immutable. For this reason, this property is private.
+ */
+ private string $setType;
+
/**
* Constructs a set object of the specified type, optionally with the
* specified data.
*
- * @param string $setType The type or class name associated with this set.
+ * @param string $setType The type (FQCN) associated with this set.
* @param array $data The initial items to store in the set.
*/
- public function __construct(private readonly string $setType, array $data = [])
+ public function __construct(string $setType, array $data = [])
{
+ $this->setType = $setType;
parent::__construct($data);
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Sort.php b/lib/Google/vendor/ramsey/collection/src/Sort.php
deleted file mode 100644
index 0c3c19213..000000000
--- a/lib/Google/vendor/ramsey/collection/src/Sort.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- * @license http://opensource.org/licenses/MIT MIT
- */
-
-declare(strict_types=1);
-
-namespace Ramsey\Collection;
-
-/**
- * Collection sorting
- */
-enum Sort: string
-{
- /**
- * Sort items in a collection in ascending order.
- */
- case Ascending = 'asc';
-
- /**
- * Sort items in a collection in descending order.
- */
- case Descending = 'desc';
-}
diff --git a/lib/Google/vendor/ramsey/collection/src/Tool/TypeTrait.php b/lib/Google/vendor/ramsey/collection/src/Tool/TypeTrait.php
index ac51b7f10..728d44b65 100644
--- a/lib/Google/vendor/ramsey/collection/src/Tool/TypeTrait.php
+++ b/lib/Google/vendor/ramsey/collection/src/Tool/TypeTrait.php
@@ -36,22 +36,39 @@ trait TypeTrait
* @param string $type The type to check the value against.
* @param mixed $value The value to check.
*/
- protected function checkType(string $type, mixed $value): bool
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ protected function checkType(string $type, $value): bool
{
- return match ($type) {
- 'array' => is_array($value),
- 'bool', 'boolean' => is_bool($value),
- 'callable' => is_callable($value),
- 'float', 'double' => is_float($value),
- 'int', 'integer' => is_int($value),
- 'null' => $value === null,
- 'numeric' => is_numeric($value),
- 'object' => is_object($value),
- 'resource' => is_resource($value),
- 'scalar' => is_scalar($value),
- 'string' => is_string($value),
- 'mixed' => true,
- default => $value instanceof $type,
- };
+ switch ($type) {
+ case 'array':
+ return is_array($value);
+ case 'bool':
+ case 'boolean':
+ return is_bool($value);
+ case 'callable':
+ return is_callable($value);
+ case 'float':
+ case 'double':
+ return is_float($value);
+ case 'int':
+ case 'integer':
+ return is_int($value);
+ case 'null':
+ return $value === null;
+ case 'numeric':
+ return is_numeric($value);
+ case 'object':
+ return is_object($value);
+ case 'resource':
+ return is_resource($value);
+ case 'scalar':
+ return is_scalar($value);
+ case 'string':
+ return is_string($value);
+ case 'mixed':
+ return true;
+ default:
+ return $value instanceof $type;
+ }
}
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php b/lib/Google/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php
index 44c422252..e10824283 100644
--- a/lib/Google/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php
+++ b/lib/Google/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php
@@ -14,10 +14,9 @@
namespace Ramsey\Collection\Tool;
-use Ramsey\Collection\Exception\InvalidPropertyOrMethod;
-use Ramsey\Collection\Exception\UnsupportedOperationException;
+use Ramsey\Collection\Exception\ValueExtractionException;
-use function is_array;
+use function get_class;
use function is_object;
use function method_exists;
use function property_exists;
@@ -29,53 +28,34 @@
trait ValueExtractorTrait
{
/**
- * Extracts the value of the given property, method, or array key from the
- * element.
+ * Extracts the value of the given property or method from the object.
*
- * If `$propertyOrMethod` is `null`, we return the element as-is.
- *
- * @param mixed $element The element to extract the value from.
- * @param string | null $propertyOrMethod The property or method for which the
+ * @param mixed $object The object to extract the value from.
+ * @param string $propertyOrMethod The property or method for which the
* value should be extracted.
*
- * @return mixed the value extracted from the specified property, method,
- * or array key, or the element itself.
+ * @return mixed the value extracted from the specified property or method.
*
- * @throws InvalidPropertyOrMethod
- * @throws UnsupportedOperationException
+ * @throws ValueExtractionException if the method or property is not defined.
*/
- protected function extractValue(mixed $element, ?string $propertyOrMethod): mixed
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ protected function extractValue($object, string $propertyOrMethod)
{
- if ($propertyOrMethod === null) {
- return $element;
- }
-
- if (!is_object($element) && !is_array($element)) {
- throw new UnsupportedOperationException(sprintf(
- 'The collection type "%s" does not support the $propertyOrMethod parameter',
- $this->getType(),
- ));
- }
-
- if (is_array($element)) {
- return $element[$propertyOrMethod] ?? throw new InvalidPropertyOrMethod(sprintf(
- 'Key or index "%s" not found in collection elements',
- $propertyOrMethod,
- ));
+ if (!is_object($object)) {
+ throw new ValueExtractionException('Unable to extract a value from a non-object');
}
- if (property_exists($element, $propertyOrMethod)) {
- return $element->$propertyOrMethod;
+ if (property_exists($object, $propertyOrMethod)) {
+ return $object->$propertyOrMethod;
}
- if (method_exists($element, $propertyOrMethod)) {
- return $element->{$propertyOrMethod}();
+ if (method_exists($object, $propertyOrMethod)) {
+ return $object->{$propertyOrMethod}();
}
- throw new InvalidPropertyOrMethod(sprintf(
- 'Method or property "%s" not defined in %s',
- $propertyOrMethod,
- $element::class,
- ));
+ throw new ValueExtractionException(
+ // phpcs:ignore SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall
+ sprintf('Method or property "%s" not defined in %s', $propertyOrMethod, get_class($object)),
+ );
}
}
diff --git a/lib/Google/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php b/lib/Google/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php
index 64fc5fa42..cacefc8b6 100644
--- a/lib/Google/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php
+++ b/lib/Google/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php
@@ -16,7 +16,7 @@
use DateTimeInterface;
-use function assert;
+use function get_class;
use function get_resource_type;
use function is_array;
use function is_bool;
@@ -24,6 +24,7 @@
use function is_object;
use function is_resource;
use function is_scalar;
+use function var_export;
/**
* Provides functionality to express a value as string
@@ -45,7 +46,8 @@ trait ValueToStringTrait
*
* @param mixed $value the value to return as a string.
*/
- protected function toolValueToString(mixed $value): string
+ // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ protected function toolValueToString($value): string
{
// null
if ($value === null) {
@@ -72,8 +74,12 @@ protected function toolValueToString(mixed $value): string
return '(' . get_resource_type($value) . ' resource #' . (int) $value . ')';
}
+ // If we don't know what it is, use var_export().
+ if (!is_object($value)) {
+ return '(' . var_export($value, true) . ')';
+ }
+
// From here, $value should be an object.
- assert(is_object($value));
// __toString() is implemented
if (is_callable([$value, '__toString'])) {
@@ -86,6 +92,7 @@ protected function toolValueToString(mixed $value): string
}
// unknown type
- return '(' . $value::class . ' Object)';
+ // phpcs:ignore SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall
+ return '(' . get_class($value) . ' Object)';
}
}
diff --git a/lib/Google/vendor/ramsey/uuid/src/Uuid.php b/lib/Google/vendor/ramsey/uuid/src/Uuid.php
index 18525d0c0..e0384a50c 100644
--- a/lib/Google/vendor/ramsey/uuid/src/Uuid.php
+++ b/lib/Google/vendor/ramsey/uuid/src/Uuid.php
@@ -310,7 +310,7 @@ public function __serialize(): array
* @param string $data The serialized PHP string to unserialize into
* a UuidInterface instance
*/
- public function unserialize($data): void
+ public function unserialize(string $data): void
{
if (strlen($data) === 16) {
/** @var Uuid $uuid */
diff --git a/lib/Google/vendor/symfony/deprecation-contracts/.gitignore b/lib/Google/vendor/symfony/deprecation-contracts/.gitignore
new file mode 100644
index 000000000..c49a5d8df
--- /dev/null
+++ b/lib/Google/vendor/symfony/deprecation-contracts/.gitignore
@@ -0,0 +1,3 @@
+vendor/
+composer.lock
+phpunit.xml
diff --git a/lib/Google/vendor/symfony/deprecation-contracts/LICENSE b/lib/Google/vendor/symfony/deprecation-contracts/LICENSE
index 0ed3a2465..406242ff2 100644
--- a/lib/Google/vendor/symfony/deprecation-contracts/LICENSE
+++ b/lib/Google/vendor/symfony/deprecation-contracts/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2020-present Fabien Potencier
+Copyright (c) 2020-2022 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/lib/Google/vendor/symfony/deprecation-contracts/README.md b/lib/Google/vendor/symfony/deprecation-contracts/README.md
index 9814864c0..4957933a6 100644
--- a/lib/Google/vendor/symfony/deprecation-contracts/README.md
+++ b/lib/Google/vendor/symfony/deprecation-contracts/README.md
@@ -22,5 +22,5 @@ trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use
This will generate the following message:
`Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.`
-While not recommended, the deprecation notices can be completely ignored by declaring an empty
+While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty
`function trigger_deprecation() {}` in your application.
diff --git a/lib/Google/vendor/symfony/deprecation-contracts/composer.json b/lib/Google/vendor/symfony/deprecation-contracts/composer.json
index 774200fdc..1c1b4ba0e 100644
--- a/lib/Google/vendor/symfony/deprecation-contracts/composer.json
+++ b/lib/Google/vendor/symfony/deprecation-contracts/composer.json
@@ -15,7 +15,7 @@
}
],
"require": {
- "php": ">=8.1"
+ "php": ">=8.0.2"
},
"autoload": {
"files": [
@@ -25,7 +25,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-main": "3.3-dev"
+ "dev-main": "3.0-dev"
},
"thanks": {
"name": "symfony/contracts",
diff --git a/vendor/symfony/deprecation-contracts/LICENSE b/lib/Google/vendor/symfony/polyfill-php81/LICENSE
similarity index 95%
rename from vendor/symfony/deprecation-contracts/LICENSE
rename to lib/Google/vendor/symfony/polyfill-php81/LICENSE
index 0ed3a2465..99c6bdf35 100644
--- a/vendor/symfony/deprecation-contracts/LICENSE
+++ b/lib/Google/vendor/symfony/polyfill-php81/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2020-present Fabien Potencier
+Copyright (c) 2021-present Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/lib/Google/vendor/symfony/polyfill-php81/Php81.php b/lib/Google/vendor/symfony/polyfill-php81/Php81.php
new file mode 100644
index 000000000..f0507b765
--- /dev/null
+++ b/lib/Google/vendor/symfony/polyfill-php81/Php81.php
@@ -0,0 +1,37 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php81;
+
+/**
+ * @author Nicolas Grekas
+ *
+ * @internal
+ */
+final class Php81
+{
+ public static function array_is_list(array $array): bool
+ {
+ if ([] === $array || $array === array_values($array)) {
+ return true;
+ }
+
+ $nextKey = -1;
+
+ foreach ($array as $k => $v) {
+ if ($k !== ++$nextKey) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/lib/Google/vendor/symfony/polyfill-php81/README.md b/lib/Google/vendor/symfony/polyfill-php81/README.md
new file mode 100644
index 000000000..c07ef7820
--- /dev/null
+++ b/lib/Google/vendor/symfony/polyfill-php81/README.md
@@ -0,0 +1,18 @@
+Symfony Polyfill / Php81
+========================
+
+This component provides features added to PHP 8.1 core:
+
+- [`array_is_list`](https://php.net/array_is_list)
+- [`enum_exists`](https://php.net/enum-exists)
+- [`MYSQLI_REFRESH_REPLICA`](https://php.net/mysqli.constants#constantmysqli-refresh-replica) constant
+- [`ReturnTypeWillChange`](https://wiki.php.net/rfc/internal_method_return_types)
+- [`CURLStringFile`](https://php.net/CURLStringFile) (but only if PHP >= 7.4 is used)
+
+More information can be found in the
+[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
+
+License
+=======
+
+This library is released under the [MIT license](LICENSE).
diff --git a/lib/Google/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php b/lib/Google/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php
new file mode 100644
index 000000000..eb5952ee3
--- /dev/null
+++ b/lib/Google/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php
@@ -0,0 +1,51 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (\PHP_VERSION_ID >= 70400 && extension_loaded('curl')) {
+ /**
+ * @property string $data
+ */
+ class CURLStringFile extends CURLFile
+ {
+ private $data;
+
+ public function __construct(string $data, string $postname, string $mime = 'application/octet-stream')
+ {
+ $this->data = $data;
+ parent::__construct('data://application/octet-stream;base64,'.base64_encode($data), $mime, $postname);
+ }
+
+ public function __set(string $name, $value): void
+ {
+ if ('data' !== $name) {
+ $this->$name = $value;
+
+ return;
+ }
+
+ if (is_object($value) ? !method_exists($value, '__toString') : !is_scalar($value)) {
+ throw new \TypeError('Cannot assign '.gettype($value).' to property CURLStringFile::$data of type string');
+ }
+
+ $this->name = 'data://application/octet-stream;base64,'.base64_encode($value);
+ }
+
+ public function __isset(string $name): bool
+ {
+ return isset($this->$name);
+ }
+
+ public function &__get(string $name)
+ {
+ return $this->$name;
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php b/lib/Google/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
similarity index 59%
rename from vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php
rename to lib/Google/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
index bd1212f6e..cb7720a8d 100644
--- a/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php
+++ b/lib/Google/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
@@ -9,8 +9,12 @@
* file that was distributed with this source code.
*/
-if (\PHP_VERSION_ID < 80000 && extension_loaded('tokenizer')) {
- class PhpToken extends Symfony\Polyfill\Php80\PhpToken
+if (\PHP_VERSION_ID < 80100) {
+ #[Attribute(Attribute::TARGET_METHOD)]
+ final class ReturnTypeWillChange
{
+ public function __construct()
+ {
+ }
}
}
diff --git a/lib/Google/vendor/symfony/polyfill-php81/bootstrap.php b/lib/Google/vendor/symfony/polyfill-php81/bootstrap.php
new file mode 100644
index 000000000..9f872e02f
--- /dev/null
+++ b/lib/Google/vendor/symfony/polyfill-php81/bootstrap.php
@@ -0,0 +1,28 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Polyfill\Php81 as p;
+
+if (\PHP_VERSION_ID >= 80100) {
+ return;
+}
+
+if (defined('MYSQLI_REFRESH_SLAVE') && !defined('MYSQLI_REFRESH_REPLICA')) {
+ define('MYSQLI_REFRESH_REPLICA', 64);
+}
+
+if (!function_exists('array_is_list')) {
+ function array_is_list(array $array): bool { return p\Php81::array_is_list($array); }
+}
+
+if (!function_exists('enum_exists')) {
+ function enum_exists(string $enum, bool $autoload = true): bool { return $autoload && class_exists($enum) && false; }
+}
diff --git a/vendor/symfony/polyfill-php73/composer.json b/lib/Google/vendor/symfony/polyfill-php81/composer.json
similarity index 80%
rename from vendor/symfony/polyfill-php73/composer.json
rename to lib/Google/vendor/symfony/polyfill-php81/composer.json
index b5c58ec19..e02d673d4 100644
--- a/vendor/symfony/polyfill-php73/composer.json
+++ b/lib/Google/vendor/symfony/polyfill-php81/composer.json
@@ -1,7 +1,7 @@
{
- "name": "symfony/polyfill-php73",
+ "name": "symfony/polyfill-php81",
"type": "library",
- "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
"keywords": ["polyfill", "shim", "compatibility", "portable"],
"homepage": "https://symfony.com",
"license": "MIT",
@@ -19,14 +19,14 @@
"php": ">=7.1"
},
"autoload": {
- "psr-4": { "Symfony\\Polyfill\\Php73\\": "" },
+ "psr-4": { "Symfony\\Polyfill\\Php81\\": "" },
"files": [ "bootstrap.php" ],
"classmap": [ "Resources/stubs" ]
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
diff --git a/lib/classes/class-api.php b/lib/classes/class-api.php
index eb0f7eaf1..6d4e0de12 100644
--- a/lib/classes/class-api.php
+++ b/lib/classes/class-api.php
@@ -85,7 +85,7 @@ static public function updateSettings(\WP_REST_Request $request) {
if (self::$tokenData === null || empty(self::$tokenData->user_id)) {
return new \WP_Error('unauthorized', 'Auth token looks incorrect', ['status' => 401]);
}
- $is_gae = isset($_SERVER["GAE_VERSION"]) ? true : false;
+ $is_gae = apply_filters('wp_stateless_is_app_engine', false);
$upload_dir = wp_upload_dir();
$is_upload_dir_writable = is_writable($upload_dir['basedir']);
diff --git a/lib/classes/class-bootstrap.php b/lib/classes/class-bootstrap.php
index 5708ce9bb..abc8e6f14 100644
--- a/lib/classes/class-bootstrap.php
+++ b/lib/classes/class-bootstrap.php
@@ -54,6 +54,13 @@ final class Bootstrap extends \UsabilityDynamics\WP\Bootstrap_Plugin {
* @author peshkov@UD
*/
protected function __construct($args) {
+ /**
+ * Need to be loaded before plugin initialization.
+ */
+ if ( !(defined('WP_STATELESS_COMPATIBILITY_GAE') && !WP_STATELESS_COMPATIBILITY_GAE) ) {
+ AppEngine::instance();
+ }
+
parent::__construct($args);
/**
@@ -73,6 +80,7 @@ protected function __construct($args) {
// Initialize compatibility modules.
add_action('plugins_loaded', function () {
new Module();
+ DynamicImageSupport::instance();
});
/**
@@ -220,6 +228,19 @@ public function init() {
* Replacing local path to gs:// for using it on StreamWrapper
*/
add_filter('upload_dir', array($this, 'filter_upload_dir'), 99);
+
+ /**
+ * Stateless mode working only with GD library
+ */
+ add_filter('wp_image_editors', array($this, 'select_wp_image_editors'));
+
+ /**
+ * Init GS client
+ */
+ global $gs_client;
+ if ($gs_client = $this->init_gs_client()) {
+ StreamWrapper::register($gs_client);
+ }
}
if ($this->get('sm.delete_remote') == 'true') {
@@ -246,7 +267,9 @@ public function init() {
*/
add_filter('wp_image_editors', array($this, 'select_wp_image_editors'));
- //init GS client
+ /**
+ * Init GS client
+ */
global $gs_client;
if ($gs_client = $this->init_gs_client()) {
StreamWrapper::register($gs_client);
@@ -723,9 +746,9 @@ public function api_init() {
* @return array
*/
public function attachment_modal_meta_box_callback($form_fields, $post) {
-
- //do not show on media edit page, only on modal
- if (isset($_GET['post'])) {
+ // Do not show on media edit page, only on modal
+ // Do not show if we are not in Media Library
+ if ( isset($_GET['post']) || wp_doing_ajax() ) {
return $form_fields;
}
diff --git a/lib/classes/class-compatibility.php b/lib/classes/class-compatibility.php
index 3880795d5..79eae1abb 100644
--- a/lib/classes/class-compatibility.php
+++ b/lib/classes/class-compatibility.php
@@ -25,7 +25,7 @@ abstract class Compatibility {
* ['WP_STATELESS_MEDIA_ON_FLY' => 'WP_STATELESS_DYNAMIC_IMAGE_SUPPORT']
*/
protected $constant = '';
- protected $enabled = false;
+ protected $enabled = true;
protected $description = '';
protected $plugin_file = null;
protected $theme_name = null;
diff --git a/lib/classes/compatibility/dynamic-image-support.php b/lib/classes/class-dynamic-image-support.php
similarity index 57%
rename from lib/classes/compatibility/dynamic-image-support.php
rename to lib/classes/class-dynamic-image-support.php
index ffe2b3ad2..6dc0f9de2 100644
--- a/lib/classes/compatibility/dynamic-image-support.php
+++ b/lib/classes/class-dynamic-image-support.php
@@ -1,48 +1,50 @@
'WP_STATELESS_DYNAMIC_IMAGE_SUPPORT'];
- protected $description = 'Upload image thumbnails generated by your theme and plugins that do not register media objects with the media library. This could be significantly impact performance negatively.';
- protected $first_party = true;
+ /**
+ * Class DynamicImageSupport
+ *
+ * @package wpCloud\StatelessMedia
+ */
+ class DynamicImageSupport {
+ use Singleton;
+
+ const ID = 'dynamic-image-support';
public function __construct() {
- $modules = get_option('stateless-modules', array());
+ // On Google App Engine not working
+ if ( apply_filters('wp_stateless_is_app_engine', false) ) {
+ return;
+ }
- if (empty($modules[$this->id])) {
- // Legacy settings
- $this->enabled = get_option('sm_on_fly', false);
+ $enabled = ud_get_stateless_media()->get( 'sm.dynamic_image_support', false ) == 'true';
+
+ // Legacy setting
+ if (!$enabled) {
+ $enabled = get_option('sm_on_fly', false);
}
- $this->init();
+ if ($enabled) {
+ $this->init_module();
+ }
}
/**
- * @param $sm
+ * Initialize module
*/
- public function module_init($sm) {
- /**
- * On Google App Engine not working
- */
- if (isset($_SERVER["GAE_VERSION"])) return;
- /**
- * Handle any other on fly generated media
- * 7d23984e Anton Korotkov, 2 years ago (February 19th, 2016 9:02am) new options added
- */
+ private function init_module() {
+ // Handle any other on fly generated media
add_filter('image_make_intermediate_size', array($this, 'handle_on_fly'));
}
diff --git a/lib/classes/class-errors.php b/lib/classes/class-errors.php
index e424e4ecc..13bf7e85d 100644
--- a/lib/classes/class-errors.php
+++ b/lib/classes/class-errors.php
@@ -89,6 +89,24 @@ public function __construct( $args ) {
add_action( 'wp_ajax_stateless_enable_notice_button_action', array( $this, 'stateless_enable_notice_button_action' ) );
}
+ /**
+ * Prevents adding duplicating messages
+ * Some triggers may happen few times during site load (like 'switch_blog' hook)
+ * adding the same message several times is not necessary
+ *
+ * @param string $collection
+ * @param string $message
+ */
+ private function add_message( &$collection, $message ) {
+ $exiting_keys = array_column($collection, 'key');
+
+ if ( in_array( $message['key'], $exiting_keys ) ) {
+ return;
+ }
+
+ $collection[] = $message;
+ }
+
/**
* Add new message for admin notices
*
@@ -99,7 +117,7 @@ public function __construct( $args ) {
public function add( $message, $type = 'error' ) {
switch( $type ) {
case 'error':
- $this->errors[] = $message;
+ $this->add_message($this->errors, $message);
break;
case 'message':
case 'warning':
@@ -115,7 +133,7 @@ public function add( $message, $type = 'error' ) {
if(empty($message['key'])){
$message['key'] = md5( $message['title'] );
}
- $this->notices[] = $message;
+ $this->add_message($this->notices, $message);
break;
}
}
diff --git a/lib/classes/class-google-app-engine.php b/lib/classes/class-google-app-engine.php
new file mode 100644
index 000000000..3dd7c158b
--- /dev/null
+++ b/lib/classes/class-google-app-engine.php
@@ -0,0 +1,93 @@
+set('sm.readonly.mode', 'app_engine');
+ }
+
+ /**
+ * Add admin message if we are running on Google App Engine
+ */
+ public function add_message() {
+ if ( !apply_filters('wp_stateless_is_app_engine', false) ) {
+ return;
+ }
+
+ ud_get_stateless_media()->errors->add(array(
+ 'key' => 'stateless_app_engine_auto_mode',
+ 'button' => 'View Settings',
+ 'button_link' => admin_url('upload.php?page=stateless-settings'),
+ 'title' => sprintf(__('Stateless Mode Enabled Automatically.', ud_get_stateless_media()->domain)),
+ 'message' => sprintf(__('We detected that you are running Google App Engine. This platform does not allow you to save files locally,
+ so we have automatically enabled Stateless mode.
+ In this mode, your files will only be stored on Google Cloud Storage.', ud_get_stateless_media()->domain)
+ ),
+ ), 'notice');
+ }
+ }
+ }
+}
diff --git a/lib/classes/class-module.php b/lib/classes/class-module.php
index 1fe19699f..7d236f487 100644
--- a/lib/classes/class-module.php
+++ b/lib/classes/class-module.php
@@ -22,66 +22,6 @@ class Module {
*/
public function __construct() {
add_action('admin_init', array($this, 'save_modules'), 1);
-
- /**
- * Dynamic Image Support
- */
- new DynamicImageSupport();
-
- /**
- * Google App Engine
- */
- new GoogleAppEngine();
-
- /**
- * Support for Imagify
- */
- new Imagify();
-
- /**
- * Support for ShortPixel Image Optimizer
- */
- new ShortPixel();
-
- /**
- * Support for SiteOrigin CSS files
- */
- new SOCSS();
-
- /**
- * Support for SiteOrigin widget CSS files
- */
- new SOWidgetCSS();
-
- /**
- * VidoRev
- */
- new VidoRev();
-
- /**
- * WP Retina 2x
- */
- new WPRetina2x();
-
- /**
- * Support for WPForms
- */
- new WPSmush();
-
- /**
- * Support for WPForms
- */
- new CompatibilityWooExtraProductOptions();
-
- /**
- * Support for WPBakery Page Builder
- */
- new WPBakeryPageBuilder();
-
- /**
- * Support for WPForms
- */
- new WPForms();
}
/**
diff --git a/lib/classes/class-settings.php b/lib/classes/class-settings.php
index 04adb0752..ca80df190 100644
--- a/lib/classes/class-settings.php
+++ b/lib/classes/class-settings.php
@@ -45,6 +45,7 @@ final class Settings extends \UsabilityDynamics\Settings {
'custom_domain' => array('WP_STATELESS_MEDIA_CUSTOM_DOMAIN', ''),
'organize_media' => array('', 'true'),
'hashify_file_name' => array(['WP_STATELESS_MEDIA_HASH_FILENAME' => 'WP_STATELESS_MEDIA_CACHE_BUSTING'], 'false'),
+ 'dynamic_image_support' => array(['WP_STATELESS_MEDIA_ON_FLY' => 'WP_STATELESS_DYNAMIC_IMAGE_SUPPORT'], 'false'),
);
private $network_only_settings = array(
@@ -297,6 +298,8 @@ public function refresh() {
}
$this->set( 'sm.strings', $this->strings );
+
+ do_action('wp_stateless_settings_refresh', $this);
}
/**
@@ -411,8 +414,6 @@ public function parse_root_dir_wildcards ( $path ) {
return $result;
}
-
-
/**
* Add menu options
*/
diff --git a/lib/classes/class-upgrader.php b/lib/classes/class-upgrader.php
index 960afe9ef..712071a36 100644
--- a/lib/classes/class-upgrader.php
+++ b/lib/classes/class-upgrader.php
@@ -131,6 +131,20 @@ private static function upgrade() {
if ($sm_mode == 'stateless') update_option('sm_mode', 'ephemeral');
}
+ /**
+ * Upgrade to v4.0
+ */
+ if ( $version && version_compare($version, '4.0', '<') ) {
+ $modules = get_option('stateless-modules', []);
+
+ if ( is_array($modules) && isset($modules['dynamic-image-support']) ) {
+ update_option('sm_dynamic_image_support', $modules['dynamic-image-support']);
+
+ unset($modules['dynamic-image-support']);
+ update_option('stateless-modules', $modules);
+ }
+ }
+
update_option('wp_sm_version', ud_get_stateless_media()->args['version']);
}
@@ -179,6 +193,20 @@ private static function upgrade_network($version) {
if ($sm_mode_site == 'stateless') update_site_option('sm_mode', 'ephemeral');
}
+ /**
+ * Upgrade to v4.0
+ */
+ if ( $version && version_compare($version, '4.0', '<') ) {
+ $modules = get_site_option('stateless-modules', []);
+
+ if ( is_array($modules) && isset($modules['dynamic-image-support']) ) {
+ update_site_option('sm_dynamic_image_support', $modules['dynamic-image-support']);
+
+ unset($modules['dynamic-image-support']);
+ update_site_option('stateless-modules', $modules);
+ }
+ }
+
update_site_option('wp_sm_version', ud_get_stateless_media()->args['version']);
}
diff --git a/lib/classes/class-utility.php b/lib/classes/class-utility.php
index 5c00314fa..b5d596967 100644
--- a/lib/classes/class-utility.php
+++ b/lib/classes/class-utility.php
@@ -309,7 +309,8 @@ public static function add_media($metadata, $attachment_id, $force = false, $arg
'contentDisposition' => $_contentDisposition,
));
- if ($sm_mode == 'stateless' && !wp_doing_ajax() && !wp_doing_cron()) {
+ if ($sm_mode == 'stateless' && !wp_doing_ajax() && !wp_doing_cron()
+ || ($sm_mode == 'stateless' && wp_doing_ajax()) ) {
global $gs_client;
$media_args = wp_parse_args($media_args, array(
diff --git a/lib/classes/compatibility/google-app-engine.php b/lib/classes/compatibility/google-app-engine.php
deleted file mode 100644
index 7fefae956..000000000
--- a/lib/classes/compatibility/google-app-engine.php
+++ /dev/null
@@ -1,38 +0,0 @@
- 'WP_STATELESS_COMPATIBILITY_GAE'];
- protected $description = 'Ensures compatibility between WordPress media and Google App Engine in Stateless mode.';
- protected $server_constant = 'GAE_VERSION';
- protected $sm_mode_required = 'stateless';
-
- public function __construct() {
- $modules = get_option('stateless-modules', array());
-
- if (empty($modules[$this->id])) {
- // Legacy settings
- $this->enabled = get_option('sm_gae', false);
- }
-
- $this->init();
- }
-
- public function module_init($sm) {
- }
- }
- }
-}
diff --git a/lib/classes/compatibility/imagify.php b/lib/classes/compatibility/imagify.php
deleted file mode 100644
index f3eb56f26..000000000
--- a/lib/classes/compatibility/imagify.php
+++ /dev/null
@@ -1,304 +0,0 @@
-is_extension_supported()) {
- return false;
- }
- } elseif (function_exists('imagify_is_attachment_mime_type_supported')) {
- // Use `imagify_is_attachment_mime_type_supported( $attachment_id )`.
- if (!imagify_is_attachment_mime_type_supported($attachment_id)) {
- return false;
- }
- } elseif (!wp_attachment_is_image($attachment_id)) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Added fix for Imagify version 1.9
- * In Ephemeral mode remove files from server after optimization process `imagify_after_optimize_file`
- * @param $return
- * @param $metadata
- * @param $attachment_id
- * @param bool $force
- * @param array $args
- * @return bool
- * @author palant@ud
- */
- public function skip_remove_media($return, $metadata, $attachment_id, $force = false, $args = array()) {
- global $doing_manual_sync;
-
- if ($force || $doing_manual_sync || !get_imagify_option('auto_optimize')) return false;
-
- $imagify = new \Imagify\Optimization\File(get_attached_file($attachment_id));
-
- if (is_callable(array($imagify, 'is_supported'))) {
- if (!$imagify->is_supported(imagify_get_mime_types())) {
- return false;
- }
- } elseif (function_exists('imagify_is_attachment_mime_type_supported')) {
- // Use `imagify_is_attachment_mime_type_supported( $attachment_id )`.
- if (!imagify_is_attachment_mime_type_supported($attachment_id)) {
- return false;
- }
- } elseif (!wp_attachment_is_image($attachment_id)) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Try to restore images before compression
- *
- * @param $attachment_id
- * @return mixed
- */
- public function fix_missing_file($attachment_id) {
- /**
- * If mode is ephemeral then we change it to cdn in order images not being deleted before optimization
- * Remember that we changed mode via global var
- */
- if (ud_get_stateless_media()->get('sm.mode') == 'ephemeral') {
- ud_get_stateless_media()->set('sm.mode', 'cdn');
- global $wp_stateless_imagify_mode;
- $wp_stateless_imagify_mode = 'ephemeral';
- }
-
- $upload_basedir = wp_upload_dir();
- $upload_basedir = trailingslashit($upload_basedir['basedir']);
- $meta_data = wp_get_attachment_metadata($attachment_id);
- $file = $upload_basedir . $meta_data['file'];
-
- /**
- * Try to get all missing files from GCS
- */
- if (!file_exists($file)) {
- ud_get_stateless_media()->get_client()->get_media(apply_filters('wp_stateless_file_name', $meta_data['file']), true, $file);
- }
-
- if (!empty($meta_data['sizes']) && is_array($meta_data['sizes'])) {
- $upload_basedir = trailingslashit(dirname($file));
- foreach ($meta_data['sizes'] as $image) {
- if (!empty($image['gs_name']) && !file_exists($file = $upload_basedir . $image['file'])) {
- ud_get_stateless_media()->get_client()->get_media(apply_filters('wp_stateless_file_name', $image['gs_name']), true, $file);
- }
- }
- }
- }
-
- /**
- * If image size not exist then upload it to GS.
- *
- * $args = array(
- * 'thumbnail' => $thumbnail,
- * 'p_img_large' => $p_img_large,
- * )
- * @param $id
- */
- public function after_imagify_optimize_attachment($id) {
- /**
- * Restore ephemeral mode if needed
- */
- global $wp_stateless_imagify_mode;
- if ($wp_stateless_imagify_mode == 'ephemeral') {
- ud_get_stateless_media()->set('sm.mode', 'ephemeral');
- }
-
- $metadata = wp_get_attachment_metadata($id);
- ud_get_stateless_media()->add_media($metadata, $id, true);
-
- // Sync backup file with GCS
- if (current_filter() == 'after_imagify_optimize_attachment') {
- /**
- * If mode is ephemeral then we change it to cdn in order images not being deleted before optimization
- * Remember that we changed mode via global var
- * @todo remove if Imagify implement "imagify_has_backup" filter.
- */
- if (ud_get_stateless_media()->get('sm.mode') == 'ephemeral') {
- ud_get_stateless_media()->set('sm.mode', 'cdn');
- global $wp_stateless_imagify_mode;
- $wp_stateless_imagify_mode = 'ephemeral';
- }
-
- $file_path = get_attached_file($id);
- $backup_path = get_imagify_attachment_backup_path($file_path);
- if (file_exists($backup_path)) {
- $overwrite = apply_filters('imagify_backup_overwrite_backup', false, $file_path, $backup_path);
- // wp_stateless_file_name filter will remove the basedir from the path and prepend with root dir.
- $name = apply_filters('wp_stateless_file_name', $backup_path);
- do_action('sm:sync::syncFile', $name, $backup_path, $overwrite);
- }
- }
- }
-
- /**
- * Restore backup file from GCS if not exist.
- * @param $id
- */
- public function get_image_from_gcs($id) {
- $file_path = get_attached_file($id);
- $backup_path = get_imagify_attachment_backup_path($file_path);
- if (!file_exists($backup_path)) {
- $upload_dir = wp_upload_dir();
- $name = str_replace(trailingslashit($upload_dir['basedir']), '', $backup_path);
- $name = apply_filters('wp_stateless_file_name', $name);
- do_action('sm:sync::syncFile', $name, $backup_path, true);
- }
- }
-
- /**
- * Check if backup exists in GCS.
- * @param $return
- * @param $has_backup
- * @return bool
- */
- public function imagify_has_backup($return, $has_backup) {
- if (!$return && $has_backup) {
- $name = apply_filters('wp_stateless_file_name', $has_backup);
- $return = (bool) apply_filters('sm:sync::queue_is_exists', $name);
- }
- return $return;
- }
-
- /**
- * Synchronization after optmize process
- * @param $file
- * @param array $args
- */
- public function imagify_after_optimize_file($file, $args = array()) {
-
- global $wp_stateless_imagify_mode;
- if ($wp_stateless_imagify_mode == 'ephemeral') {
- ud_get_stateless_media()->set('sm.mode', 'ephemeral');
- }
-
- $name = apply_filters('wp_stateless_file_name', basename($file));
-
- if (file_exists($file)) {
- add_filter('upload_mimes', array($this, 'add_webp_mime'), 10, 2);
- /**
- * Media already on GCS, so only replacing data on it. For webp format adding path and status to wp_sm_sync table
- */
- do_action('sm:sync::syncFile', $name, $file, true, array('use_root' => true, 'skip_db' => (substr($name, -4) == "webp" ? false : true)));
- remove_filter('upload_mimes', array($this, 'add_webp_mime'), 10);
- }
- }
-
- /**
- * @param $return
- * @param $process
- * @param $file
- * @param $thumb_size
- * @param $optimization_level
- * @param $webp
- * @param $is_disabled
- * @return mixed
- */
- public function imagify_before_optimize_size($return, $process, $file, $thumb_size, $optimization_level, $webp, $is_disabled) {
-
- try {
- $attachment_id = $this->getProperties($this->getProperties($this->getProperties($process)['data'])['media'])['id'];
-
- $full_size_path = $file->get_path();
- $name = apply_filters('wp_stateless_file_name', basename($full_size_path), true, $attachment_id);
- do_action('sm:sync::syncFile', $name, $full_size_path, true, ['download' => true]);
- // error_log("\n\ndo_action( 'sm:sync::syncFile', $name, $full_size_path, true, ['download' => true] );");
- } catch (\Throwable $th) {
- //throw $th;
- }
- return $return;
- }
-
- /**
- * Get properties from protected value
- * @param $process
- * @return array
- */
- public function getProperties($process) {
- $properties = array();
- try {
- $rc = new \ReflectionClass($process);
- do {
- $rp = array();
- /* @var $p \ReflectionProperty */
- foreach ($rc->getProperties() as $p) {
- $p->setAccessible(true);
- $rp[$p->getName()] = $p->getValue($process);
- }
- $properties = array_merge($rp, $properties);
- } while ($rc = $rc->getParentClass());
- } catch (\ReflectionException $e) {
- }
- return $properties;
- }
- }
- }
-}
diff --git a/lib/classes/compatibility/js/shortpixel.js b/lib/classes/compatibility/js/shortpixel.js
deleted file mode 100644
index 7e6ac8322..000000000
--- a/lib/classes/compatibility/js/shortpixel.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Overriding sliderUpdate() function of shortpixel-image-optimiser\res\js\short-pixel.js
- * We need to replace sites url with GCS url
- */
-
-// backing up original function
-var _bk_sliderUpdate = sliderUpdate;
-
-// overriding the original function
-sliderUpdate = function sliderUpdate(id, thumb, bkThumb, percent, filename) {
- // replacing sites url with GCS url.
- thumb = thumb.replace(
- _stateless_short_pixel.baseurl,
- _stateless_short_pixel.bucketLink
- );
- // using original function aftr altering thumb url.
- _bk_sliderUpdate(id, thumb, bkThumb, percent, filename);
-};
\ No newline at end of file
diff --git a/lib/classes/compatibility/shortpixel.php b/lib/classes/compatibility/shortpixel.php
deleted file mode 100644
index 863a0200c..000000000
--- a/lib/classes/compatibility/shortpixel.php
+++ /dev/null
@@ -1,486 +0,0 @@
-path('lib/classes/compatibility/js/shortpixel.js', 'url'), array('shortpixel'), '', true);
-
- $image_host = ud_get_stateless_media()->get_gs_host();
- $bucketLink = apply_filters('wp_stateless_bucket_link', $image_host);
-
- wp_localize_script('stateless-short-pixel', '_stateless_short_pixel', array('baseurl' => $upload_dir['baseurl'], 'bucketLink' => $bucketLink,));
- }
-
- /**
- * Return Path of ShortPixel backup path.
- * Bypass the checking whether a backup file exist when returning backup path.
- * @todo check on GCS if backup really exist. Maybe we can implement transient caching for performance.
- *
- * @param $ret
- * @param $file
- * @param $thumbs
- * @return string
- */
- public function getBackupFolderAny($ret, $file, $thumbs) {
- if ($ret == false) {
- $fullSubDir = $this->returnSubDir($file);
- $ret = SHORTPIXEL_BACKUP_FOLDER . '/' . $fullSubDir;
- }
- return $ret;
- }
-
- /**
- * Check whether image exist on GCS.
- * Only when image is not available on server.
- *
- * @param $return
- * @param $path
- * @param null $id
- * @return bool
- */
- public function shortpixel_image_exists($return, $path, $id = null) {
- if ($return) return $return;
-
- $key = "stateless_url_to_postid_" . md5($path);
- $return = get_transient($key);
- // echo "\npath: $path \nKey: $key\nReturn: $return\nID: $id\n ";
- if (!$return) {
- // Checking by matching file name in gs_name and $path.
- if (!empty($id)) {
- $metadata = wp_get_attachment_metadata($id);
- $basename = basename($path);
- if (!empty($metadata['gs_name'])) {
- $gs_basename = basename($metadata['gs_name']);
- if ($gs_basename == $basename) {
- $return = true;
- }
-
- if (is_array($metadata['sizes'])) {
- foreach ($metadata['sizes'] as $key => &$data) {
- if (empty($data['gs_name'])) continue;
- $gs_basename = basename($data['gs_name']);
- if ($gs_basename == $basename) {
- $return = true;
- }
- }
- }
- }
- } // Directly check on GCS if image exist.
- else if (empty($id)) {
- $wp_uploads_dir = wp_get_upload_dir();
- $gs_name = str_replace(trailingslashit($wp_uploads_dir['basedir']), '', $path);
- $gs_name = str_replace(trailingslashit($wp_uploads_dir['baseurl']), '', $gs_name);
- $gs_name = str_replace(trailingslashit(ud_get_stateless_media()->get_gs_host()), '', $gs_name);
- $gs_name = apply_filters('wp_stateless_file_name', $gs_name);
- if ($media = ud_get_stateless_media()->get_client()->media_exists($gs_name)) {
- $return = true;
- }
- }
- set_transient($key, $return, 10 * MINUTE_IN_SECONDS);
- }
- return $return;
- }
-
- /**
- * Short-circuit filter.
- * We need to remove backup image from GCS when shortpixel tries to delete from server.
- * We are returning true to short-circuit in ephemeral mode, because file not exist in server.
- *
- * @param $return
- * @param $paths
- * @return bool
- */
- public function shortpixel_skip_delete_backups_and_webps($return, $paths) {
- if (empty($paths) || !is_array($paths)) return $return;
-
- $sp__uploads = wp_upload_dir();
- $fullSubDir = $this->returnSubDir($paths[0]);
- $backup_path = SHORTPIXEL_BACKUP_FOLDER . '/' . $fullSubDir;
-
- foreach ($paths as $key => $path) {
- // Removing backup
- $name = apply_filters('wp_stateless_file_name', SHORTPIXEL_BACKUP . '/' . $fullSubDir . basename($path));
- do_action('sm:sync::deleteFile', $name);
-
- // Removing WebP
- $backup_images = \WPShortPixelSettings::getOpt('wp-short-create-webp');
- if ($backup_images) {
- $name = str_replace($sp__uploads['basedir'], '', $path);
- $name = apply_filters('wp_stateless_file_name', $name . '.webp');
- do_action('sm:sync::deleteFile', $name);
- }
- }
-
- if (ud_get_stateless_media()->get('sm.mode') == 'ephemeral') {
- return true;
- }
- // When ephemeral mode isn't set backup files will be available in server. So no short-circuit.
- return $return;
- }
-
- /**
- * Skip the original backup process in ephemeral mode.
- *
- * @param $return
- * @param $mainPath
- * @param $PATHs
- * @return bool
- */
- public function shortpixel_skip_backup($return, $mainPath, $PATHs) {
- if (ud_get_stateless_media()->get('sm.mode') == 'ephemeral') {
- return true;
- }
- return $return;
- }
-
- /**
- * In ephemeral mode we need to take backup directly from original location.
- * Because we will skip the backup process of shortpixel.
- *
- * @param $metadata
- * @param $attachment_id
- * @return mixed
- */
- public function wp_update_attachment_metadata($metadata, $attachment_id) {
- if (ud_get_stateless_media()->get('sm.mode') == 'ephemeral') {
- $backup_images = \WPShortPixelSettings::getOpt('wp-short-backup_images');
- if ($backup_images) {
- $this->sync_backup_file($attachment_id, $metadata, false, array('before_optimization' => true));
- }
- }
- return $metadata;
- }
-
- /**
- * Sync image after optimization.
- *
- * @param $id
- */
- public function shortpixel_image_optimised($id) {
- $metadata = wp_get_attachment_metadata($id);
- ud_get_stateless_media()->add_media($metadata, $id, true);
- // Sync the webp to GCS
- $create_webp = \WPShortPixelSettings::getOpt('wp-short-create-webp');
- if ($create_webp) {
- $this->sync_webp_file($id, $metadata);
- }
- // Don't needed in ephemeral mode. In ephemeral mode the back will be sync once on wp_update_attachment_metadata filter.
- if (ud_get_stateless_media()->get('sm.mode') !== 'ephemeral') {
- $this->sync_backup_file($id, $metadata, true);
- }
- }
-
- /**
- * Before shortpixel tries to restore from backup we need to make files available on server.
- *
- * @param $id
- * @param null $metadata
- */
- public function shortpixel_before_restore_image($id, $metadata = null) {
- $this->sync_backup_file($id, $metadata, true, array('download' => true));
- }
-
- /**
- * Disable default shortpixel restore and directly update image on GCS from backup copy in GCS.
- *
- * @param $return
- * @param null $id
- * @return bool
- */
- public function shortpixel_skip_restore_image($return, $id = null) {
- if (ud_get_stateless_media()->get('sm.mode') === 'ephemeral') {
- $this->client = ud_get_stateless_media()->get_client();
- $this->client->copy_media('localhost/ShortpixelBackups/wp-content/uploads/2019/04/htpps.png', 'localhost/2019/04/htpps.png');
- return true;
- }
- return $return;
- }
-
- /**
- * Sync backup image
- *
- * @param $id
- * @param null $metadata
- * @param bool $force
- * @param array $args
- * before_optimization : pass true if you want to sync directly from original path instead of backup path.
- */
- public function sync_backup_file($id, $metadata = null, $force = false, $args = array()) {
- $args = wp_parse_args($args, array(
- 'download' => false, // whether to only download.
- 'before_optimization' => false, // whether to delete local file in ephemeral mode.
- ));
-
- /* Get metadata in case if method is called directly. */
- if (empty($metadata)) {
- $metadata = wp_get_attachment_metadata($id);
- }
- /* Now we go through all available image sizes and upload them to Google Storage */
- if (!empty($metadata['sizes']) && is_array($metadata['sizes'])) {
-
- // Sync backup file with GCS
- $file_path = get_attached_file($id);
- $fullSubDir = $this->returnSubDir($file_path);
- $backup_path = SHORTPIXEL_BACKUP_FOLDER . '/' . $fullSubDir;
- if ($args['before_optimization']) {
- $upload_dir = wp_upload_dir();
- $backup_path = $upload_dir['basedir'] . '/' . dirname($metadata['file']);
- $args = array('ephemeral' => false);
- }
-
- $absolutePath = trailingslashit($backup_path) . basename($metadata['file']);
- $name = apply_filters('wp_stateless_file_name', SHORTPIXEL_BACKUP . '/' . $fullSubDir . basename($metadata['file']));
- do_action('sm:sync::syncFile', $name, $absolutePath, $force, $args);
-
- foreach ((array) $metadata['sizes'] as $image_size => $data) {
- $absolutePath = trailingslashit($backup_path) . $data['file'];
- $name = apply_filters('wp_stateless_file_name', SHORTPIXEL_BACKUP . '/' . $fullSubDir . $data['file']);
-
- do_action('sm:sync::syncFile', $name, $absolutePath, $force, $args);
- }
- }
- }
-
- /**
- * Sync from sync tab
- *
- * @param $id
- * @param null $metadata
- */
- public function sync_webp_file($id, $metadata = null) {
- /* Get metadata in case if method is called directly. */
- if (empty($metadata)) {
- $metadata = wp_get_attachment_metadata($id);
- }
- add_filter('upload_mimes', array($this, 'add_webp_mime'), 10, 2);
- // Sync the webp to GCS
- ud_get_stateless_media()->add_media($metadata, $id, true, array('is_webp' => '.webp'));
- remove_filter('upload_mimes', array($this, 'add_webp_mime'), 10);
- }
-
- /**
- * return subdir for that particular attached file - if it's media library then last 3 path items, otherwise substract the uploads path
- * Has trailing directory separator (/)
- *
- * @copied from shortpixel-image-optimiser\class\db\shortpixel-meta-facade.php
- * @param type $file
- * @return string
- */
- public function returnSubDir($file) {
- $hp = wp_normalize_path(get_home_path());
- $file = wp_normalize_path($file);
- $sp__uploads = wp_upload_dir();
- if (strstr($file, $hp)) {
- $path = str_replace($hp, "", $file);
- } elseif (strstr($file, dirname(WP_CONTENT_DIR))) { //in some situations the content dir is not inside the root, check this also (ex. single.shortpixel.com)
- $path = str_replace(trailingslashit(dirname(WP_CONTENT_DIR)), "", $file);
- } elseif ((strstr(realpath($file), realpath($hp)))) {
- $path = str_replace(realpath($hp), "", realpath($file));
- } elseif (strstr($file, trailingslashit(dirname(dirname($sp__uploads['basedir']))))) {
- $path = str_replace(trailingslashit(dirname(dirname($sp__uploads['basedir']))), "", $file);
- } else {
- $path = (substr($file, 1));
- }
- $pathArr = explode('/', $path);
- unset($pathArr[count($pathArr) - 1]);
- return implode('/', $pathArr) . '/';
- }
-
- /**
- * Sync images after shortpixel restore them from backup.
- *
- * @param $attachmentID
- */
- public function handleRestoreBackup($attachmentID) {
- $metadata = wp_get_attachment_metadata($attachmentID);
- $this->add_media($metadata, $attachmentID);
- }
-
- /**
- * Customized version of wpCloud\StatelessMedia\Utility::add_media()
- * to satisfied our need in restore backup
- * If a image isn't restored from backup then ignore it.
- *
- * @param $metadata
- * @param $attachment_id
- */
- public static function add_media($metadata, $attachment_id) {
- $upload_dir = wp_upload_dir();
-
- $client = ud_get_stateless_media()->get_client();
-
- if (!is_wp_error($client)) {
-
- $fullsizepath = wp_normalize_path(get_attached_file($attachment_id));
- // Make non-images uploadable.
- if (empty($metadata['file']) && $attachment_id) {
- $metadata = array("file" => str_replace(trailingslashit($upload_dir['basedir']), '', get_attached_file($attachment_id)));
- }
-
- $file = wp_normalize_path($metadata['file']);
- $image_host = ud_get_stateless_media()->get_gs_host();
- $bucketLink = apply_filters('wp_stateless_bucket_link', $image_host);
- $_cacheControl = \wpCloud\StatelessMedia\Utility::getCacheControl($attachment_id, $metadata, null);
- $_contentDisposition = \wpCloud\StatelessMedia\Utility::getContentDisposition($attachment_id, $metadata, null);
- $_metadata = array("width" => isset($metadata['width']) ? $metadata['width'] : null, "height" => isset($metadata['height']) ? $metadata['height'] : null, 'object-id' => $attachment_id, 'source-id' => md5($attachment_id . ud_get_stateless_media()->get('sm.bucket')), 'file-hash' => md5($metadata['file']));
-
- if (file_exists($fullsizepath)) {
- $file = apply_filters('wp_stateless_file_name', $file);
-
- /* Add default image */
- $media = $client->add_media($_mediaOptions = array_filter(array('force' => true, 'name' => $file, 'absolutePath' => wp_normalize_path(get_attached_file($attachment_id)), 'cacheControl' => $_cacheControl, 'contentDisposition' => $_contentDisposition, 'mimeType' => get_post_mime_type($attachment_id), 'metadata' => $_metadata)));
-
- // ephemeral mode: we don't need the local version.
- if (ud_get_stateless_media()->get('sm.mode') === 'ephemeral') {
- unlink($fullsizepath);
- }
- }
-
- /* Now we go through all available image sizes and upload them to Google Storage */
- if (!empty($metadata['sizes']) && is_array($metadata['sizes'])) {
-
- $path = wp_normalize_path(dirname(get_attached_file($attachment_id)));
- $mediaPath = apply_filters('wp_stateless_file_name', trim(dirname($metadata['file']), '\/\\'));
-
- foreach ((array) $metadata['sizes'] as $image_size => $data) {
-
- $absolutePath = wp_normalize_path($path . '/' . $data['file']);
-
- if (!file_exists($absolutePath)) {
- continue;
- }
-
- /* Add 'image size' image */
- $media = $client->add_media(array('force' => true, 'name' => $file_path = trim($mediaPath . '/' . $data['file'], '/'), 'absolutePath' => $absolutePath, 'cacheControl' => $_cacheControl, 'contentDisposition' => $_contentDisposition, 'mimeType' => $data['mime-type'], 'metadata' => array_merge($_metadata, array('width' => $data['width'], 'height' => $data['height'], 'child-of' => $attachment_id, 'file-hash' => md5($data['file'])))));
-
- /* Break if we have errors. */
- if (!is_wp_error($media)) {
- // ephemeral mode: we don't need the local version.
- if (ud_get_stateless_media()->get('sm.mode') === 'ephemeral') {
- unlink($absolutePath);
- }
- }
- }
- }
- }
- }
- // End add_media
-
- /**
- * modifying gs_name and absolutePath so that we can upload webp image using the same Utility::add_media function.
- *
- * @param $args
- * @return mixed
- */
- public function wp_stateless_add_media_args($args) {
- if (!empty($args['is_webp']) && $args['is_webp']) {
- if (\file_exists($args['absolutePath'] . '.webp')) {
- $args['name'] = $args['name'] . '.webp';
- $args['absolutePath'] = $args['absolutePath'] . '.webp';
- } else {
- $pathinfo = pathinfo($args['absolutePath']);
- $absolutePath = trailingslashit($pathinfo['dirname']) . $pathinfo['filename'] . '.webp';
- if (file_exists($absolutePath)) {
- $args['name'] = $args['name'] . '.webp';
- $args['absolutePath'] = $absolutePath;
- }
- }
- $args['mimeType'] = 'image/webp';
- }
- return $args;
- }
-
- /**
- * Bypass server url check and return base url for GCS image.
- *
- * @param $imageBase
- * @param $src
- * @return mixed
- */
- public function shortpixel_webp_image_base($imageBase, $src) {
- $gs_link = \ud_get_stateless_media()->convert_to_gs_link($src, true);
- if ($gs_link) {
- $imageBase = trailingslashit(dirname($gs_link));
- }
- return $imageBase;
- }
-
- /**
- * @param $URLs
- * @param $id
- * @return mixed
- */
- public function shortpixel_image_urls($URLs, $id) {
- foreach ($URLs as $key => $url) {
- $url_parts = wp_parse_url($url);
- if ($url_parts['host'] == 'storage.googleapis.com') {
- if (preg_match("@(^/?.*?/)(.*)@", $url_parts['path'], $matches)) {
- $bucket = trim($matches[1], '/');
- $url_parts['path'] = $matches[2];
- $url_parts['host'] = $bucket . '.' . $url_parts['host'];
- $URLs[$key] = Utility::join_url($url_parts);
- }
- }
- }
- return $URLs;
- }
- }
- }
-}
diff --git a/lib/classes/compatibility/siteorigin-css.php b/lib/classes/compatibility/siteorigin-css.php
deleted file mode 100644
index 325a268d1..000000000
--- a/lib/classes/compatibility/siteorigin-css.php
+++ /dev/null
@@ -1,73 +0,0 @@
-get_client()->list_objects("prefix=$prefix");
- // $files_array = $object_list->getItems();
- // foreach ($files_array as $file) {
- // do_action( 'sm:sync::deleteFile', $file->name );
- // }
- } catch (Exception $e) {
- }
- }
- }
-
- /**
- * Change Upload BaseURL when CDN Used.
- * @param $url
- * @param $scheme
- * @param $orig_scheme
- * @return string
- */
- public function set_url_scheme($url, $scheme, $orig_scheme) {
- $position = strpos($url, 'so-css/');
- if ($position !== false) {
- $upload_data = wp_upload_dir();
- $name = substr($url, $position);
- // We need to get the absolute path before adding the bucket dir to name.
- $absolutePath = $upload_data['basedir'] . '/' . $name;
- $name = apply_filters('wp_stateless_file_name', $name, 0);
- do_action('sm:sync::syncFile', $name, $absolutePath);
- // echo "do_action( 'sm:sync::syncFile', $name, $absolutePath);\n";
- $url = ud_get_stateless_media()->get_gs_host() . '/' . $name;
- }
- return $url;
- }
- }
- }
-}
diff --git a/lib/classes/compatibility/siteorigin-widget-bundle.php b/lib/classes/compatibility/siteorigin-widget-bundle.php
deleted file mode 100644
index 412a3e936..000000000
--- a/lib/classes/compatibility/siteorigin-widget-bundle.php
+++ /dev/null
@@ -1,85 +0,0 @@
-get_gs_host() . '/' . $name;
- }
- return $url;
- }
-
- /**
- * Clear all SO CSS files from GCS after expired. 7 days
- * @param $value
- * @param $expiration
- * @param $transient
- * @return mixed
- */
- public function clear_file_cache($value, $expiration, $transient) {
- do_action('sm:sync::deleteFiles', 'siteorigin-widgets/');
- return $value;
- }
-
- /**
- * Remove single file from GCS
- * @param $new_instance
- * @param $form_options
- * @param $so_widget
- * @return mixed
- */
- public function delete_file($new_instance, $form_options, $so_widget) {
- $new_instance = $so_widget->modify_instance($new_instance);
- $style = $so_widget->get_style_name($new_instance);
- $hash = $so_widget->get_style_hash($new_instance);
- $name = $so_widget->id_base . '-' . $style . '-' . $hash;
-
- $file = 'siteorigin-widgets/' . $name . '.css';
- do_action('sm:sync::deleteFile', $file);
- return $new_instance;
- }
- }
- }
-}
diff --git a/lib/classes/compatibility/vidorev.php b/lib/classes/compatibility/vidorev.php
deleted file mode 100644
index 4ba05c75a..000000000
--- a/lib/classes/compatibility/vidorev.php
+++ /dev/null
@@ -1,40 +0,0 @@
-get_client();
-
- $file_path = apply_filters('wp_stateless_file_name', $file, 0);
- $file_info = @getimagesize($file);
-
- if ($file_info) {
- $_metadata = array(
- 'width' => $file_info[0],
- 'height' => $file_info[1],
- 'object-id' => 'unknown', // we really don't know it
- 'source-id' => md5($file . ud_get_stateless_media()->get('sm.bucket')),
- 'file-hash' => md5($file)
- );
- }
-
- $media = $client->add_media(apply_filters('sm:item:on_fly:before_add', array(
- 'use_root' => false,
- 'name' => $file_path,
- 'absolutePath' => wp_normalize_path($file),
- 'cacheControl' => apply_filters('sm:item:cacheControl', 'public, max-age=36000, must-revalidate', $_metadata),
- 'contentDisposition' => null,
- 'mimeType' => $type,
- 'metadata' => $_metadata
- )));
-
- $upload['url'] = ud_get_stateless_media()->get_gs_host() . '/' . $file_path;
- return $upload;
- }
- }
- }
-}
diff --git a/lib/classes/compatibility/woocommerce.php b/lib/classes/compatibility/woocommerce.php
deleted file mode 100644
index 5e2f10aa7..000000000
--- a/lib/classes/compatibility/woocommerce.php
+++ /dev/null
@@ -1,47 +0,0 @@
-"Over HTTP Check" setting is enabled.';
- protected $plugin_file = 'wp-retina-2x-pro/wp-retina-2x-pro.php';
- protected $sm_mode_not_supported = ['stateless'];
-
- /**
- * @param $sm
- */
- public function module_init($sm) {
- // Sync image.
- // wr2x_before_generate_retina is always called
- // where wr2x_before_regenerate called from ajax requests.
- add_action('wr2x_before_generate_retina', array($this, 'before_generate_retina'));
- add_action('wr2x_retina_file_added', array($this, 'retina_file_added'), 10, 3);
-
- // Delete retina image from GCS.
- add_action('delete_attachment', array($this, 'delete_retina'));
- // Manual Sync retina images.
- add_action('sm:synced::image', array($this, 'manual_sync_retina'), 10, 2);
-
- $over_http = get_option('wr2x_over_http_check', false);
- if (!$over_http) {
- $url = admin_url('admin.php?page=wr2x_settings-menu');
- ud_get_stateless_media()->errors->add(array('key' => "wp-retina-2x-pro-over-http-check", 'title' => sprintf(__("WP Stateless Compatibility: WP Retina 2x Pro", ud_get_stateless_media()->domain)), 'message' => sprintf(__('Please enable the "Over HTTP Check" settings in Meow Apps > Retina.', ud_get_stateless_media()->domain), $url),), 'notice');
- }
- }
-
- /**
- * Download image from GCS to server if doesn't exists.
- *
- * @param int $attachment_id
- * @return void
- */
- public function before_generate_retina($attachment_id) {
- $upload_basedir = wp_upload_dir();
- $upload_basedir = trailingslashit($upload_basedir['basedir']);
- $metadata = wp_get_attachment_metadata($attachment_id);
- $image_sizes = Utility::get_path_and_url($metadata, $attachment_id);
-
- foreach ($image_sizes as $image) {
- if (!empty($image['gs_name']) && !file_exists($image['path'])) {
- ud_get_stateless_media()->get_client()->get_media($image['gs_name'], true, $image['path']);
- }
- }
- }
-
- /**
- * Upload retina image to GCS.
- *
- * @param int $attachment_id
- * @param String $retina_file
- * @param String $name image size
- * @return void
- */
- public function retina_file_added($attachment_id, $retina_file, $name) {
- $gs_name = apply_filters('wp_stateless_file_name', $retina_file, 0);
- do_action('sm:sync::syncFile', $gs_name, $retina_file, true, array('use_root' => true));
- }
-
- /**
- * Delete retina image from GCS
- *
- * @param int $attachment_id
- * @return void
- */
- public function delete_retina($attachment_id) {
- $metadata = wp_get_attachment_metadata($attachment_id);
- $image_sizes = Utility::get_path_and_url($metadata, $attachment_id);
- $ignore = get_option("wr2x_ignore_sizes");
- if (empty($ignore)) $ignore = array();
-
- foreach ($image_sizes as $size => $img) {
- if (in_array($size, $ignore)) {
- continue;
- }
- $pathinfo = pathinfo($img['gs_name']);
- $gs_name_retina = trailingslashit($pathinfo['dirname']) . $pathinfo['filename'] . '@2x.' . $pathinfo['extension'];
- // @todo Sometime relevant file don't exist on GCS. Try to skip those when retina don't exist.
- do_action('sm:sync::deleteFile', $gs_name_retina);
- }
- }
-
- /**
- * Sync retina images when manual sync is triggered.
- *
- * @param int $attachment_id
- * @param array $metadata
- * @return void
- */
- public function manual_sync_retina($attachment_id, $metadata) {
- $image_sizes = Utility::get_path_and_url($metadata, $attachment_id);
-
- $ignore = get_option("wr2x_ignore_sizes");
- if (empty($ignore)) $ignore = array();
-
- foreach ($image_sizes as $size => $img) {
- if (in_array($size, $ignore)) {
- continue;
- }
-
- $pathinfo = pathinfo($img['path']);
- $retina_file = trailingslashit($pathinfo['dirname']) . $pathinfo['filename'] . '@2x.' . $pathinfo['extension'];
- $gs_name = apply_filters('wp_stateless_file_name', $retina_file, 0);
-
- // @todo Sometime relevant file don't exist on GCS. Try to skip those when retina don't exist.
- do_action('sm:sync::syncFile', $gs_name, $retina_file, false, array('use_root' => true));
- }
- }
- }
- }
-}
diff --git a/lib/classes/compatibility/wp-smush.php b/lib/classes/compatibility/wp-smush.php
deleted file mode 100644
index 948e1c4da..000000000
--- a/lib/classes/compatibility/wp-smush.php
+++ /dev/null
@@ -1,238 +0,0 @@
-core()->mod->settings->get('auto');
- } else {
- global $wpsmush_settings;
- $auto_smush = $wpsmush_settings->settings['auto'];
- }
-
- if (
- !$auto_smush || !wp_attachment_is_image($attachment_id) ||
- !apply_filters('wp_smush_image', true, $attachment_id) ||
- !(
- ((!empty($_POST['action']) && 'upload-attachment' == $_POST['action']) || isset($_POST['post_id'])) &&
- // And, check if Async is enabled.
- defined('WP_SMUSH_ASYNC') && WP_SMUSH_ASYNC)
- ) {
- return false;
- }
- return true;
- }
-
- /**
- * Sync image after it's been optimized.
- *
- * @param int $attachment_id attachment id
- * @param array $stats compression stats
- *
- * @return null
- */
- public function image_optimized($attachment_id, $stats) {
- // Sync the attachment to GCS
- ud_get_stateless_media()->add_media(array(), $attachment_id, true);
-
- // also sync the backup images
- $this->sync_backup($attachment_id);
- }
-
- /**
- * If local file don't exists then download it from GCS
- *
- * @param string $file_path Full file path
- * @param string $attachment_id
- * @param array $size_details Array of width and height for the image
- *
- * @return null
- */
- function maybe_download_file($file_path = '', $attachment_id = '', $size_details = array()) {
- if (empty($file_path) || empty($attachment_id)) {
- return;
- }
-
- //Download if file not exists
- if (!file_exists($file_path)) {
- $client = ud_get_stateless_media()->get_client();
- $metadata = wp_get_attachment_metadata($attachment_id);
- if (!empty($metadata['gs_name'])) {
- $image_sizes = Utility::get_path_and_url($metadata, $attachment_id);
- foreach ($image_sizes as $size => $img) {
- $client->get_media(apply_filters('wp_stateless_file_name', $img['gs_name']), true, $img['path']);
- }
-
- $gs_name = dirname($metadata['gs_name']) . '/' . basename($file_path);
- // We need to remove backup from GCS if it's a restore action
- // @todo revise this code
- if ($this->hook_from_restore_image()) {
- $client->remove_media(apply_filters('wp_stateless_file_name', $gs_name));
- }
- }
- }
- }
-
- /**
- * Remove backup when attachment is removed
- *
- * @param $attachment_id
- */
- function remove_backup($attachment_id) {
- $upload_dir = wp_get_upload_dir();
- $metadata = wp_get_attachment_metadata($attachment_id);
- $backup_paths = get_post_meta($attachment_id, '_wp_attachment_backup_sizes', true);
-
- if (!empty($metadata['gs_name']) && !empty($backup_paths) && is_array($backup_paths)) {
- // Getting local dir path for backup image
- $base_dir = $upload_dir['basedir'] . '/' . dirname($metadata['file']);
- // Getting GCS dir name from meta data. In case Bucket Folder used.
- $gs_dir = dirname($metadata['gs_name']);
- foreach ($backup_paths as $key => $data) {
- $gs_name = $gs_dir . '/' . basename($data['file']);
- // Path of backup image
- $backup_path = $base_dir . '/' . basename($data['file']);
- do_action('sm:sync::deleteFile', apply_filters('wp_stateless_file_name', $gs_name), $backup_path);
- delete_transient('sm-wp-smush-backup-exists-' . $attachment_id);
- }
- }
- }
-
- /**
- * Checks if we've backup on gcs for the given attachment id and backup path
- *
- * @param string $attachment_id
- * @param string $backup_path
- *
- * @return bool
- */
- function backup_exists_on_gcs($exists, $attachment_id = '', $backup_path = '') {
- if (!$exists && $attachment_id) {
- if (get_transient('sm-wp-smush-backup-exists-' . $attachment_id)) {
- return true;
- }
-
- $metadata = wp_get_attachment_metadata($attachment_id);
- if (!empty($metadata['gs_name'])) {
- $gs_name = dirname($metadata['gs_name']) . '/' . basename($backup_path);
- if (ud_get_stateless_media()->get_client()->media_exists(apply_filters('wp_stateless_file_name', $gs_name))) {
- set_transient('sm-wp-smush-backup-exists-' . $attachment_id, true, HOUR_IN_SECONDS);
- return true;
- }
- }
- }
-
- return $exists;
- }
-
- /**
- * Sync backup image to GCS
- *
- * @param $attachment_id
- * @param array $metadata
- */
- public function sync_backup($attachment_id, $metadata = array()) {
- $upload_dir = wp_get_upload_dir();
- if (empty($metadata) || empty($metadata['gs_name'])) {
- $metadata = wp_get_attachment_metadata($attachment_id);
- }
-
- // Getting backup path from smush settings in db
- $backup_paths = get_post_meta($attachment_id, '_wp_attachment_backup_sizes', true);
-
- if (!empty($metadata['gs_name']) && !empty($backup_paths) && is_array($backup_paths)) {
- // Getting local dir for backup image
- $base_dir = $upload_dir['basedir'] . '/' . dirname($metadata['file']);
- // Getting GCS dir name from meta data. In case Bucket Folder used.
- $gs_dir = dirname($metadata['gs_name']);
-
- foreach ($backup_paths as $key => $data) {
- $gs_name = $gs_dir . '/' . basename($data['file']);
- // Path of backup image
- $backup_path = $base_dir . '/' . basename($data['file']);
- // Sync backup image with GCS
- do_action('sm:sync::syncFile', apply_filters('wp_stateless_file_name', $gs_name), $backup_path);
- delete_transient('sm-wp-smush-backup-exists-' . $attachment_id);
- }
- }
- }
-
- /**
- * Determine where we hook from
- * Is this a hook from wp smush restore image or not.
- *
- * @return bool
- */
- private function hook_from_restore_image() {
- $call_stack = debug_backtrace();
- $class_name = class_exists('WpSmushBackup') ? 'WpSmushBackup' : 'WP_Smush_Backup';
-
- if (!empty($call_stack) && is_array($call_stack)) {
- foreach ($call_stack as $step) {
-
- if ($step['function'] == 'restore_image' && $step['class'] == $class_name) {
- return true;
- }
- }
- }
-
- return false;
- }
- }
- }
-}
diff --git a/lib/classes/compatibility/wpbakery-page-builder.php b/lib/classes/compatibility/wpbakery-page-builder.php
deleted file mode 100644
index 99defa802..000000000
--- a/lib/classes/compatibility/wpbakery-page-builder.php
+++ /dev/null
@@ -1,81 +0,0 @@
-enabled) {
- // We need to add the filter on construct. Init is too late.
- add_filter('vc_wpb_getimagesize', array($this, 'vc_wpb_getimagesize'), 10, 3);
- }
- }
-
- /**
- * @param $sm
- */
- public function module_init($sm) {
- //
- }
-
- /**
- * If image size not exist then generate size info and update attachment metadata.
- *
- * $args = array(
- * 'thumbnail' => $thumbnail,
- * 'p_img_large' => $p_img_large,
- * )
- *
- * @param $args
- * @param $attach_id
- * @param $params
- * @return mixed
- */
- public function vc_wpb_getimagesize($args, $attach_id, $params) {
- if (!$this->enabled) return $args;
-
- $gs_host = ud_get_stateless_media()->get_gs_host();
- $meta_data = wp_get_attachment_metadata($attach_id);
- preg_match("/src=[\"|'](.*?)[\"|']/", $args['thumbnail'], $match);
-
- if (!empty($match[1]) && empty($meta_data['sizes'][$params['thumb_size']])) {
- $dir = wp_upload_dir();
- $url = $match[1];
- $path = str_replace($gs_host, '', $url);
- $path = trim($path, '/');
- $absolute_path = $dir['basedir'] . '/' . $path;
-
- $size = getimagesize($absolute_path);
- $filetype = wp_check_filetype($absolute_path);
- $size_info = array(
- 'file' => wp_basename($absolute_path),
- 'mime-type' => $filetype['type'],
- 'width' => $size[0],
- 'height' => $size[1],
- );
- $meta_data['sizes'][$params['thumb_size']] = $size_info;
- wp_update_attachment_metadata($attach_id, $meta_data);
- }
- return $args;
- }
- }
- }
-}
diff --git a/lib/classes/compatibility/wpforms.php b/lib/classes/compatibility/wpforms.php
deleted file mode 100644
index 575b048bb..000000000
--- a/lib/classes/compatibility/wpforms.php
+++ /dev/null
@@ -1,30 +0,0 @@
-meta_box['tabs'] ) ) {
+ return;
+ }
+
+ $tabs = (array) $obj->meta_box['tabs'];
+ foreach ( $tabs as $tab_data ) {
+ if ( is_string( $tab_data ) ) {
+ $tab_data = [ 'label' => $tab_data ];
+ }
+ $tab_data = wp_parse_args( $tab_data, [
+ 'icon' => '',
+ 'label' => '',
+ ] );
+ $strpos = [ 'fa', 'fas', 'fa-solid', 'fab', 'fa-brand', 'far', 'fa-regular' ];
+ foreach ( $strpos as $value ) {
+ if ( strpos( $tab_data['icon'], $value ) !== false ) {
+ wp_enqueue_style( 'font-awesome', 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.2.1/css/all.min.css', [], ' 6.2.1' );
+ return;
+ }
+ }
+ }
}
/**
@@ -77,7 +112,7 @@ public function closing_div() {
// Reset to initial state to be ready for other meta boxes.
$this->active = false;
- $this->fields_output = array();
+ $this->fields_output = [];
}
/**
@@ -98,7 +133,7 @@ public function show_nav( RW_Meta_Box $obj ) {
$i = 0;
foreach ( $tabs as $key => $tab_data ) {
if ( is_string( $tab_data ) ) {
- $tab_data = ['label' => $tab_data];
+ $tab_data = [ 'label' => $tab_data ];
}
$tab_data = wp_parse_args( $tab_data, [
'icon' => '',
@@ -190,7 +225,7 @@ public function capture_fields( $output, $field ) {
$tab = $field['tab'];
if ( ! isset( $this->fields_output[ $tab ] ) ) {
- $this->fields_output[ $tab ] = array();
+ $this->fields_output[ $tab ] = [];
}
$this->fields_output[ $tab ][] = $output;
diff --git a/lib/meta-box-tabs/tabs.css b/lib/meta-box-tabs/tabs.css
index 6d8142fb3..4153fb05d 100644
--- a/lib/meta-box-tabs/tabs.css
+++ b/lib/meta-box-tabs/tabs.css
@@ -1,242 +1 @@
-.rwmb-tab-nav {
- margin-bottom: -1px;
-}
-
-.rwmb-tab-nav li {
- margin: 0;
- display: inline-block;
-}
-
-.rwmb-tab-nav .rwmb-tab-active {
- border: 1px solid #eee;
- border-bottom-color: transparent;
- background: #fdfdfd;
-}
-
-.rwmb-tab-nav a {
- display: block;
- padding: 3px 5px 5px;
- text-decoration: none;
-}
-
-.rwmb-tab-nav a:active, .rwmb-tab-nav a:focus {
- outline: none;
- box-shadow: none;
-}
-
-.rwmb-tab-nav i,
-.rwmb-tab-nav img {
- vertical-align: middle;
- margin-right: .3em;
-}
-
-.rwmb-tab-nav i {
- width: 16px;
- height: 16px;
- font-size: 16px;
-}
-
-.rwmb-tab-nav img {
- width: 12px;
- height: 12px;
- display: inline-block;
-}
-
-.rwmb-tab-active a {
- color: #333;
-}
-
-.rwmb-tab-panel {
- padding: 10px 5px;
- border: 1px solid #eee;
- background: #fdfdfd;
- display: none;
-}
-
-.rwmb-tabs-box .rwmb-tab-nav li {
- background: #ebebeb;
- border: 1px solid #e5e5e5;
- margin-right: 5px;
-}
-
-.rwmb-tabs-box .rwmb-tab-nav li:hover {
- background: #fff;
-}
-
-.rwmb-tabs-box .rwmb-tab-nav a {
- color: #777;
-}
-
-.rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active {
- border-bottom-color: transparent;
-}
-
-.rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active,
-.rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active:hover {
- background: #f5f5f5;
-}
-
-.rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active a {
- color: #555;
-}
-
-.rwmb-tabs-box .rwmb-tab-panel {
- background: #f5f5f5;
- border: 1px solid #e5e5e5;
-}
-
-.rwmb-tabs-box .rwmb-clone {
- background-color: transparent;
-}
-
-.rwmb-tabs-left {
- margin: -6px -12px -12px;
- display: flex;
-}
-
-.rwmb-tabs-left .rwmb-tab-nav {
- margin: 0 -1px 0 0;
- border-right: 1px solid #eee;
- z-index: 9;
- padding: 0 !important;
-}
-
-.rwmb-tabs-left .rwmb-tab-nav li {
- display: block;
- padding: 0;
-}
-
-.rwmb-tabs-left .rwmb-tab-nav li:first-child {
- border-top: none;
-}
-
-.rwmb-tabs-left .rwmb-tab-nav a {
- padding: 5px 20px 8px 10px;
-}
-
-.rwmb-tabs-left .rwmb-tab-active {
- border-width: 1px 0 1px 0;
- border-bottom-color: #eee;
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 1px 0 rgba(0, 0, 0, 0.02);
- margin-right: -1px;
-}
-
-.rwmb-tabs-left .rwmb-tab-panels {
- flex: 1;
- border-left: 1px solid #eee;
- z-index: 1;
-}
-
-.rwmb-tabs-left .rwmb-tab-panel {
- padding: 10px 20px;
- background: #fdfdfd;
- border: none;
-}
-
-.profile-php .rwmb-tabs-left,
-.user-edit-php .rwmb-tabs-left,
-.term-php .rwmb-tabs-left,
-.edit-tags-php .rwmb-tabs-left,
-.rwmb-settings-no-boxes .rwmb-tabs-left {
- margin: 0;
- flex-wrap: wrap;
-}
-
-.profile-php .rwmb-tabs-left > h2,
-.user-edit-php .rwmb-tabs-left > h2,
-.term-php .rwmb-tabs-left > h2,
-.edit-tags-php .rwmb-tabs-left > h2,
-.rwmb-settings-no-boxes .rwmb-tabs-left > h2 {
- flex-basis: 100%;
-}
-
-.profile-php .rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active,
-.user-edit-php .rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active,
-.term-php .rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active,
-.edit-tags-php .rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active,
-.rwmb-settings-no-boxes .rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active {
- border-bottom: 1px solid #f5f5f5;
-}
-
-.profile-php .rwmb-tabs .rwmb-label,
-.profile-php .rwmb-tabs .rwmb-input,
-.user-edit-php .rwmb-tabs .rwmb-label,
-.user-edit-php .rwmb-tabs .rwmb-input,
-.term-php .rwmb-tabs .rwmb-label,
-.term-php .rwmb-tabs .rwmb-input,
-.edit-tags-php .rwmb-tabs .rwmb-label,
-.edit-tags-php .rwmb-tabs .rwmb-input,
-.rwmb-settings-no-boxes .rwmb-tabs .rwmb-label,
-.rwmb-settings-no-boxes .rwmb-tabs .rwmb-input {
- padding: 0;
-}
-
-.rwmb-settings-no-boxes .rwmb-tab-panel .rwmb-field {
- padding: 12px 0 0;
-}
-
-@media (max-width: 575px) {
- .rwmb-tabs {
- margin: -6px -12px -12px;
- }
- .rwmb-tab-nav {
- margin-top: 0;
- margin-bottom: 10px;
- }
- .rwmb-tab-nav li {
- display: block;
- border-bottom: 1px solid #eee;
- }
- .rwmb-tab-nav a {
- padding: 5px 20px 8px 10px;
- }
- .rwmb-tab-nav .rwmb-tab-active {
- background: #eee;
- border-width: 0 0 1px 0;
- }
- .rwmb-tab-panel {
- padding: 10px;
- border: none;
- background: none;
- }
- .rwmb-tabs-box .rwmb-tab-nav li {
- background: none;
- border-width: 0 0 1px 0;
- margin-right: 0;
- }
- .rwmb-tabs-box .rwmb-tab-nav li:hover {
- background: none;
- }
- .rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active {
- background: #dedede;
- }
- .rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active:hover {
- background: #dedede;
- }
- .rwmb-tabs-box .rwmb-tab-panel {
- border: none;
- background: none;
- }
- .rwmb-tabs-left {
- flex-direction: column;
- }
- .rwmb-tabs-left .rwmb-tab-nav {
- width: 100%;
- border-right: none;
- }
- .rwmb-tabs-left .rwmb-tab-nav li {
- border-bottom: 1px solid #eee;
- }
- .rwmb-tabs-left .rwmb-tab-active {
- box-shadow: none;
- background: #eee;
- border-width: 0 0 1px 0;
- margin-right: 0;
- }
- .rwmb-tabs-left .rwmb-tab-panels {
- border-left: none;
- }
- .rwmb-tabs-left .rwmb-tab-panel {
- padding: 10px;
- }
-}
+.rwmb-tab-nav{display:flex;margin-bottom:-1px;flex-wrap:wrap;padding:inherit}.rwmb-tab-nav li{margin:0;display:inline-block}.rwmb-tab-nav a{display:flex;align-items:center;gap:4px;padding:8px 12px;line-height:1;text-decoration:none}.rwmb-tab-nav a:active,.rwmb-tab-nav a:focus{outline:none;box-shadow:none}.rwmb-tab-nav i{width:16px;height:16px;font-size:16px}.rwmb-tab-nav i[class^=fa]{width:12px;height:12px;font-size:12px}.rwmb-tab-nav img{width:12px;height:12px;display:inline-block}.rwmb-tab-active{border:1px solid #ccd0d4;border-bottom-color:rgba(0,0,0,0);background:#fff}.rwmb-tab-active a{color:inherit}.rwmb-tab-panels{background:#fff;border:1px solid #ccd0d4}.rwmb-tab-panel{padding:12px;display:none}.rwmb-tabs-box .rwmb-tab-nav li{background:#f5f5f5;border:1px solid #ccd0d4;margin-right:5px}.rwmb-tabs-box .rwmb-tab-nav li:hover{background:#fff}.rwmb-tabs-box .rwmb-tab-nav a{color:inherit}.rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active{border-bottom-color:rgba(0,0,0,0)}.rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active,.rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active:hover{background:#fff}.rwmb-tabs-box .rwmb-clone{background-color:rgba(0,0,0,0)}.rwmb-tabs-left{margin:-6px -12px -12px;display:flex}.rwmb-tabs-left .rwmb-tab-nav{flex-direction:column;margin:0 -1px 0 0;border-right:1px solid #ccd0d4;background:#fafafa}.rwmb-tabs-left .rwmb-tab-nav li{display:block;min-width:180px;border-bottom:1px solid #ccd0d4}.rwmb-tabs-left .rwmb-tab-nav li:first-child{border-top:none}.rwmb-tabs-left .rwmb-tab-nav a{padding:12px}.rwmb-tabs-left .rwmb-tab-active{border-width:0 0 1px 0;margin-right:-1px;z-index:1}.rwmb-tabs-left .rwmb-tab-panels{flex:1;border-width:0 0 0 1px}.rwmb-tabs-left .rwmb-tab-panel{padding:12px 20px;border:none}.rwmb-seamless .rwmb-tabs-left{margin:0;border:1px solid #ccd0d4}.profile-php .rwmb-tabs-left,.user-edit-php .rwmb-tabs-left,.term-php .rwmb-tabs-left,.edit-tags-php .rwmb-tabs-left,.rwmb-settings-no-boxes .rwmb-tabs-left{margin:0;flex-wrap:wrap}.profile-php .rwmb-tabs-left>h2,.user-edit-php .rwmb-tabs-left>h2,.term-php .rwmb-tabs-left>h2,.edit-tags-php .rwmb-tabs-left>h2,.rwmb-settings-no-boxes .rwmb-tabs-left>h2{flex-basis:100%}.profile-php .rwmb-tabs-left .rwmb-tab-nav,.user-edit-php .rwmb-tabs-left .rwmb-tab-nav,.term-php .rwmb-tabs-left .rwmb-tab-nav,.edit-tags-php .rwmb-tabs-left .rwmb-tab-nav,.rwmb-settings-no-boxes .rwmb-tabs-left .rwmb-tab-nav{border:1px solid #ccd0d4}.profile-php .rwmb-tabs-left .rwmb-tab-panels,.user-edit-php .rwmb-tabs-left .rwmb-tab-panels,.term-php .rwmb-tabs-left .rwmb-tab-panels,.edit-tags-php .rwmb-tabs-left .rwmb-tab-panels,.rwmb-settings-no-boxes .rwmb-tabs-left .rwmb-tab-panels{border-width:1px}.profile-php .rwmb-tabs .rwmb-label,.profile-php .rwmb-tabs .rwmb-input,.user-edit-php .rwmb-tabs .rwmb-label,.user-edit-php .rwmb-tabs .rwmb-input,.term-php .rwmb-tabs .rwmb-label,.term-php .rwmb-tabs .rwmb-input,.edit-tags-php .rwmb-tabs .rwmb-label,.edit-tags-php .rwmb-tabs .rwmb-input,.rwmb-settings-no-boxes .rwmb-tabs .rwmb-label,.rwmb-settings-no-boxes .rwmb-tabs .rwmb-input{padding:0}.rwmb-settings-no-boxes .rwmb-tab-panel .rwmb-field{padding:12px 0 0}@media(max-width: 575px){.rwmb-tabs{margin:-6px -12px -12px}.rwmb-tabs>h2{margin-left:12px;margin-right:12px}.rwmb-seamless .rwmb-tabs{margin:0}.rwmb-tab-nav{flex-direction:column;margin-top:0;margin-bottom:0}.rwmb-tab-nav li{display:block;border-bottom:1px solid #ccd0d4}.rwmb-tab-nav a{padding:12px}.rwmb-tab-nav .rwmb-tab-active{border-width:0 0 1px 0}.rwmb-tab-panels{border:none;background:none}.rwmb-tabs-box .rwmb-tab-nav li{border-width:0 0 1px 0;margin-right:0}.rwmb-tabs-box .rwmb-tab-nav .rwmb-tab-active{border-bottom:1px solid #ccd0d4}.rwmb-tabs-left{flex-direction:column}.rwmb-tabs-left .rwmb-tab-nav{width:100%;border-right:none}.rwmb-tabs-left .rwmb-tab-active{margin-right:0}.rwmb-tabs-left .rwmb-tab-panel{padding-left:0;padding-right:0}}
diff --git a/lib/meta-box-tabs/tabs.js b/lib/meta-box-tabs/tabs.js
index 32d90eb5d..f596dd7f8 100644
--- a/lib/meta-box-tabs/tabs.js
+++ b/lib/meta-box-tabs/tabs.js
@@ -4,18 +4,21 @@
function switchTab() {
$( '.rwmb-tab-nav' ).on( 'click', 'a', e => {
e.preventDefault();
- showTab( e.target, e.target.parentNode.dataset.panel );
+ showTab( e.target );
} );
}
- function showTab( el, tab ) {
- var $wrapper = $( el ).closest( '.rwmb-tabs' ),
+ function showTab( el ) {
+ var tab = el.closest( 'li' ).dataset.panel,
+ $wrapper = $( el ).closest( '.rwmb-tabs' ),
$tabs = $wrapper.find( '.rwmb-tab-nav > li' ),
$panels = $wrapper.find( '.rwmb-tab-panel' );
$tabs.removeClass( 'rwmb-tab-active' ).filter( '[data-panel="' + tab + '"]' ).addClass( 'rwmb-tab-active' );
$panels.hide().filter( '.rwmb-tab-panel-' + tab ).show();
+ rwmb.$document.trigger( 'mb_init_editors' );
+
// Refresh maps, make sure they're fully loaded, when it's in hidden div (tab).
$( window ).trigger( 'rwmb_map_refresh' );
}
@@ -36,12 +39,15 @@
function showValidateErrorFields() {
var inputSelectors = 'input[class*="rwmb-error"], textarea[class*="rwmb-error"], select[class*="rwmb-error"], button[class*="rwmb-error"]';
$( document ).on( 'after_validate', 'form', e => {
- var $input = $( e.target ).find( inputSelectors );
- showTab( $input, $input.closest( '.rwmb-tab-panel' ).data( 'panel' ) );
+ var $input = $( e.target ).find( inputSelectors ),
+ $panel = $input.closest( '.rwmb-tab-panel' );
+ if ( $panel.length ) {
+ showTab( $input.closest( '.rwmb-tabs' ).find( 'li[data-panel="' + $panel.data( 'panel' ) + '"] a' )[ 0 ] );
+ }
} );
}
- $( function() {
+ $( document ).on( 'mb_ready', function () {
switchTab();
tweakForConditionalLogic();
showValidateErrorFields();
diff --git a/readme.txt b/readme.txt
index b8bac926d..d6e538e82 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,11 +1,11 @@
=== WP-Stateless - Google Cloud Storage ===
-Contributors: usability_dynamics, andypotanin, ideric, maxim.peshkov, Anton Korotkoff, planvova, balexey88
+Contributors: usability_dynamics, andypotanin, ideric, maxim.peshkov, Anton Korotkoff, planvova, balexey
Donate link: https://udx.io
Tags: google, google cloud, google cloud storage, cdn, uploads, media, stateless, backup
License: GPLv2 or later
Requires PHP: 8.0
Requires at least: 5.0
-Tested up to: 6.3.1
+Tested up to: 6.4.2
Stable tag: 4.0.0
Upload and serve your WordPress media files from Google Cloud Storage.
diff --git a/static/scripts/wp-stateless.js b/static/scripts/wp-stateless.js
index cb2469df7..0a9e8cf4c 100644
--- a/static/scripts/wp-stateless.js
+++ b/static/scripts/wp-stateless.js
@@ -135,6 +135,15 @@ var wpStatelessApp = angular
// $scope.apply();
}
}
+
+ if (value == 'stateless' && $scope.sm.readonly.hashify_file_name != 'constant' ) {
+ $scope.backup.dynamic_image_support = $scope.sm.dynamic_image_support
+ $scope.sm.dynamic_image_support = 'false'
+ } else {
+ if ($scope.backup.dynamic_image_support) {
+ $scope.sm.dynamic_image_support = $scope.backup.dynamic_image_support
+ }
+ }
})
$scope.$watch('sm.bucket_folder_type', function (value) {
diff --git a/static/views/settings_interface.php b/static/views/settings_interface.php
index fbbfd79ad..3cccad8d9 100644
--- a/static/views/settings_interface.php
+++ b/static/views/settings_interface.php
@@ -6,7 +6,7 @@
-
+
@@ -225,6 +237,23 @@
Required by Stateless Mode. Override with the WP_STATELESS_MEDIA_CACHE_BUSTING constant.", "https://wp-stateless.github.io/docs/constants/#wp_stateless_media_cache_busting"), ud_get_stateless_media()->domain); ?>
domain); ?>
+
+ domain); ?>
+
+
+
+
+
+ Not available in Stateless Mode.", ud_get_stateless_media()->domain); ?>
+
+ domain); ?>
+
@@ -234,7 +263,7 @@
'save-settings')); ?>
-
+
diff --git a/vendor/bin/mozart b/vendor/bin/mozart
deleted file mode 100755
index 50ad97f47..000000000
--- a/vendor/bin/mozart
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/usr/bin/env php
-realpath = realpath($opened_path) ?: $opened_path;
- $opened_path = $this->realpath;
- $this->handle = fopen($this->realpath, $mode);
- $this->position = 0;
-
- return (bool) $this->handle;
- }
-
- public function stream_read($count)
- {
- $data = fread($this->handle, $count);
-
- if ($this->position === 0) {
- $data = preg_replace('{^#!.*\r?\n}', '', $data);
- }
-
- $this->position += strlen($data);
-
- return $data;
- }
-
- public function stream_cast($castAs)
- {
- return $this->handle;
- }
-
- public function stream_close()
- {
- fclose($this->handle);
- }
-
- public function stream_lock($operation)
- {
- return $operation ? flock($this->handle, $operation) : true;
- }
-
- public function stream_seek($offset, $whence)
- {
- if (0 === fseek($this->handle, $offset, $whence)) {
- $this->position = ftell($this->handle);
- return true;
- }
-
- return false;
- }
-
- public function stream_tell()
- {
- return $this->position;
- }
-
- public function stream_eof()
- {
- return feof($this->handle);
- }
-
- public function stream_stat()
- {
- return array();
- }
-
- public function stream_set_option($option, $arg1, $arg2)
- {
- return true;
- }
-
- public function url_stat($path, $flags)
- {
- $path = substr($path, 17);
- if (file_exists($path)) {
- return stat($path);
- }
-
- return false;
- }
- }
- }
-
- if (
- (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
- || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
- ) {
- return include("phpvfscomposer://" . __DIR__ . '/..'.'/coenjacobs/mozart/bin/mozart');
- }
-}
-
-return include __DIR__ . '/..'.'/coenjacobs/mozart/bin/mozart';
diff --git a/vendor/coenjacobs/mozart/.github/FUNDING.yml b/vendor/coenjacobs/mozart/.github/FUNDING.yml
deleted file mode 100644
index d832a23ff..000000000
--- a/vendor/coenjacobs/mozart/.github/FUNDING.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-# These are supported funding model platforms
-
-github: [coenjacobs]
diff --git a/vendor/coenjacobs/mozart/.github/workflows/analysis.yml b/vendor/coenjacobs/mozart/.github/workflows/analysis.yml
deleted file mode 100644
index bed9ebf56..000000000
--- a/vendor/coenjacobs/mozart/.github/workflows/analysis.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: Psalm analysis
-
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
-
-jobs:
- psalm:
- name: Psalm
- runs-on: ubuntu-latest
- steps:
- - name: Checkout code
- uses: actions/checkout@v2
-
- - name: Psalm
- uses: docker://vimeo/psalm-github-actions
\ No newline at end of file
diff --git a/vendor/coenjacobs/mozart/.github/workflows/docker-latest.yml b/vendor/coenjacobs/mozart/.github/workflows/docker-latest.yml
deleted file mode 100644
index f0e5b7792..000000000
--- a/vendor/coenjacobs/mozart/.github/workflows/docker-latest.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-name: Publish latest to Docker Hub
-
-on:
- push:
- branches:
- - master
-
-jobs:
- docker:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v2
- - name: Prepare
- id: prep
- run: |
- DOCKER_IMAGE=coenjacobs/mozart
- VERSION=latest
- TAGS="${DOCKER_IMAGE}:${VERSION}"
- echo ::set-output name=tags::${TAGS}
-
- - name: Set up Docker Buildx
- id: buildx
- uses: docker/setup-buildx-action@v1
-
- - name: Cache Docker layers
- uses: actions/cache@v2
- with:
- path: /tmp/.buildx-cache
- key: ${{ runner.os }}-buildx-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-buildx-
-
- - name: Login to DockerHub
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
-
- - name: Build and push
- id: docker_build
- uses: docker/build-push-action@v2
- with:
- builder: ${{ steps.buildx.outputs.name }}
- context: .
- file: ./Dockerfile
- target: application
- platforms: linux/amd64
- push: ${{ github.event_name != 'pull_request' }}
- tags: ${{ steps.prep.outputs.tags }}
- cache-from: type=local,src=/tmp/.buildx-cache
- cache-to: type=local,dest=/tmp/.buildx-cache
diff --git a/vendor/coenjacobs/mozart/.github/workflows/main.yml b/vendor/coenjacobs/mozart/.github/workflows/main.yml
deleted file mode 100644
index bef8a5f7c..000000000
--- a/vendor/coenjacobs/mozart/.github/workflows/main.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-name: Lint and test
-
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
-
-jobs:
- tests:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- php: ['7.3', '7.4', '8.0']
- name: PHP ${{ matrix.php }} tests
- steps:
- - uses: actions/checkout@v1
- - name: Install PHP
- uses: shivammathur/setup-php@1.3.7
- with:
- php-version: ${{ matrix.php }}
- - name: Debugging
- run: |
- php --version
- php -m
- composer --version
- - name: Install dependencies
- run: composer install --prefer-dist --no-suggest --no-progress
- - name: Run tests
- run: vendor/bin/phpunit --printer mheap\\GithubActionsReporter\\Printer
- lint:
- runs-on: ubuntu-latest
- name: Lint project files
- steps:
- - uses: actions/checkout@v1
- - name: Install PHP
- uses: shivammathur/setup-php@1.3.7
- with:
- php-version: '7.4'
- - name: Debugging
- run: |
- php --version
- php -m
- composer --version
- - name: Install dependencies
- run: composer install --prefer-dist --no-suggest --no-progress
- - name: Run validate
- run: composer run lint
diff --git a/vendor/coenjacobs/mozart/.github/workflows/release.yml b/vendor/coenjacobs/mozart/.github/workflows/release.yml
deleted file mode 100644
index 074b4a871..000000000
--- a/vendor/coenjacobs/mozart/.github/workflows/release.yml
+++ /dev/null
@@ -1,92 +0,0 @@
-name: Build, tag and attach releases
-
-on: release
-
-jobs:
- create-phar:
- runs-on: ubuntu-latest
- name: Create Mozart phar
- steps:
- - uses: actions/checkout@v1
-
- - name: Install PHP
- uses: shivammathur/setup-php@1.3.7
- with:
- php-version: 7.3
-
- - name: Install dependencies
- run: composer install --no-dev --prefer-dist --no-suggest --no-progress
-
- - name: Create .phar
- run: |
- wget -O phar-composer.phar https://github.com/clue/phar-composer/releases/download/v1.2.0/phar-composer-1.2.0.phar
- mkdir build
- mv vendor build/vendor
- mv src build/src
- mv bin build/bin
- mv composer.json build
- php -d phar.readonly=off phar-composer.phar build ./build/
-
- - name: Test run mozart
- run: php mozart.phar --version
-
- - uses: meeDamian/github-release@2.0
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- files: mozart.phar
- gzip: false
- allow_override: true
- docker:
- runs-on: ubuntu-latest
- name: Create Docker tag
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: Prepare
- id: prep
- run: |
- DOCKER_IMAGE=coenjacobs/mozart
- VERSION=${{ github.event.release.tag_name }}
- TAGS="${DOCKER_IMAGE}:${VERSION}"
- echo ::set-output name=tags::${TAGS}
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v1
- with:
- platforms: all
-
- - name: Set up Docker Buildx
- id: buildx
- uses: docker/setup-buildx-action@v1
-
- - name: Cache Docker layers
- uses: actions/cache@v2
- with:
- path: /tmp/.buildx-cache
- key: ${{ runner.os }}-buildx-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-buildx-
-
- - name: Login to DockerHub
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
-
- - name: Build and push
- id: docker_build
- uses: docker/build-push-action@v2
- with:
- builder: ${{ steps.buildx.outputs.name }}
- context: .
- file: ./Dockerfile
- target: application
- platforms: linux/amd64
- push: ${{ github.event_name != 'pull_request' }}
- tags: ${{ steps.prep.outputs.tags }}
- cache-from: type=local,src=/tmp/.buildx-cache
- cache-to: type=local,dest=/tmp/.buildx-cache
-
- - name: Image digest
- run: echo ${{ steps.docker_build.outputs.digest }}
diff --git a/vendor/coenjacobs/mozart/.gitignore b/vendor/coenjacobs/mozart/.gitignore
deleted file mode 100644
index 3d6c7cac3..000000000
--- a/vendor/coenjacobs/mozart/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.idea/
-vendor/
-
-.DS_Store
-composer.lock
-.phpunit.result.cache
diff --git a/vendor/coenjacobs/mozart/Dockerfile b/vendor/coenjacobs/mozart/Dockerfile
deleted file mode 100644
index 240bd4c5b..000000000
--- a/vendor/coenjacobs/mozart/Dockerfile
+++ /dev/null
@@ -1,17 +0,0 @@
-FROM composer:2.0.8
-
-FROM php:8.0.1-cli-alpine AS base
-
-FROM base as builder
-RUN apk update && apk add git
-COPY --from=composer /usr/bin/composer /usr/bin/composer
-COPY ./composer.json /mozart/
-WORKDIR /mozart/
-RUN composer install --no-dev -o
-
-FROM base AS application
-RUN mkdir project
-WORKDIR /project/
-COPY --from=builder /mozart/ /mozart/
-COPY ./bin/ /mozart/bin/
-COPY ./src/ /mozart/src/
diff --git a/vendor/coenjacobs/mozart/LICENSE b/vendor/coenjacobs/mozart/LICENSE
deleted file mode 100644
index 2f9c25703..000000000
--- a/vendor/coenjacobs/mozart/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Coen Jacobs
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
diff --git a/vendor/coenjacobs/mozart/README.md b/vendor/coenjacobs/mozart/README.md
deleted file mode 100644
index cdb239d43..000000000
--- a/vendor/coenjacobs/mozart/README.md
+++ /dev/null
@@ -1,146 +0,0 @@
-# Mozart [](https://packagist.org/packages/coenjacobs/mozart) [](https://packagist.org/packages/coenjacobs/mozart) [](https://hub.docker.com/r/coenjacobs/mozart)
-Composes all dependencies as a package inside a WordPress plugin. Load packages through Composer and have them wrapped inside your own namespace. Gone are the days when plugins could load conflicting versions of the same package, resulting in hard to reproduce bugs.
-
-This package requires PHP 7.3 or higher in order to run the tool. You can use the resulting files as a bundle, requiring any PHP version you like, even PHP 5.2.
-
-**Warning:** This package is very experimental and breaking changes are very likely until version 1.0.0 is tagged. Use with caution, always wear a helmet when using this in production environments.
-
-## Installation
-Mozart brings its own dependencies to the table and that potentially introduces its own problems (yes, I realise how meta that is, for a package like this). That's why installing Mozart in isolation, either through the Docker container, the available PHAR file or installing Mozart as a global dependency with Composer is prefered. In all cases, the [configuration](#configuration) still needs to be placed in the `composer.json` file of the project iself.
-
-### Docker
-Pull the Docker image from the registry:
-
-```
-docker pull coenjacobs/mozart
-```
-
-Then you can start the container and run the `mozart compose` command in the container. In a single command:
-
-```
-docker run --rm -it -v ${PWD}:/project/ coenjacobs/mozart /mozart/bin/mozart compose
-```
-
-Above command automatically adds the current working directory as a volume into the designated directory for the project: `/project/`. In the Docker container, Mozart is installed in the `/mozart/` directory. Using the above command will run Mozart on the current working directory.
-
-Please note that the Docker image for Mozart is only available starting from the `latest` build of version 0.7.0. The `latest` tag is always the latest build of the `master` branch and not a stable version. You can see [all available tags on Docker Hub](https://hub.docker.com/r/coenjacobs/mozart/tags).
-
-### PHAR (via Phive)
-Mozart can be installed via [Phive](https://github.com/phar-io/phive):
-
-```
-phive install coenjacobs/mozart --force-accept-unsigned
-```
-
-Alternatively, the `mozart.phar` file can be [downloaded from the releases page](https://github.com/coenjacobs/mozart/releases) and then be run from your project directory:
-
-```
-php mozart.phar compose
-```
-
-### Composer
-To install Mozart and its dependencies, without conflicting with the dependencies of your project, it is recommended that you install Mozart as a global package, if you choose to install Mozart via Composer.
-
-#### Global package
-Using the `global` command when installing Mozart, it will be installed as a system wide package:
-
-```
-composer global require coenjacobs/mozart
-```
-
-You can then find the bin file named `mozart` inside your `~/.composer/vendor/bin/` directory and run it from your project directory, referencing the full path to the bin file:
-
-```
-~/.composer/vendor/bin/mozart compose
-```
-
-#### Development dependency of your project
-You can install through Composer in the project itself, only required in development environments:
-
-```
-composer require coenjacobs/mozart --dev
-```
-
-This gives you a bin file named `mozart` inside your `vendor/bin` directory, after loading the whole package inside your project. Try running `vendor/bin/mozart` to verify it works.
-
-After configuring Mozart properly, the `mozart compose` command does all the magic:
-
-```
-vendor/bin/mozart compose
-```
-
-## Configuration
-Mozart requires little configuration. All you need to do is tell it where the bundled dependencies are going to be stored and what namespace they should be put inside. This configuration needs to be done in the `extra` property of your `composer.json` file:
-
-```
-"extra": {
- "mozart": {
- "dep_namespace": "CoenJacobs\\TestProject\\Dependencies\\",
- "dep_directory": "/src/Dependencies/",
- "classmap_directory": "/classes/dependencies/",
- "classmap_prefix": "CJTP_",
- "packages": [
- "pimple/pimple"
- ],
- "exclude_packages": [
- "psr/container"
- ],
- "override_autoload": {
- "google/apiclient": {
- "classmap": [
- "src/"
- ]
- }
- },
- "delete_vendor_directories": true
- }
-},
-```
-
-The following configuration values are required:
-
-- `dep_namespace` defines the root namespace that each package will be put in. Example: Should the package we're loading be using the `Pimple` namespace, then the package will be put inside the `CoenJacobs\\TestProject\\Dependencies\\Pimple` namespace, when using the configuration example above.
-- `dep_directory` defines the directory the files of the package will be stored in. Note that the directory needs to correspond to the namespace being used in your autoloader and the namespace defined for the bundled packages. Best results are achieved when your projects are using the [PSR-4 autoloader specification](http://www.php-fig.org/psr/psr-4/).
-- `classmap_directory` defines the directory files that are being autoloaded through a classmap, will be stored in. Note that this directory needs to be autoloaded by a classmap in your projects autoloader.
-- `classmap_prefix` defines the prefix that will be applied to all classes inside the classmap of the package you bundle. Say a class named `Pimple` and the defined prefix of `CJTP_` will result in the class name `CJTP_Pimple`.
-
-**Important:** Since Mozart automatically processes the full dependency tree of the packages you specify, you **need to specify all these configuration options**, because you can't reliably determine what kind of autoloaders are being used in the full dependency tree. A package way down the tree might suddenly use a classmap autoloader for example. Make sure you also include the namespace directory and classmap directory in your own autoloader, so they are always loaded.
-
-The following configuration is optional:
-
-- `delete_vendor_directories` is a boolean flag to indicate if the packages' vendor directories should be deleted after being processed. _default: true_.
-- `packages` is an optional array that defines the packages to be processed by Mozart. The array requires the slugs of packages in the same format as provided in your `composer.json`. Mozart will automatically rewrite dependencies of these packages as well. You don't need to add dependencies of these packages to the list. If this field is absent, all packages listed under composer require will be included.
-- `exclude_packages` is an optional array that defines the packages to be excluded from the processing performed by Mozart. This is useful if some of the packages in the `packages` array define dependent packages whose namespaces you want to keep unchanged. The array requires the slugs of the packages, as in the case of the `packages` array.
-- `override_autoload` a dictionary, keyed with the package names, of autoload settings to replace those in the original packages' `composer.json` `autoload` property.
-
-After Composer has loaded the packages as defined in your `composer.json` file, you can now run `mozart compose` and Mozart will bundle your packages according to the above configuration. It is recommended to dump the autoloader after Mozart has finished running, in case there are new classes or namespaces generated that aren't included in the autoloader yet.
-
-## Scripts
-Mozart is designed to install and be forgotten about. Using Composer scripts, the Mozart script can be run as soon as Composer either installs a new package, or updates an already installed one. This ensures that the packages you want to bundle, are always bundled in the latest installed version, automatically. These scripts also offer you the possibility to script dumping the autoloader, after Mozart is finished running:
-
-```
-"scripts": {
- "post-install-cmd": [
- "\"vendor/bin/mozart\" compose",
- "composer dump-autoload"
- ],
- "post-update-cmd": [
- "\"vendor/bin/mozart\" compose",
- "composer dump-autoload"
- ]
-}
-```
-
-When using Mozart through its Docker container, you can replace the `"\"vendor/bin/mozart\" compose",` lines with the actual commands you use to [run the Docker container](#docker) for your specific project. Running Mozart from inside the Docker container is really fast and shouldn't take more than a couple seconds.
-
-## Background and philosophy
-Mozart is designed to bridge the gap between the WordPress ecosytem and the vast packages ecosystem of PHP as a whole. Since WordPress is such an end-user friendly focussed CMS (for good reasons), there is no place within the ecosystem where an end-user would be burdened with using a developers tool like Composer. Also, since WordPress has to run on basically any hosting infrastructure, running Composer to install packages from the administration panel (trust me, I've tried - it can be done) is a mission impossible to make it happen and compatible with every server out there.
-
-But why make a new tool for this? There are other tools that enable you to do this, right? Yes, there are now. [PHP-Scoper](https://github.com/humbug/php-scoper), for example. PHP-Scoper is a fantastic tool, that does the job right. But, PHP-Scoper wasn't available back when I started the Mozart project. Also, PHP-Scoper has a few limitations (no support for classmap autoloaders, for example) that were and are still quite common within the WordPress ecosystem. Finally, PHP-Scoper can be quite the tool to add to your development flow, while Mozart was designed to be _simple to implement_, specifically tailored for WordPress projects.
-
-The key values of what's important to Mozart:
-- Must be able to be easily installable by a developer, preferably in a specific version.
-- Distribution must be done through an existing package manager or easily maintained separately.
-- Shouldn't add a whole layer of complexity to the development process, i.e. learning a whole new tool/language.
-
-Mozart always has been and always will be geared towards solving the conflicting dependencies problem in the WordPress ecosystem, as efficiently and opinionated as possible. By being opinionated in certain ways and specifically focussed on WordPress projects, Mozart has quickly become easy to understand and implement.
diff --git a/vendor/coenjacobs/mozart/bin/mozart b/vendor/coenjacobs/mozart/bin/mozart
deleted file mode 100755
index ef2e21ffb..000000000
--- a/vendor/coenjacobs/mozart/bin/mozart
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env php
-run();
-}, '0.7.1');
diff --git a/vendor/coenjacobs/mozart/composer.json b/vendor/coenjacobs/mozart/composer.json
deleted file mode 100644
index c97d22535..000000000
--- a/vendor/coenjacobs/mozart/composer.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "coenjacobs/mozart",
- "description": "Composes all dependencies as a package inside a WordPress plugin",
- "authors": [
- {
- "name": "Coen Jacobs",
- "email": "coenjacobs@gmail.com"
- }
- ],
- "bin": ["bin/mozart"],
- "minimum-stability": "dev",
- "prefer-stable": true,
- "license": "MIT",
- "require": {
- "php": "^7.3|^8.0",
- "symfony/console": "^4|^5",
- "symfony/finder": "^4|^5",
- "league/flysystem": "^1.0"
- },
- "autoload": {
- "psr-4": {
- "CoenJacobs\\Mozart\\": "src/"
- }
- },
- "require-dev": {
- "phpunit/phpunit": "^8.5",
- "squizlabs/php_codesniffer": "^3.5",
- "mheap/phpunit-github-actions-printer": "^1.4",
- "vimeo/psalm": "^4.4"
- },
- "scripts": {
- "lint": [
- "composer validate",
- "phpcs"
- ],
- "test": [
- "phpunit"
- ]
- }
-}
diff --git a/vendor/coenjacobs/mozart/phpcs.xml b/vendor/coenjacobs/mozart/phpcs.xml
deleted file mode 100644
index 2bf4e6c43..000000000
--- a/vendor/coenjacobs/mozart/phpcs.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
- Coding standard ruleset based on the PSR-2 coding standard.
-
- ./src
-
\ No newline at end of file
diff --git a/vendor/coenjacobs/mozart/phpunit.xml b/vendor/coenjacobs/mozart/phpunit.xml
deleted file mode 100644
index 6f7b5b5c1..000000000
--- a/vendor/coenjacobs/mozart/phpunit.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- ./tests/
-
-
-
\ No newline at end of file
diff --git a/vendor/coenjacobs/mozart/psalm.xml b/vendor/coenjacobs/mozart/psalm.xml
deleted file mode 100644
index 30258a709..000000000
--- a/vendor/coenjacobs/mozart/psalm.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/vendor/coenjacobs/mozart/src/Composer/Autoload/Autoloader.php b/vendor/coenjacobs/mozart/src/Composer/Autoload/Autoloader.php
deleted file mode 100644
index 9aa6b218f..000000000
--- a/vendor/coenjacobs/mozart/src/Composer/Autoload/Autoloader.php
+++ /dev/null
@@ -1,9 +0,0 @@
-files, $value);
- } else {
- array_push($this->paths, $value);
- }
- }
- }
-
- /**
- * @throws \Exception
- *
- * @return void
- */
- public function getSearchNamespace()
- {
- throw new \Exception('Classmap autoloaders do not contain a namespace and this method can not be used.');
- }
-}
diff --git a/vendor/coenjacobs/mozart/src/Composer/Autoload/NamespaceAutoloader.php b/vendor/coenjacobs/mozart/src/Composer/Autoload/NamespaceAutoloader.php
deleted file mode 100644
index f8393995c..000000000
--- a/vendor/coenjacobs/mozart/src/Composer/Autoload/NamespaceAutoloader.php
+++ /dev/null
@@ -1,49 +0,0 @@
- $value) {
- $this->namespace = $key;
- array_push($this->paths, $value);
- }
- }
-
- /**
- * @return string
- */
- public function getSearchNamespace()
- {
- return $this->namespace;
- }
-
- /**
- * @return string
- */
- public function getNamespacePath()
- {
- return '';
- }
-}
diff --git a/vendor/coenjacobs/mozart/src/Composer/Autoload/Psr0.php b/vendor/coenjacobs/mozart/src/Composer/Autoload/Psr0.php
deleted file mode 100644
index 2a009821a..000000000
--- a/vendor/coenjacobs/mozart/src/Composer/Autoload/Psr0.php
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace, '\\');
- }
-
- /**
- * @return string
- */
- public function getNamespacePath()
- {
- return str_replace('\\', DIRECTORY_SEPARATOR, $this->namespace);
- }
-}
diff --git a/vendor/coenjacobs/mozart/src/Composer/Package.php b/vendor/coenjacobs/mozart/src/Composer/Package.php
deleted file mode 100644
index 78800fe85..000000000
--- a/vendor/coenjacobs/mozart/src/Composer/Package.php
+++ /dev/null
@@ -1,69 +0,0 @@
-path = $path;
- $this->config = json_decode(file_get_contents($this->path . '/composer.json'));
-
- if (isset($overrideAutoload)) {
- $this->config->autoload = $overrideAutoload;
- }
- }
-
- /**
- * @return void
- */
- public function findAutoloaders()
- {
- $namespace_autoloaders = array(
- 'psr-0' => 'CoenJacobs\Mozart\Composer\Autoload\Psr0',
- 'psr-4' => 'CoenJacobs\Mozart\Composer\Autoload\Psr4',
- 'classmap' => 'CoenJacobs\Mozart\Composer\Autoload\Classmap',
- );
-
- if (! isset($this->config->autoload)) {
- return;
- }
-
- foreach ($namespace_autoloaders as $key => $value) {
- if (! isset($this->config->autoload->$key)) {
- continue;
- }
-
- $autoloadConfig = (array)$this->config->autoload->$key;
-
- /** @var Autoloader $autoloader */
- $autoloader = new $value();
- $autoloader->processConfig($autoloadConfig);
-
- array_push($this->autoloaders, $autoloader);
- }
- }
-}
diff --git a/vendor/coenjacobs/mozart/src/Console/Application.php b/vendor/coenjacobs/mozart/src/Console/Application.php
deleted file mode 100644
index caa82dd35..000000000
--- a/vendor/coenjacobs/mozart/src/Console/Application.php
+++ /dev/null
@@ -1,20 +0,0 @@
-add($composeCommand);
- }
-}
diff --git a/vendor/coenjacobs/mozart/src/Console/Commands/Compose.php b/vendor/coenjacobs/mozart/src/Console/Commands/Compose.php
deleted file mode 100644
index ced06a510..000000000
--- a/vendor/coenjacobs/mozart/src/Console/Commands/Compose.php
+++ /dev/null
@@ -1,243 +0,0 @@
-setName('compose');
- $this->setDescription('Composes all dependencies as a package inside a WordPress plugin.');
- $this->setHelp('');
- }
-
- protected function execute(InputInterface $input, OutputInterface $output)
- {
- $workingDir = getcwd();
- $this->workingDir = $workingDir;
-
- $composerFile = $workingDir . DIRECTORY_SEPARATOR. 'composer.json';
- if (!file_exists($composerFile)) {
- $output->write('No composer.json found at current directory: ' . $workingDir);
- return 1;
- }
-
- $composer = json_decode(file_get_contents($composerFile));
- // If the json was malformed.
- if (!is_object($composer)) {
- $output->write('Unable to parse composer.json read at: ' . $workingDir);
- return 1;
- }
-
- // if `extra` is missing or not an object or if it does not have a `mozart` key which is an object.
- if (!isset($composer->extra) || !is_object($composer->extra)
- || !isset($composer->extra->mozart) || !is_object($composer->extra->mozart)) {
- $output->write('Mozart config not readable in composer.json at extra->mozart');
- return 1;
- }
- $config = $composer->extra->mozart;
-
- $config->dep_namespace = preg_replace("/\\\{2,}$/", "\\", "$config->dep_namespace\\");
-
- $this->config = $config;
-
- $require = array();
- if (isset($config->packages) && is_array($config->packages)) {
- $require = $config->packages;
- } elseif (isset($composer->require) && is_object($composer->require)) {
- $require = array_keys(get_object_vars($composer->require));
- }
-
- $packagesByName = $this->findPackages($require);
- $excludedPackagesNames = isset($config->excluded_packages) ? $config->excluded_packages : [];
- $packagesToMoveByName = array_diff_key($packagesByName, array_flip($excludedPackagesNames));
- $packages = array_values($packagesToMoveByName);
-
- foreach ($packages as $package) {
- $package->dependencies = array_diff_key($package->dependencies, array_flip($excludedPackagesNames));
- }
-
- $this->mover = new Mover($workingDir, $config);
- $this->replacer = new Replacer($workingDir, $config);
-
- $this->mover->deleteTargetDirs($packages);
- $this->movePackages($packages);
- $this->replacePackages($packages);
- $this->replaceParentInTree($packages);
- $this->replacer->replaceParentClassesInDirectory($this->config->classmap_directory);
-
- return 0;
- }
-
- /**
- * @param $workingDir
- * @param $config
- * @param array $packages
- *
- * @return void
- */
- protected function movePackages($packages): void
- {
- foreach ($packages as $package) {
- $this->movePackage($package);
- }
-
- $this->mover->deleteEmptyDirs();
- }
-
- /**
- * @param $workingDir
- * @param $config
- * @param array $packages
- *
- * @return void
- */
- protected function replacePackages($packages): void
- {
- foreach ($packages as $package) {
- $this->replacePackage($package);
- }
- }
-
- /**
- * Move all the packages over, one by one, starting on the deepest level of dependencies.
- *
- * @return void
- */
- public function movePackage($package): void
- {
- if (! empty($package->dependencies)) {
- foreach ($package->dependencies as $dependency) {
- $this->movePackage($dependency);
- }
- }
-
- $this->mover->movePackage($package);
- }
-
- /**
- * Replace contents of all the packages, one by one, starting on the deepest level of dependencies.
- *
- * @return void
- */
- public function replacePackage($package): void
- {
- if (! empty($package->dependencies)) {
- foreach ($package->dependencies as $dependency) {
- $this->replacePackage($dependency);
- }
- }
-
- $this->replacer->replacePackage($package);
- }
-
- /**
- * Loops through all dependencies and their dependencies and so on...
- * will eventually return a list of all packages required by the full tree.
- *
- * @param ((int|string)|mixed)[] $slugs
- *
- * @return Package[]
- *
- * @psalm-return array
- */
- private function findPackages(array $slugs): array
- {
- $packages = [];
-
- foreach ($slugs as $package_slug) {
- $packageDir = $this->workingDir . DIRECTORY_SEPARATOR . 'vendor'
- . DIRECTORY_SEPARATOR . $package_slug . DIRECTORY_SEPARATOR;
-
- if (! is_dir($packageDir)) {
- continue;
- }
-
- $autoloaders = null;
- if (isset($this->config->override_autoload) && isset($this->config->override_autoload->$package_slug)) {
- $autoloaders = $this->config->override_autoload->$package_slug;
- }
-
- $package = new Package($packageDir, $autoloaders);
- $package->findAutoloaders();
-
- $config = json_decode(file_get_contents($packageDir . 'composer.json'));
-
- $dependencies = [];
- if (isset($config->require)) {
- $dependencies = array_keys((array)$config->require);
- }
-
- $package->dependencies = $this->findPackages($dependencies);
- $packages[$package_slug] = $package;
- }
-
- return $packages;
- }
-
- /**
- * Get an array containing all the dependencies and dependencies
- * @param Package $package
- * @param array $dependencies
- * @return array
- */
- private function getAllDependenciesOfPackage(Package $package, $dependencies = []): array
- {
- if (empty($package->dependencies)) {
- return $dependencies;
- }
-
- /** @var Package $dependency */
- foreach ($package->dependencies as $dependency) {
- $dependencies[] = $dependency;
- }
-
- foreach ($package->dependencies as $dependency) {
- $dependencies = $this->getAllDependenciesOfPackage($dependency, $dependencies);
- }
-
- return $dependencies;
- }
-
- /**
- * @param array $packages
- */
- private function replaceParentInTree(array $packages): void
- {
- /** @var Package $package */
- foreach ($packages as $package) {
- $dependencies = $this->getAllDependenciesOfPackage($package);
-
- /** @var Package $dependency */
- foreach ($dependencies as $dependency) {
- $this->replacer->replaceParentPackage($dependency, $package);
- }
-
- $this->replaceParentInTree($package->dependencies);
- }
- }
-}
diff --git a/vendor/coenjacobs/mozart/src/Mover.php b/vendor/coenjacobs/mozart/src/Mover.php
deleted file mode 100644
index 6106bf6c1..000000000
--- a/vendor/coenjacobs/mozart/src/Mover.php
+++ /dev/null
@@ -1,243 +0,0 @@
-workingDir = $workingDir;
- $this->targetDir = $config->dep_directory;
- $this->config = $config;
-
- $this->filesystem = new Filesystem(new Local($this->workingDir));
- }
-
- /**
- * Create the required `dep_directory` and `classmap_directory` and delete targetDirs of packages about to be moved.
- *
- * @param Package[] $packages The packages that, in the next step, will be moved.
- *
- * @return void
- */
- public function deleteTargetDirs($packages): void
- {
- $this->filesystem->createDir($this->config->dep_directory);
-
- $this->filesystem->createDir($this->config->classmap_directory);
-
- foreach ($packages as $package) {
- $this->deleteDepTargetDirs($package);
- }
- }
-
- /**
- * Delete the directories about to be used for packages earmarked for Mozart namespacing.
- *
- * @visibility private to allow recursion through packages and subpackages.
- *
- * @param Package $package
- *
- * @return void
- */
- private function deleteDepTargetDirs($package): void
- {
- foreach ($package->autoloaders as $packageAutoloader) {
- $autoloaderType = get_class($packageAutoloader);
-
- switch ($autoloaderType) {
- case Psr0::class:
- case Psr4::class:
- $outputDir = $this->config->dep_directory . $packageAutoloader->namespace;
- $outputDir = str_replace('\\', DIRECTORY_SEPARATOR, $outputDir);
- $this->filesystem->deleteDir($outputDir);
- break;
- case Classmap::class:
- $outputDir = $this->config->classmap_directory . $package->config->name;
- $outputDir = str_replace('\\', DIRECTORY_SEPARATOR, $outputDir);
- $this->filesystem->deleteDir($outputDir);
- break;
- }
- }
-
- foreach ($package->dependencies as $subPackage) {
- $this->deleteDepTargetDirs($subPackage);
- }
- }
-
- public function deleteEmptyDirs(): void
- {
- if (count($this->filesystem->listContents($this->config->dep_directory, true)) === 0) {
- $this->filesystem->deleteDir($this->config->dep_directory);
- }
-
- if (count($this->filesystem->listContents($this->config->classmap_directory, true)) === 0) {
- $this->filesystem->deleteDir($this->config->classmap_directory);
- }
- }
-
- /**
- * @return void
- */
- public function movePackage(Package $package)
- {
- if (in_array($package->config->name, $this->movedPackages)) {
- return;
- }
-
- foreach ($package->autoloaders as $autoloader) {
- if ($autoloader instanceof NamespaceAutoloader) {
- $finder = new Finder();
-
- foreach ($autoloader->paths as $path) {
- $source_path = $this->workingDir . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR
- . $package->config->name . DIRECTORY_SEPARATOR . $path;
-
- $source_path = str_replace('/', DIRECTORY_SEPARATOR, $source_path);
-
- $finder->files()->in($source_path);
-
- foreach ($finder as $file) {
- $this->moveFile($package, $autoloader, $file, $path);
- }
- }
- } elseif ($autoloader instanceof Classmap) {
- $finder = new Finder();
-
- $files_to_move = array();
-
- foreach ($autoloader->files as $file) {
- $source_path = $this->workingDir . DIRECTORY_SEPARATOR . 'vendor'
- . DIRECTORY_SEPARATOR . $package->config->name;
- $finder->files()->name($file)->in($source_path);
-
- foreach ($finder as $foundFile) {
- $filePath = $foundFile->getRealPath();
- $files_to_move[ $filePath ] = $foundFile;
- }
- }
-
- $finder = new Finder();
-
- foreach ($autoloader->paths as $path) {
- $source_path = $this->workingDir . DIRECTORY_SEPARATOR . 'vendor'
- . DIRECTORY_SEPARATOR . $package->config->name . DIRECTORY_SEPARATOR . $path;
-
- $finder->files()->in($source_path);
-
- foreach ($finder as $foundFile) {
- $filePath = $foundFile->getRealPath();
- $files_to_move[ $filePath ] = $foundFile;
- }
- }
-
- foreach ($files_to_move as $foundFile) {
- $this->moveFile($package, $autoloader, $foundFile);
- }
- }
-
- if (!in_array($package->config->name, $this->movedPackages)) {
- $this->movedPackages[] = $package->config->name;
- }
- }
-
- if (!isset($this->config->delete_vendor_directories) || $this->config->delete_vendor_directories === true) {
- $this->deletePackageVendorDirectories();
- }
- }
-
- /**
- * @param Package $package
- * @param Autoloader $autoloader
- * @param SplFileInfo $file
- * @param string $path
- * @return string
- */
- public function moveFile(Package $package, $autoloader, $file, $path = '')
- {
- if ($autoloader instanceof NamespaceAutoloader) {
- $namespacePath = $autoloader->getNamespacePath();
- $replaceWith = $this->config->dep_directory . $namespacePath;
- $targetFile = str_replace($this->workingDir, $replaceWith, $file->getPathname());
-
- $packageVendorPath = DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . $package->config->name
- . DIRECTORY_SEPARATOR . $path;
- $packageVendorPath = str_replace('/', DIRECTORY_SEPARATOR, $packageVendorPath);
- $targetFile = str_replace($packageVendorPath, '', $targetFile);
- } else {
- $namespacePath = $package->config->name;
- $replaceWith = $this->config->classmap_directory . DIRECTORY_SEPARATOR . $namespacePath;
- $targetFile = str_replace($this->workingDir, $replaceWith, $file->getPathname());
-
- $packageVendorPath = DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . $package->config->name
- . DIRECTORY_SEPARATOR;
- $packageVendorPath = str_replace('/', DIRECTORY_SEPARATOR, $packageVendorPath);
- $targetFile = str_replace($packageVendorPath, DIRECTORY_SEPARATOR, $targetFile);
- }
-
- $this->filesystem->copy(
- str_replace($this->workingDir, '', $file->getPathname()),
- $targetFile
- );
-
- return $targetFile;
- }
-
- /**
- * Deletes all the packages that are moved from the /vendor/ directory to
- * prevent packages that are prefixed/namespaced from being used or
- * influencing the output of the code. They just need to be gone.
- *
- * @return void
- */
- protected function deletePackageVendorDirectories(): void
- {
- foreach ($this->movedPackages as $movedPackage) {
- $packageDir = 'vendor' . DIRECTORY_SEPARATOR . $movedPackage;
- if (!is_dir($packageDir) || is_link($packageDir)) {
- continue;
- }
-
- $this->filesystem->deleteDir($packageDir);
-
- //Delete parent directory too if it became empty
- //(because that package was the only one from that vendor)
- $parentDir = dirname($packageDir);
- if ($this->dirIsEmpty($parentDir)) {
- $this->filesystem->deleteDir($parentDir);
- }
- }
- }
-
- private function dirIsEmpty(string $dir): bool
- {
- $di = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
- return iterator_count($di) === 0;
- }
-}
diff --git a/vendor/coenjacobs/mozart/src/Replace/BaseReplacer.php b/vendor/coenjacobs/mozart/src/Replace/BaseReplacer.php
deleted file mode 100644
index 442551e8e..000000000
--- a/vendor/coenjacobs/mozart/src/Replace/BaseReplacer.php
+++ /dev/null
@@ -1,20 +0,0 @@
-autoloader = $autoloader;
- }
-}
diff --git a/vendor/coenjacobs/mozart/src/Replace/ClassmapReplacer.php b/vendor/coenjacobs/mozart/src/Replace/ClassmapReplacer.php
deleted file mode 100644
index 2cc297ed6..000000000
--- a/vendor/coenjacobs/mozart/src/Replace/ClassmapReplacer.php
+++ /dev/null
@@ -1,64 +0,0 @@
-classmap_prefix . $matches[1];
- $this->saveReplacedClass($matches[1], $replace);
- return str_replace($matches[1], $replace, $matches[0]);
- },
- $contents
- );
- }
-
- public function saveReplacedClass($classname, string $replacedName): void
- {
- $this->replacedClasses[ $classname ] = $replacedName;
- }
-}
diff --git a/vendor/coenjacobs/mozart/src/Replace/NamespaceReplacer.php b/vendor/coenjacobs/mozart/src/Replace/NamespaceReplacer.php
deleted file mode 100644
index 711ec0863..000000000
--- a/vendor/coenjacobs/mozart/src/Replace/NamespaceReplacer.php
+++ /dev/null
@@ -1,43 +0,0 @@
-autoloader->getSearchNamespace(), '/');
- $dependencyNamespace = preg_quote($this->dep_namespace, '/');
-
- return preg_replace_callback(
- "
- / # Start the pattern
- ([^a-zA-Z0-9_\x7f-\xff]) # Match the non-class character before the namespace
- ( # Start the namespace matcher
- (?dep_namespace . $matches[2];
- },
- $contents
- );
- }
-}
diff --git a/vendor/coenjacobs/mozart/src/Replace/Replacer.php b/vendor/coenjacobs/mozart/src/Replace/Replacer.php
deleted file mode 100644
index 33b1a1509..000000000
--- a/vendor/coenjacobs/mozart/src/Replace/Replacer.php
+++ /dev/null
@@ -1,11 +0,0 @@
-workingDir = $workingDir;
- $this->targetDir = $config->dep_directory;
- $this->config = $config;
-
- $this->filesystem = new Filesystem(new Local($this->workingDir));
- }
-
- public function replacePackage(Package $package): void
- {
- foreach ($package->autoloaders as $autoloader) {
- $this->replacePackageByAutoloader($package, $autoloader);
- }
- }
-
- /**
- * @param $targetFile
- * @param $autoloader
- *
- * @return void
- */
- public function replaceInFile($targetFile, Autoloader $autoloader): void
- {
- $targetFile = str_replace($this->workingDir, '', $targetFile);
- try {
- $contents = $this->filesystem->read($targetFile);
- } catch (FileNotFoundException $e) {
- return;
- }
-
- if (empty($contents) || false === $contents) {
- return;
- }
-
- if ($autoloader instanceof NamespaceAutoloader) {
- $replacer = new NamespaceReplacer();
- $replacer->dep_namespace = $this->config->dep_namespace;
- } else {
- $replacer = new ClassmapReplacer();
- $replacer->classmap_prefix = $this->config->classmap_prefix;
- }
-
- $replacer->setAutoloader($autoloader);
- $contents = $replacer->replace($contents);
-
- if ($replacer instanceof ClassmapReplacer) {
- $this->replacedClasses = array_merge($this->replacedClasses, $replacer->replacedClasses);
- }
-
- $this->filesystem->put($targetFile, $contents);
- }
-
- /**
- * @param Package $package
- * @param $autoloader
- *
- * @return void
- */
- public function replacePackageByAutoloader(Package $package, Composer\Autoload\Autoloader $autoloader): void
- {
- if ($autoloader instanceof NamespaceAutoloader) {
- $source_path = $this->workingDir . $this->targetDir
- . str_replace('\\', DIRECTORY_SEPARATOR, $autoloader->namespace)
- . DIRECTORY_SEPARATOR;
- $this->replaceInDirectory($autoloader, $source_path);
- } elseif ($autoloader instanceof Classmap) {
- $finder = new Finder();
- $source_path = $this->workingDir . $this->config->classmap_directory . DIRECTORY_SEPARATOR
- . $package->config->name;
- $finder->files()->in($source_path);
-
- foreach ($finder as $foundFile) {
- $targetFile = $foundFile->getRealPath();
-
- if ('.php' == substr($targetFile, -4, 4)) {
- $this->replaceInFile($targetFile, $autoloader);
- }
- }
- }
- }
-
- /**
- * @param $autoloader
- * @param $directory
- *
- * @return void
- */
- public function replaceParentClassesInDirectory(string $directory): void
- {
- if (count($this->replacedClasses)===0) {
- return;
- }
-
- $directory = trim($directory, '//');
- $finder = new Finder();
- $finder->files()->in($directory);
-
- $replacedClasses = $this->replacedClasses;
-
- foreach ($finder as $file) {
- $targetFile = $file->getPathName();
-
- if ('.php' == substr($targetFile, -4, 4)) {
- try {
- $contents = $this->filesystem->read($targetFile);
- } catch (FileNotFoundException $e) {
- continue;
- }
-
- if (empty($contents) || false === $contents) {
- continue;
- }
-
- foreach ($replacedClasses as $original => $replacement) {
- $contents = preg_replace_callback(
- '/(.*)([^a-zA-Z0-9_\x7f-\xff])'. $original . '([^a-zA-Z0-9_\x7f-\xff])/U',
- function ($matches) use ($replacement) {
- if (preg_match('/(include|require)/', $matches[0], $output_array)) {
- return $matches[0];
- }
- return $matches[1] . $matches[2] . $replacement . $matches[3];
- },
- $contents
- );
- }
-
- $this->filesystem->put($targetFile, $contents);
- }
- }
- }
-
- /**
- * @param $autoloader
- * @param $directory
- *
- * @return void
- */
- public function replaceInDirectory(NamespaceAutoloader $autoloader, string $directory): void
- {
- $finder = new Finder();
- $finder->files()->in($directory);
-
- foreach ($finder as $file) {
- $targetFile = $file->getPathName();
-
- if ('.php' == substr($targetFile, -4, 4)) {
- $this->replaceInFile($targetFile, $autoloader);
- }
- }
- }
-
- /**
- * Replace everything in parent package, based on the dependency package.
- * This is done to ensure that package A (which requires package B), is also
- * updated with the replacements being made in package B.
- *
- * @param Package $package
- * @param Package $parent
- *
- * @return void
- */
- public function replaceParentPackage(Package $package, Package $parent): void
- {
- foreach ($parent->autoloaders as $parentAutoloader) {
- foreach ($package->autoloaders as $autoloader) {
- if ($parentAutoloader instanceof NamespaceAutoloader) {
- $namespace = str_replace('\\', DIRECTORY_SEPARATOR, $parentAutoloader->namespace);
- $directory = $this->workingDir . $this->config->dep_directory . $namespace
- . DIRECTORY_SEPARATOR;
-
- if ($autoloader instanceof NamespaceAutoloader) {
- $this->replaceInDirectory($autoloader, $directory);
- } else {
- $directory = str_replace($this->workingDir, '', $directory);
- $this->replaceParentClassesInDirectory($directory);
- }
- } else {
- $directory = $this->workingDir . $this->config->classmap_directory . $parent->config->name;
-
- if ($autoloader instanceof NamespaceAutoloader) {
- $this->replaceInDirectory($autoloader, $directory);
- } else {
- $directory = str_replace($this->workingDir, '', $directory);
- $this->replaceParentClassesInDirectory($directory);
- }
- }
- }
- }
- }
-}
diff --git a/vendor/coenjacobs/mozart/tests/Console/Commands/ComposeTest.php b/vendor/coenjacobs/mozart/tests/Console/Commands/ComposeTest.php
deleted file mode 100644
index 0203fae49..000000000
--- a/vendor/coenjacobs/mozart/tests/Console/Commands/ComposeTest.php
+++ /dev/null
@@ -1,225 +0,0 @@
-createMock(InputInterface::class);
- $outputInterfaceMock = $this->createMock(OutputInterface::class);
-
- $outputInterfaceMock->expects($this->exactly(1))
- ->method('write');
-
- $compose = new class( $inputInterfaceMock, $outputInterfaceMock ) extends Compose {
- public function __construct($inputInterfaceMock, $outputInterfaceMock)
- {
- parent::__construct();
-
- $this->execute($inputInterfaceMock, $outputInterfaceMock);
- }
- };
- }
-
- /**
- * When json_decode fails, instead of
- * "Trying to get property 'extra' of non-object"
- * a better message should be written to the OutputInterface.
- *
- * @test
- */
- public function it_handles_malformed_json_with_grace(): void
- {
-
- $badComposerJson = '{ "name": "coenjacobs/mozart", }';
-
- file_put_contents(__DIR__ . '/composer.json', $badComposerJson);
-
- $inputInterfaceMock = $this->createMock(InputInterface::class);
- $outputInterfaceMock = $this->createMock(OutputInterface::class);
-
- $outputInterfaceMock->expects($this->exactly(1))
- ->method('write');
-
- $compose = new class( $inputInterfaceMock, $outputInterfaceMock ) extends Compose {
- public function __construct($inputInterfaceMock, $outputInterfaceMock)
- {
- parent::__construct();
-
- $this->execute($inputInterfaceMock, $outputInterfaceMock);
- }
- };
- }
-
- /**
- * When composer.json->extra is absent, instead of
- * "Undefined property: stdClass::$extra"
- * a better message should be written to the OutputInterface.
- *
- * @test
- */
- public function it_handles_absent_extra_config_with_grace(): void
- {
-
- $badComposerJson = '{ "name": "coenjacobs/mozart" }';
-
- file_put_contents(__DIR__ . '/composer.json', $badComposerJson);
-
- $inputInterfaceMock = $this->createMock(InputInterface::class);
- $outputInterfaceMock = $this->createMock(OutputInterface::class);
-
- $outputInterfaceMock->expects($this->exactly(1))
- ->method('write');
-
- $compose = new class( $inputInterfaceMock, $outputInterfaceMock ) extends Compose {
- public function __construct($inputInterfaceMock, $outputInterfaceMock)
- {
- parent::__construct();
-
- $this->execute($inputInterfaceMock, $outputInterfaceMock);
- }
- };
- }
-
-
- /**
- * When composer.json->extra is not an object, instead of
- * "Trying to get property 'mozart' of non-object"
- * a better message should be written to the OutputInterface.
- *
- * @test
- */
- public function it_handles_malformed_extra_config_with_grace(): void
- {
-
- $badComposerJson = '{ "name": "coenjacobs/mozart", "extra": [] }';
-
- file_put_contents(__DIR__ . '/composer.json', $badComposerJson);
-
- $inputInterfaceMock = $this->createMock(InputInterface::class);
- $outputInterfaceMock = $this->createMock(OutputInterface::class);
-
- $outputInterfaceMock->expects($this->exactly(1))
- ->method('write');
-
- $compose = new class( $inputInterfaceMock, $outputInterfaceMock ) extends Compose {
- public function __construct($inputInterfaceMock, $outputInterfaceMock)
- {
- parent::__construct();
-
- $this->execute($inputInterfaceMock, $outputInterfaceMock);
- }
- };
- }
-
- /**
- * When composer.json->extra->mozart is absent, instead of
- * "Undefined property: stdClass::$mozart"
- * a better message should be written to the OutputInterface.
- *
- * @test
- */
- public function it_handles_absent_mozart_config_with_grace(): void
- {
-
- $badComposerJson = '{ "name": "coenjacobs/mozart", "extra": { "moozart": {} } }';
-
- file_put_contents(__DIR__ . '/composer.json', $badComposerJson);
-
- $inputInterfaceMock = $this->createMock(InputInterface::class);
- $outputInterfaceMock = $this->createMock(OutputInterface::class);
-
- $outputInterfaceMock->expects($this->exactly(1))
- ->method('write');
-
- $compose = new class( $inputInterfaceMock, $outputInterfaceMock ) extends Compose {
- public function __construct($inputInterfaceMock, $outputInterfaceMock)
- {
- parent::__construct();
-
- $this->execute($inputInterfaceMock, $outputInterfaceMock);
- }
- };
- }
-
- /**
- * When composer.json->extra->mozart is malformed, instead of
- * "Undefined property: stdClass::$mozart"
- * a better message should be written to the OutputInterface.
- *
- * is_object() added.
- *
- * @test
- */
- public function it_handles_malformed_mozart_config__with_grace(): void
- {
-
- $badComposerJson = '{ "name": "coenjacobs/mozart", "extra": { "mozart": [] } }';
-
- file_put_contents(__DIR__ . '/composer.json', $badComposerJson);
-
- $inputInterfaceMock = $this->createMock(InputInterface::class);
- $outputInterfaceMock = $this->createMock(OutputInterface::class);
-
- $outputInterfaceMock->expects($this->exactly(1))
- ->method('write');
-
- $compose = new class( $inputInterfaceMock, $outputInterfaceMock ) extends Compose {
- public function __construct($inputInterfaceMock, $outputInterfaceMock)
- {
- parent::__construct();
-
- $this->execute($inputInterfaceMock, $outputInterfaceMock);
- }
- };
- }
-
- public function tearDown(): void
- {
- parent::tearDown();
-
- $composer_json = __DIR__ . '/composer.json';
- if (file_exists($composer_json)) {
- unlink($composer_json);
- }
- }
-
- public static function tearDownAfterClass(): void
- {
- parent::tearDownAfterClass();
- chdir(self::$cwd);
- }
-}
diff --git a/vendor/coenjacobs/mozart/tests/MoverTest.php b/vendor/coenjacobs/mozart/tests/MoverTest.php
deleted file mode 100644
index 3ec8a1b34..000000000
--- a/vendor/coenjacobs/mozart/tests/MoverTest.php
+++ /dev/null
@@ -1,230 +0,0 @@
-extra->mozart settings
- *
- * @var stdClass
- */
- protected $config;
-
- /**
- * Set up a common settings object.
- */
- public function setUp(): void
- {
- parent::setUp();
-
- $this->testsWorkingDir = __DIR__ . '/temptestdir';
- if (!file_exists($this->testsWorkingDir)) {
- mkdir($this->testsWorkingDir);
- }
-
- $config = new class() {
- };
- $config->dep_directory = "/dep_directory/";
- $config->classmap_directory = "/classmap_directory/";
- $config->packages = array(
- "pimple/pimple",
- "ezyang/htmlpurifier"
- );
-
- $pimpleAutoload = json_decode("{ \"psr-0\" : { \"Pimple\" : [ \"src/\" ] } }");
- $htmlpurifierAutoload = json_decode("{ \"classmap\" : { \"Pimple\" => [ \"library/\" ] } }");
-
- $config->override_autoload = array();
- $config->override_autoload["pimple/pimple"] = $pimpleAutoload;
- $config->override_autoload["ezyang/htmlpurifier"] = $htmlpurifierAutoload;
-
- $this->config = $config;
- }
-
- /**
- * If the specified `dep_directory` or `classmap_directory` are absent, create them.
- *
- * @test
- */
- public function it_creates_absent_dirs(): void
- {
- $mover = new Mover($this->testsWorkingDir, $this->config);
-
- $packages = array();
-
- $mover->deleteTargetDirs($packages);
-
- $this->assertTrue(file_exists($this->testsWorkingDir . DIRECTORY_SEPARATOR
- . $this->config->dep_directory));
- $this->assertTrue(file_exists($this->testsWorkingDir . DIRECTORY_SEPARATOR
- . $this->config->classmap_directory));
- }
-
- /**
- * If the specified `dep_directory` or `classmap_directory` already exists with contents, it is not an issue.
- *
- * @test
- */
- public function it_is_unpertrubed_by_existing_dirs(): void
- {
- $mover = new Mover($this->testsWorkingDir, $this->config);
-
- if (!file_exists($this->testsWorkingDir . $this->config->dep_directory)) {
- mkdir($this->testsWorkingDir . $this->config->dep_directory);
- }
- if (!file_exists($this->testsWorkingDir . $this->config->classmap_directory)) {
- mkdir($this->testsWorkingDir . $this->config->classmap_directory);
- }
-
- $this->assertDirectoryExists($this->testsWorkingDir . $this->config->dep_directory);
- $this->assertDirectoryExists($this->testsWorkingDir . $this->config->classmap_directory);
-
- $packages = array();
-
- ob_start();
-
- $mover->deleteTargetDirs($packages);
-
- $output = ob_get_clean();
-
- $this->assertEmpty($output);
- }
-
- /**
- * If the specified `dep_directory` or `classmap_directory` contains a subdir we are going to need when moving,
- * delete the subdir. aka: If subfolders exist for dependencies we are about to manage, delete those subfolders.
- *
- * @test
- */
- public function it_deletes_subdirs_for_packages_about_to_be_moved(): void
- {
- $mover = new Mover($this->testsWorkingDir, $this->config);
-
- mkdir($this->testsWorkingDir . DIRECTORY_SEPARATOR . $this->config->dep_directory);
- mkdir($this->testsWorkingDir . DIRECTORY_SEPARATOR . $this->config->classmap_directory);
-
- // TODO: Create the subdirs that should be deleted.
- mkdir($this->testsWorkingDir . DIRECTORY_SEPARATOR . $this->config->dep_directory . 'Pimple');
- mkdir($this->testsWorkingDir . DIRECTORY_SEPARATOR . $this->config->classmap_directory . 'ezyang');
-
- $packages = array();
- foreach ($this->config->packages as $packageString) {
- $testDummyComposerDir = $this->testsWorkingDir . DIRECTORY_SEPARATOR . 'vendor'
- . DIRECTORY_SEPARATOR . $packageString;
- @mkdir($testDummyComposerDir, 0777, true);
- $testDummyComposerPath = $testDummyComposerDir . DIRECTORY_SEPARATOR . 'composer.json';
- $testDummyComposerContents = json_encode(new stdClass());
-
- file_put_contents($testDummyComposerPath, $testDummyComposerContents);
- $parsedPackage = new Package($testDummyComposerDir, $this->config->override_autoload[$packageString]);
- $parsedPackage->findAutoloaders();
- $packages[] = $parsedPackage;
- }
-
- $mover->deleteTargetDirs($packages);
-
- $this->assertDirectoryNotExists($this->testsWorkingDir . $this->config->dep_directory . 'Pimple');
- $this->assertDirectoryNotExists($this->testsWorkingDir . $this->config->dep_directory . 'ezyang');
- }
-
- /**
- * If a file is specified more than once in an autoloader, e.g. is explicitly listed and is also in a folder listed,
- * a "File already exists at path" error occurs.
- *
- * To fix this, we enumerate the files to be copied using a dictionary indexed with the source file path, then loop
- * and copy, thus only copying each one once.
- *
- * Original error:
- * "League\Flysystem\FileExistsException : File already exists at path: lib/classes/tecnickcom/tcpdf/tcpdf.php"
- *
- * Test is using a known problematic autoloader:
- * "iio/libmergepdf": {
- * "classmap": [
- * "config",
- * "include",
- * "tcpdf.php",
- * "tcpdf_parser.php",
- * "tcpdf_import.php",
- * "tcpdf_barcodes_1d.php",
- * "tcpdf_barcodes_2d.php",
- * "include/tcpdf_colors.php",
- * "include/tcpdf_filters.php",
- * "include/tcpdf_font_data.php",
- * "include/tcpdf_fonts.php",
- * "include/tcpdf_images.php",
- * "include/tcpdf_static.php",
- * "include/barcodes/datamatrix.php",
- * "include/barcodes/pdf417.php",
- * "include/barcodes/qrcode.php"
- * ]
- * }
- *
- * @see https://github.com/coenjacobs/mozart/issues/89
- *
- * @test
- */
- public function it_moves_each_file_once_per_namespace()
- {
-
- // The composer.json with the Mozart requirement and `mozart compose` removed.
- copy(__DIR__ . '/issue89-composer.json', $this->testsWorkingDir . '/composer.json');
-
- chdir($this->testsWorkingDir);
-
- exec('composer install');
-
- $inputInterfaceMock = $this->createMock(InputInterface::class);
- $outputInterfaceMock = $this->createMock(OutputInterface::class);
-
- $mozartCompose = new Compose();
-
- // $this->expectException(League\Flysystem\FileExistsException::class);
-
- $result = $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock);
-
- // On the failing test, an exception was thrown and this line was not reached.
- $this->assertEquals(0, $result);
- }
-
- /**
- * Delete $this->testsWorkingDir after each test.
- *
- * @see https://stackoverflow.com/questions/3349753/delete-directory-with-files-in-it
- */
- public function tearDown(): void
- {
- parent::tearDown();
-
- $dir = $this->testsWorkingDir;
-
- $it = new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS);
- $files = new RecursiveIteratorIterator(
- $it,
- RecursiveIteratorIterator::CHILD_FIRST
- );
- foreach ($files as $file) {
- if ($file->isDir()) {
- rmdir($file->getRealPath());
- } else {
- unlink($file->getRealPath());
- }
- }
- rmdir($dir);
- chdir(__DIR__);
- }
-}
diff --git a/vendor/coenjacobs/mozart/tests/issue89-composer.json b/vendor/coenjacobs/mozart/tests/issue89-composer.json
deleted file mode 100644
index c29017200..000000000
--- a/vendor/coenjacobs/mozart/tests/issue89-composer.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "require": {
- "iio/libmergepdf": "^4.0"
- },
- "extra": {
- "mozart": {
- "dep_namespace": "MyLibMerge\\Vendor",
- "dep_directory": "/lib/packages/",
- "classmap_directory": "/lib/classes/",
- "classmap_prefix": "MyLibMerge_",
- "excluded_packages": [
- ],
- "override_autoload": {
- },
- "delete_vendor_directories": true
- }
- }
-}
\ No newline at end of file
diff --git a/vendor/coenjacobs/mozart/tests/replacers/ClassMapReplacerTest.php b/vendor/coenjacobs/mozart/tests/replacers/ClassMapReplacerTest.php
deleted file mode 100644
index f14de75b8..000000000
--- a/vendor/coenjacobs/mozart/tests/replacers/ClassMapReplacerTest.php
+++ /dev/null
@@ -1,155 +0,0 @@
-classmap_prefix = 'Mozart_';
- $contents = $replacer->replace($contents);
- $this->assertEquals('class Mozart_Hello_World {', $contents);
- }
-
- /** @test */
- public function it_replaces_abstract_class_declarations(): void
- {
- $contents = 'abstract class Hello_World {';
- $replacer = new ClassmapReplacer();
- $replacer->classmap_prefix = 'Mozart_';
- $contents = $replacer->replace($contents);
- $this->assertEquals('abstract class Mozart_Hello_World {', $contents);
- }
-
- /** @test */
- public function it_replaces_interface_class_declarations(): void
- {
- $contents = 'interface Hello_World {';
- $replacer = new ClassmapReplacer();
- $replacer->classmap_prefix = 'Mozart_';
- $contents = $replacer->replace($contents);
- $this->assertEquals('interface Mozart_Hello_World {', $contents);
- }
-
- /** @test */
- public function it_replaces_class_declarations_that_extend_other_classes(): void
- {
- $contents = 'class Hello_World extends Bye_World {';
- $replacer = new ClassmapReplacer();
- $replacer->classmap_prefix = 'Mozart_';
- $contents = $replacer->replace($contents);
- $this->assertEquals('class Mozart_Hello_World extends Bye_World {', $contents);
- }
-
- /** @test */
- public function it_replaces_class_declarations_that_implement_interfaces(): void
- {
- $contents = 'class Hello_World implements Bye_World {';
- $replacer = new ClassmapReplacer();
- $replacer->classmap_prefix = 'Mozart_';
- $contents = $replacer->replace($contents);
- $this->assertEquals('class Mozart_Hello_World implements Bye_World {', $contents);
- }
-
- /** @test */
- public function it_stores_replaced_class_names(): void
- {
- $contents = 'class Hello_World {';
- $replacer = new ClassmapReplacer();
- $replacer->classmap_prefix = 'Mozart_';
- $replacer->replace($contents);
- $this->assertArrayHasKey('Hello_World', $replacer->replacedClasses);
- }
-
- /** @test */
- public function it_replaces_class_declarations_psr2(): void
- {
- $contents = "class Hello_World\n{";
- $replacer = new ClassmapReplacer();
- $replacer->classmap_prefix = 'Mozart_';
- $contents = $replacer->replace($contents);
- $this->assertEquals("class Mozart_Hello_World\n{", $contents);
- }
-
- /**
- * @see https://github.com/coenjacobs/mozart/issues/81
- *
- * @test
- */
- public function it_replaces_class(): void
- {
- $contents = "class Hello_World";
- $replacer = new ClassmapReplacer();
- $replacer->classmap_prefix = 'Mozart_';
- $contents = $replacer->replace($contents);
- $this->assertEquals("class Mozart_Hello_World", $contents);
- }
-
-
- /**
- * @see ClassmapReplacerIntegrationTest::test_it_does_not_make_classname_replacement_inside_namespaced_file()
- * @see https://github.com/coenjacobs/mozart/issues/93
- *
- * @test
- */
- public function it_does_not_replace_inside_namespace_multiline(): void
- {
- $input = "
- namespace Mozart;
- class Hello_World
- ";
- $replacer = new ClassmapReplacer();
- $replacer->classmap_prefix = 'Mozart_';
- $result = $replacer->replace($input);
-
- $this->assertEquals($input, $result);
- }
-
- /**
- * @see ClassmapReplacerIntegrationTest::test_it_does_not_make_classname_replacement_inside_namespaced_file()
- * @see https://github.com/coenjacobs/mozart/issues/93
- *
- * @test
- */
- public function it_does_not_replace_inside_namespace_singleline(): void
- {
- $input = "namespace Mozart; class Hello_World";
- $replacer = new ClassmapReplacer();
- $replacer->classmap_prefix = 'Mozart_';
- $result = $replacer->replace($input);
-
- $this->assertEquals($input, $result);
- }
-
- /**
- * It's possible to have multiple namespaces inside one file.
- *
- * To have two classes in one file, one in a namespace and the other not, the global namespace needs to be explicit.
- *
- * @test
- */
- public function it_does_not_replace_inside_named_namespace_but_does_inside_explicit_global_namespace(): void
- {
-
- $input = "
- namespace My_Project {
- class A_Class { }
- }
- namespace {
- class B_Class { }
- }
- ";
-
- $replacer = new ClassmapReplacer();
- $replacer->classmap_prefix = 'Mozart_';
- $result = $replacer->replace($input);
-
- $this->assertStringNotContainsString('Mozart_A_Class', $result);
- $this->assertStringContainsString('Mozart_B_Class', $result);
- }
-}
diff --git a/vendor/coenjacobs/mozart/tests/replacers/ClassmapReplacerIntegrationTest.php b/vendor/coenjacobs/mozart/tests/replacers/ClassmapReplacerIntegrationTest.php
deleted file mode 100644
index e52422da6..000000000
--- a/vendor/coenjacobs/mozart/tests/replacers/ClassmapReplacerIntegrationTest.php
+++ /dev/null
@@ -1,137 +0,0 @@
-testsWorkingDir = __DIR__ . '/temptestdir';
- if (!file_exists($this->testsWorkingDir)) {
- mkdir($this->testsWorkingDir);
- }
-
- $mozart_config = new class() {
- public $dep_namespace = "Mozart";
- public $classmap_prefix = "Mozart_";
- public $dep_directory = "/dep_directory/";
- public $classmap_directory = "/classmap_directory/";
-
- };
-
- $composer = new class() {
- public $repositories = array();
- public $require = array();
- public $minimum_stability = "dev";
- public $extra;
- };
-
- $composer->extra = new class() {
- public $mozart;
- };
-
- $composer->extra->mozart = $mozart_config;
-
- $this->composer = $composer;
- }
-
- /**
- * Issue #93 shows a classname being updated inside a class whose namespace has also been updated
- * by Mozart.
- *
- * This is caused by the same files being loaded by both a PSR-4 autolaoder and classmap autoloader.
- * @see https://github.com/katzgrau/KLogger/blob/de2d3ab6777a393a9879e0496ebb8e0644066e3f/composer.json#L24-L29
- */
- public function test_it_does_not_make_classname_replacement_inside_namespaced_file()
- {
-
- $composer = $this->composer;
-
- $composer->repositories[] = new class() {
- public $url = "https://github.com/BrianHenryIE/bh-wp-logger";
- public $type = "git";
- };
-
- $composer->require["brianhenryie/wp-logger"] = "dev-master#dd2bb0665e01e11b282178e76a2334198d3860c5";
-
- $composer_json_string = json_encode($composer);
- $composer_json_string = str_replace('minimum_stability', 'minimum-stability', $composer_json_string);
-
- file_put_contents($this->testsWorkingDir . '/composer.json', $composer_json_string);
-
- chdir($this->testsWorkingDir);
-
- exec('composer install');
-
- $inputInterfaceMock = $this->createMock(InputInterface::class);
- $outputInterfaceMock = $this->createMock(OutputInterface::class);
-
- $mozartCompose = new Compose();
-
- $result = $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock);
-
- $php_string = file_get_contents($this->testsWorkingDir .'/dep_directory/BrianHenryIE/WP_Logger/class-logger.php');
-
- // Confirm problem is gone.
- $this->assertStringNotContainsString('class Mozart_Logger extends', $php_string);
-
- // Confirm solution is correct.
- $this->assertStringContainsString('class Logger extends', $php_string);
- }
-
-
- /**
- * Delete $this->testsWorkingDir after each test.
- *
- * @see https://stackoverflow.com/questions/3349753/delete-directory-with-files-in-it
- */
- public function tearDown(): void
- {
- parent::tearDown();
-
- $dir = $this->testsWorkingDir;
-
- $it = new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS);
- $files = new RecursiveIteratorIterator(
- $it,
- RecursiveIteratorIterator::CHILD_FIRST
- );
- foreach ($files as $file) {
- if ($file->isDir()) {
- rmdir($file->getRealPath());
- } else {
- unlink($file->getRealPath());
- }
- }
- rmdir($dir);
- }
-}
diff --git a/vendor/coenjacobs/mozart/tests/replacers/NamespaceReplacerIntegrationTest.php b/vendor/coenjacobs/mozart/tests/replacers/NamespaceReplacerIntegrationTest.php
deleted file mode 100644
index 6e388a76f..000000000
--- a/vendor/coenjacobs/mozart/tests/replacers/NamespaceReplacerIntegrationTest.php
+++ /dev/null
@@ -1,131 +0,0 @@
-testsWorkingDir = __DIR__ . '/temptestdir';
- if (!file_exists($this->testsWorkingDir)) {
- mkdir($this->testsWorkingDir);
- }
-
- $mozart_config = new class() {
- public $dep_namespace = "Mozart";
- public $classmap_prefix = "Mozart_";
- public $dep_directory = "/dep_directory/";
- public $classmap_directory = "/classmap_directory/";
-
- };
-
- $composer = new class() {
- public $require = array();
- public $extra;
- };
-
- $composer->extra = new class() {
- public $mozart;
- };
-
- $composer->extra->mozart = $mozart_config;
-
- $this->composer = $composer;
- }
-
- /**
- * After PR #84, running Mozart on Mpdf began prefixing the class name inside the namespaced file.
- *
- * The problem coming from the filename matching the namespace name?
- *
- * dev-master#5d8041fdefc94ff57edcbe83ab468a9988c4fc11
- *
- * @see https://github.com/coenjacobs/mozart/pull/84/files
- *
- * Should be: "class Mpdf implements" because its namespace has already been prefixed.
- */
- public function test_it_does_not_make_classname_replacement_inside_namespaced_file()
- {
-
- $composer = $this->composer;
-
- $composer->require["mpdf/mpdf"] = "8.0.10";
-
- file_put_contents($this->testsWorkingDir . '/composer.json', json_encode($composer));
-
- chdir($this->testsWorkingDir);
-
- exec('composer install');
-
- $inputInterfaceMock = $this->createMock(InputInterface::class);
- $outputInterfaceMock = $this->createMock(OutputInterface::class);
-
- $mozartCompose = new Compose();
-
- $result = $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock);
-
- $mpdf_php = file_get_contents($this->testsWorkingDir .'/dep_directory/Mpdf/Mpdf.php');
-
- // Confirm problem is gone.
- $this->assertStringNotContainsString('class Mozart\Mpdf implements', $mpdf_php);
-
- // Confirm solution is correct.
- $this->assertStringContainsString('class Mpdf implements', $mpdf_php);
- }
-
-
- /**
- * Delete $this->testsWorkingDir after each test.
- *
- * @see https://stackoverflow.com/questions/3349753/delete-directory-with-files-in-it
- */
- public function tearDown(): void
- {
- parent::tearDown();
-
- $dir = $this->testsWorkingDir;
-
- $it = new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS);
- $files = new RecursiveIteratorIterator(
- $it,
- RecursiveIteratorIterator::CHILD_FIRST
- );
- foreach ($files as $file) {
- if ($file->isDir()) {
- rmdir($file->getRealPath());
- } else {
- unlink($file->getRealPath());
- }
- }
- rmdir($dir);
- }
-}
diff --git a/vendor/coenjacobs/mozart/tests/replacers/NamespaceReplacerTest.php b/vendor/coenjacobs/mozart/tests/replacers/NamespaceReplacerTest.php
deleted file mode 100644
index d317378ab..000000000
--- a/vendor/coenjacobs/mozart/tests/replacers/NamespaceReplacerTest.php
+++ /dev/null
@@ -1,126 +0,0 @@
-replacer = self::createReplacer('Test\\Test');
- }
-
- /**
- * Creates a NamespaceReplacer, given a namespace and a prefix.
- *
- * @param string $namespace
- * @param string $prefix
- *
- * @return Psr0
- */
- protected static function createReplacer(string $namespace, string $prefix = self::PREFIX) : NamespaceReplacer
- {
- $autoloader = new Psr0;
- $autoloader->namespace = $namespace;
- $replacer = new NamespaceReplacer();
- $replacer->setAutoloader($autoloader);
- $replacer->dep_namespace = $prefix;
-
- return $replacer;
- }
-
- /** @test */
- public function it_replaces_namespace_declarations(): void
- {
- $contents = 'namespace Test\\Test;';
- $contents = $this->replacer->replace($contents);
-
- $this->assertEquals('namespace My\\Mozart\\Prefix\\Test\\Test;', $contents);
- }
-
-
- /** @test */
- public function it_doesnt_replaces_namespace_inside_namespace(): void
- {
- $replacer = self::createReplacer('Test');
-
- $contents = "namespace Test\\Something;\n\nuse Test\\Test;";
- $contents = $replacer->replace($contents);
-
- $this->assertEquals("namespace My\\Mozart\\Prefix\\Test\\Something;\n\nuse My\\Mozart\\Prefix\\Test\\Test;", $contents);
- }
-
- /** @test */
- public function it_replaces_partial_namespace_declarations(): void
- {
- $contents = 'namespace Test\\Test\\Another;';
- $contents = $this->replacer->replace($contents);
-
- $this->assertEquals('namespace My\\Mozart\\Prefix\\Test\\Test\\Another;', $contents);
- }
-
- /** @test */
- public function it_doesnt_prefix_already_prefixed_namespace(): void
- {
- $replacer = self::createReplacer('Test\\Another');
-
- $contents = 'namespace My\\Mozart\\Prefix\\Test\\Another;';
- $contents = $replacer->replace($contents);
-
- $this->assertEquals('namespace My\\Mozart\\Prefix\\Test\\Another;', $contents);
- }
-
- /** @test */
- public function it_doesnt_double_replace_namespaces_that_also_exist_inside_another_namespace(): void
- {
- $chickenReplacer = self::createReplacer('Chicken');
- $eggReplacer = self::createReplacer('Egg');
-
- // This is a tricky situation. We are referencing Chicken\Egg,
- // but Egg *also* exists as a separate top level class.
- $contents = 'use Chicken\\Egg;';
- $expected = 'use My\\Mozart\\Prefix\\Chicken\\Egg;';
-
- // First, we test that eggReplacer(chickenReplacer()) yields the expected result.
- $this->assertEquals($expected, $eggReplacer->replace($chickenReplacer->replace($contents)));
-
- // Then, we test that chickenReplacer(eggReplacer()) yields the expected result.
- $this->assertEquals($expected, $chickenReplacer->replace($eggReplacer->replace($contents)));
-
- // Now we do the same thing, but with root-relative references.
- $contents = 'use \\Chicken\\Egg;';
- $expected = 'use \\My\\Mozart\\Prefix\\Chicken\\Egg;';
-
- // First, we test that eggReplacer(chickenReplacer()) yields the expected result.
- $this->assertEquals($expected, $eggReplacer->replace($chickenReplacer->replace($contents)));
-
- // Then, we test that chickenReplacer(eggReplacer()) yields the expected result.
- $this->assertEquals($expected, $chickenReplacer->replace($eggReplacer->replace($contents)));
- }
-
- /**
- * @see https://github.com/coenjacobs/mozart/issues/75
- *
- * @test
- */
- public function it_replaces_namespace_use_as_declarations(): void
- {
-
- $namespace = 'Symfony\Polyfill\Mbstring';
- $prefix = "MBViews\\Dependencies\\";
-
- $replacer = self::createReplacer($namespace, $prefix);
-
- $contents = "use Symfony\Polyfill\Mbstring as p;";
- $expected = "use MBViews\Dependencies\Symfony\Polyfill\Mbstring as p;";
-
- $this->assertEquals($expected, $replacer->replace($contents));
- }
-}
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index 63f1eeb5f..d1dd49388 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -6,13 +6,7 @@
$baseDir = dirname($vendorDir);
return array(
- 'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
- 'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
- 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
- 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
- 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
- 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
'UsabilityDynamics\\Job' => $vendorDir . '/udx/lib-utility/lib/class-job.php',
'UsabilityDynamics\\Loader' => $vendorDir . '/udx/lib-utility/lib/class-loader.php',
'UsabilityDynamics\\Settings' => $vendorDir . '/udx/lib-settings/lib/class-settings.php',
@@ -21,12 +15,12 @@
'UsabilityDynamics\\UD_API\\API' => $vendorDir . '/udx/lib-ud-api-client/lib/classes/class-api.php',
'UsabilityDynamics\\UD_API\\Admin' => $vendorDir . '/udx/lib-ud-api-client/lib/classes/class-admin.php',
'UsabilityDynamics\\UD_API\\Bootstrap' => $vendorDir . '/udx/lib-ud-api-client/lib/classes/class-bootstrap.php',
- 'UsabilityDynamics\\UD_API\\License_Checker' => $vendorDir . '/udx/lib-ud-api-client/lib/classes/class-license-checker.php',
'UsabilityDynamics\\UD_API\\Licenses_Table' => $vendorDir . '/udx/lib-ud-api-client/lib/classes/class-licenses-table.php',
'UsabilityDynamics\\UD_API\\Manager' => $vendorDir . '/udx/lib-ud-api-client/lib/classes/class-manager.php',
'UsabilityDynamics\\UD_API\\More_Products_Table' => $vendorDir . '/udx/lib-ud-api-client/lib/classes/class-more-products-table.php',
'UsabilityDynamics\\UD_API\\Scaffold' => $vendorDir . '/udx/lib-ud-api-client/lib/classes/class-scaffold.php',
'UsabilityDynamics\\UD_API\\UI' => $vendorDir . '/udx/lib-ud-api-client/lib/classes/class-ui.php',
+ 'UsabilityDynamics\\UD_API\\Update_Checker' => $vendorDir . '/udx/lib-ud-api-client/lib/classes/class-update-checker.php',
'UsabilityDynamics\\Utility' => $vendorDir . '/udx/lib-utility/lib/class-utility.php',
'UsabilityDynamics\\Utility\\Guid_Fix' => $vendorDir . '/udx/lib-utility/lib/class-guid-fix.php',
'UsabilityDynamics\\WP\\Bootstrap' => $vendorDir . '/udx/lib-wp-bootstrap/lib/classes/class-bootstrap.php',
@@ -35,27 +29,23 @@
'UsabilityDynamics\\WP\\Dashboard' => $vendorDir . '/udx/lib-wp-bootstrap/lib/classes/class-dashboard.php',
'UsabilityDynamics\\WP\\Errors' => $vendorDir . '/udx/lib-wp-bootstrap/lib/classes/class-errors.php',
'UsabilityDynamics\\WP\\Scaffold' => $vendorDir . '/udx/lib-wp-bootstrap/lib/classes/class-scaffold.php',
+ 'UsabilityDynamics\\WP\\TGMPA_List_Table' => $vendorDir . '/udx/lib-wp-bootstrap/lib/classes/class-tgm-list-table.php',
+ 'UsabilityDynamics\\WP\\TGM_Bulk_Installer' => $vendorDir . '/udx/lib-wp-bootstrap/lib/classes/class-tgm-bulk-installer.php',
+ 'UsabilityDynamics\\WP\\TGM_Bulk_Installer_Skin' => $vendorDir . '/udx/lib-wp-bootstrap/lib/classes/class-tgm-bulk-installer.php',
+ 'UsabilityDynamics\\WP\\TGM_Plugin_Activation' => $vendorDir . '/udx/lib-wp-bootstrap/lib/classes/class-tgm-plugin-activation.php',
'UsabilityDynamics\\WP\\Utility' => $vendorDir . '/udx/lib-wp-bootstrap/lib/classes/class-utility.php',
- 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
- 'WP_Async_Request' => $vendorDir . '/deliciousbrains/wp-background-processing/classes/wp-async-request.php',
- 'WP_Background_Process' => $vendorDir . '/deliciousbrains/wp-background-processing/classes/wp-background-process.php',
'wpCloud\\StatelessMedia\\API' => $baseDir . '/lib/classes/class-api.php',
'wpCloud\\StatelessMedia\\Ajax' => $baseDir . '/lib/classes/class-ajax.php',
+ 'wpCloud\\StatelessMedia\\AppEngine' => $baseDir . '/lib/classes/class-google-app-engine.php',
'wpCloud\\StatelessMedia\\Bootstrap' => $baseDir . '/lib/classes/class-bootstrap.php',
'wpCloud\\StatelessMedia\\Compatibility' => $baseDir . '/lib/classes/class-compatibility.php',
- 'wpCloud\\StatelessMedia\\CompatibilityWooExtraProductOptions' => $baseDir . '/lib/classes/compatibility/woo-extra-product-options.php',
- 'wpCloud\\StatelessMedia\\DynamicImageSupport' => $baseDir . '/lib/classes/compatibility/dynamic-image-support.php',
+ 'wpCloud\\StatelessMedia\\DynamicImageSupport' => $baseDir . '/lib/classes/class-dynamic-image-support.php',
'wpCloud\\StatelessMedia\\Errors' => $baseDir . '/lib/classes/class-errors.php',
'wpCloud\\StatelessMedia\\FatalException' => $baseDir . '/lib/classes/exception-fatal.php',
'wpCloud\\StatelessMedia\\GS_Client' => $baseDir . '/lib/classes/class-gs-client.php',
- 'wpCloud\\StatelessMedia\\GoogleAppEngine' => $baseDir . '/lib/classes/compatibility/google-app-engine.php',
- 'wpCloud\\StatelessMedia\\Imagify' => $baseDir . '/lib/classes/compatibility/imagify.php',
'wpCloud\\StatelessMedia\\Logger' => $baseDir . '/lib/classes/class-logger.php',
'wpCloud\\StatelessMedia\\Module' => $baseDir . '/lib/classes/class-module.php',
- 'wpCloud\\StatelessMedia\\SOCSS' => $baseDir . '/lib/classes/compatibility/siteorigin-css.php',
- 'wpCloud\\StatelessMedia\\SOWidgetCSS' => $baseDir . '/lib/classes/compatibility/siteorigin-widget-bundle.php',
'wpCloud\\StatelessMedia\\Settings' => $baseDir . '/lib/classes/class-settings.php',
- 'wpCloud\\StatelessMedia\\ShortPixel' => $baseDir . '/lib/classes/compatibility/shortpixel.php',
'wpCloud\\StatelessMedia\\Singleton' => $baseDir . '/lib/classes/trait-singleton.php',
'wpCloud\\StatelessMedia\\StreamWrapper' => $baseDir . '/lib/classes/class-gs-stream-wrapper.php',
'wpCloud\\StatelessMedia\\SyncNonMedia' => $baseDir . '/lib/classes/class-sync-non-media.php',
@@ -69,10 +59,4 @@
'wpCloud\\StatelessMedia\\UnprocessableException' => $baseDir . '/lib/classes/exception-unprocessable.php',
'wpCloud\\StatelessMedia\\Upgrader' => $baseDir . '/lib/classes/class-upgrader.php',
'wpCloud\\StatelessMedia\\Utility' => $baseDir . '/lib/classes/class-utility.php',
- 'wpCloud\\StatelessMedia\\VidoRev' => $baseDir . '/lib/classes/compatibility/vidorev.php',
- 'wpCloud\\StatelessMedia\\WPBakeryPageBuilder' => $baseDir . '/lib/classes/compatibility/wpbakery-page-builder.php',
- 'wpCloud\\StatelessMedia\\WPForms' => $baseDir . '/lib/classes/compatibility/wpforms.php',
- 'wpCloud\\StatelessMedia\\WPRetina2x' => $baseDir . '/lib/classes/compatibility/wp-retina-2x.php',
- 'wpCloud\\StatelessMedia\\WPSmush' => $baseDir . '/lib/classes/compatibility/wp-smush.php',
- 'wpCloud\\StatelessMedia\\WooCommerce' => $baseDir . '/lib/classes/compatibility/woocommerce.php',
);
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
deleted file mode 100644
index e70959884..000000000
--- a/vendor/composer/autoload_files.php
+++ /dev/null
@@ -1,17 +0,0 @@
- $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
- '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
- 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
- '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
- '8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
- 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
- '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
- 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
-);
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index f69715179..2f0271f50 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -6,20 +6,7 @@
$baseDir = dirname($vendorDir);
return array(
- 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
- 'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'),
- 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
- 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
- 'Symfony\\Polyfill\\Intl\\Grapheme\\' => array($vendorDir . '/symfony/polyfill-intl-grapheme'),
- 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
- 'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'),
- 'Symfony\\Component\\String\\' => array($vendorDir . '/symfony/string'),
- 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
- 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
- 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
- 'League\\MimeTypeDetection\\' => array($vendorDir . '/league/mime-type-detection/src'),
- 'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
+ 'MetaBox\\' => array($vendorDir . '/wpmetabox/meta-box/src'),
'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
- 'CoenJacobs\\Mozart\\' => array($vendorDir . '/coenjacobs/mozart/src'),
);
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index ea6820089..4388aef1f 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -33,18 +33,6 @@ public static function getLoader()
$loader->register(true);
- $filesToLoad = \Composer\Autoload\ComposerStaticInitc59d002476a452800baaf79c430753cb::$files;
- $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
- if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
- $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
-
- require $file;
- }
- }, null, null);
- foreach ($filesToLoad as $fileIdentifier => $file) {
- $requireFile($fileIdentifier, $file);
- }
-
return $loader;
}
}
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 5f60a88b8..a3eabcba5 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -6,39 +6,10 @@
class ComposerStaticInitc59d002476a452800baaf79c430753cb
{
- public static $files = array (
- '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
- '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
- 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
- '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
- '8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
- 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
- '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
- 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php',
- );
-
public static $prefixLengthsPsr4 = array (
- 'S' =>
- array (
- 'Symfony\\Polyfill\\Php80\\' => 23,
- 'Symfony\\Polyfill\\Php73\\' => 23,
- 'Symfony\\Polyfill\\Mbstring\\' => 26,
- 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
- 'Symfony\\Polyfill\\Intl\\Grapheme\\' => 31,
- 'Symfony\\Polyfill\\Ctype\\' => 23,
- 'Symfony\\Contracts\\Service\\' => 26,
- 'Symfony\\Component\\String\\' => 25,
- 'Symfony\\Component\\Finder\\' => 25,
- 'Symfony\\Component\\Console\\' => 26,
- ),
- 'P' =>
+ 'M' =>
array (
- 'Psr\\Container\\' => 14,
- ),
- 'L' =>
- array (
- 'League\\MimeTypeDetection\\' => 25,
- 'League\\Flysystem\\' => 17,
+ 'MetaBox\\' => 8,
),
'F' =>
array (
@@ -47,62 +18,13 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb
'C' =>
array (
'Composer\\Installers\\' => 20,
- 'CoenJacobs\\Mozart\\' => 18,
),
);
public static $prefixDirsPsr4 = array (
- 'Symfony\\Polyfill\\Php80\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
- ),
- 'Symfony\\Polyfill\\Php73\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/polyfill-php73',
- ),
- 'Symfony\\Polyfill\\Mbstring\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
- ),
- 'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
- ),
- 'Symfony\\Polyfill\\Intl\\Grapheme\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme',
- ),
- 'Symfony\\Polyfill\\Ctype\\' =>
+ 'MetaBox\\' =>
array (
- 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
- ),
- 'Symfony\\Contracts\\Service\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/service-contracts',
- ),
- 'Symfony\\Component\\String\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/string',
- ),
- 'Symfony\\Component\\Finder\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/finder',
- ),
- 'Symfony\\Component\\Console\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/console',
- ),
- 'Psr\\Container\\' =>
- array (
- 0 => __DIR__ . '/..' . '/psr/container/src',
- ),
- 'League\\MimeTypeDetection\\' =>
- array (
- 0 => __DIR__ . '/..' . '/league/mime-type-detection/src',
- ),
- 'League\\Flysystem\\' =>
- array (
- 0 => __DIR__ . '/..' . '/league/flysystem/src',
+ 0 => __DIR__ . '/..' . '/wpmetabox/meta-box/src',
),
'Firebase\\JWT\\' =>
array (
@@ -112,10 +34,6 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb
array (
0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers',
),
- 'CoenJacobs\\Mozart\\' =>
- array (
- 0 => __DIR__ . '/..' . '/coenjacobs/mozart/src',
- ),
);
public static $prefixesPsr0 = array (
@@ -129,13 +47,7 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb
);
public static $classMap = array (
- 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
- 'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
- 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
- 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
- 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
- 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
'UsabilityDynamics\\Job' => __DIR__ . '/..' . '/udx/lib-utility/lib/class-job.php',
'UsabilityDynamics\\Loader' => __DIR__ . '/..' . '/udx/lib-utility/lib/class-loader.php',
'UsabilityDynamics\\Settings' => __DIR__ . '/..' . '/udx/lib-settings/lib/class-settings.php',
@@ -144,12 +56,12 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb
'UsabilityDynamics\\UD_API\\API' => __DIR__ . '/..' . '/udx/lib-ud-api-client/lib/classes/class-api.php',
'UsabilityDynamics\\UD_API\\Admin' => __DIR__ . '/..' . '/udx/lib-ud-api-client/lib/classes/class-admin.php',
'UsabilityDynamics\\UD_API\\Bootstrap' => __DIR__ . '/..' . '/udx/lib-ud-api-client/lib/classes/class-bootstrap.php',
- 'UsabilityDynamics\\UD_API\\License_Checker' => __DIR__ . '/..' . '/udx/lib-ud-api-client/lib/classes/class-license-checker.php',
'UsabilityDynamics\\UD_API\\Licenses_Table' => __DIR__ . '/..' . '/udx/lib-ud-api-client/lib/classes/class-licenses-table.php',
'UsabilityDynamics\\UD_API\\Manager' => __DIR__ . '/..' . '/udx/lib-ud-api-client/lib/classes/class-manager.php',
'UsabilityDynamics\\UD_API\\More_Products_Table' => __DIR__ . '/..' . '/udx/lib-ud-api-client/lib/classes/class-more-products-table.php',
'UsabilityDynamics\\UD_API\\Scaffold' => __DIR__ . '/..' . '/udx/lib-ud-api-client/lib/classes/class-scaffold.php',
'UsabilityDynamics\\UD_API\\UI' => __DIR__ . '/..' . '/udx/lib-ud-api-client/lib/classes/class-ui.php',
+ 'UsabilityDynamics\\UD_API\\Update_Checker' => __DIR__ . '/..' . '/udx/lib-ud-api-client/lib/classes/class-update-checker.php',
'UsabilityDynamics\\Utility' => __DIR__ . '/..' . '/udx/lib-utility/lib/class-utility.php',
'UsabilityDynamics\\Utility\\Guid_Fix' => __DIR__ . '/..' . '/udx/lib-utility/lib/class-guid-fix.php',
'UsabilityDynamics\\WP\\Bootstrap' => __DIR__ . '/..' . '/udx/lib-wp-bootstrap/lib/classes/class-bootstrap.php',
@@ -158,27 +70,23 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb
'UsabilityDynamics\\WP\\Dashboard' => __DIR__ . '/..' . '/udx/lib-wp-bootstrap/lib/classes/class-dashboard.php',
'UsabilityDynamics\\WP\\Errors' => __DIR__ . '/..' . '/udx/lib-wp-bootstrap/lib/classes/class-errors.php',
'UsabilityDynamics\\WP\\Scaffold' => __DIR__ . '/..' . '/udx/lib-wp-bootstrap/lib/classes/class-scaffold.php',
+ 'UsabilityDynamics\\WP\\TGMPA_List_Table' => __DIR__ . '/..' . '/udx/lib-wp-bootstrap/lib/classes/class-tgm-list-table.php',
+ 'UsabilityDynamics\\WP\\TGM_Bulk_Installer' => __DIR__ . '/..' . '/udx/lib-wp-bootstrap/lib/classes/class-tgm-bulk-installer.php',
+ 'UsabilityDynamics\\WP\\TGM_Bulk_Installer_Skin' => __DIR__ . '/..' . '/udx/lib-wp-bootstrap/lib/classes/class-tgm-bulk-installer.php',
+ 'UsabilityDynamics\\WP\\TGM_Plugin_Activation' => __DIR__ . '/..' . '/udx/lib-wp-bootstrap/lib/classes/class-tgm-plugin-activation.php',
'UsabilityDynamics\\WP\\Utility' => __DIR__ . '/..' . '/udx/lib-wp-bootstrap/lib/classes/class-utility.php',
- 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
- 'WP_Async_Request' => __DIR__ . '/..' . '/deliciousbrains/wp-background-processing/classes/wp-async-request.php',
- 'WP_Background_Process' => __DIR__ . '/..' . '/deliciousbrains/wp-background-processing/classes/wp-background-process.php',
'wpCloud\\StatelessMedia\\API' => __DIR__ . '/../..' . '/lib/classes/class-api.php',
'wpCloud\\StatelessMedia\\Ajax' => __DIR__ . '/../..' . '/lib/classes/class-ajax.php',
+ 'wpCloud\\StatelessMedia\\AppEngine' => __DIR__ . '/../..' . '/lib/classes/class-google-app-engine.php',
'wpCloud\\StatelessMedia\\Bootstrap' => __DIR__ . '/../..' . '/lib/classes/class-bootstrap.php',
'wpCloud\\StatelessMedia\\Compatibility' => __DIR__ . '/../..' . '/lib/classes/class-compatibility.php',
- 'wpCloud\\StatelessMedia\\CompatibilityWooExtraProductOptions' => __DIR__ . '/../..' . '/lib/classes/compatibility/woo-extra-product-options.php',
- 'wpCloud\\StatelessMedia\\DynamicImageSupport' => __DIR__ . '/../..' . '/lib/classes/compatibility/dynamic-image-support.php',
+ 'wpCloud\\StatelessMedia\\DynamicImageSupport' => __DIR__ . '/../..' . '/lib/classes/class-dynamic-image-support.php',
'wpCloud\\StatelessMedia\\Errors' => __DIR__ . '/../..' . '/lib/classes/class-errors.php',
'wpCloud\\StatelessMedia\\FatalException' => __DIR__ . '/../..' . '/lib/classes/exception-fatal.php',
'wpCloud\\StatelessMedia\\GS_Client' => __DIR__ . '/../..' . '/lib/classes/class-gs-client.php',
- 'wpCloud\\StatelessMedia\\GoogleAppEngine' => __DIR__ . '/../..' . '/lib/classes/compatibility/google-app-engine.php',
- 'wpCloud\\StatelessMedia\\Imagify' => __DIR__ . '/../..' . '/lib/classes/compatibility/imagify.php',
'wpCloud\\StatelessMedia\\Logger' => __DIR__ . '/../..' . '/lib/classes/class-logger.php',
'wpCloud\\StatelessMedia\\Module' => __DIR__ . '/../..' . '/lib/classes/class-module.php',
- 'wpCloud\\StatelessMedia\\SOCSS' => __DIR__ . '/../..' . '/lib/classes/compatibility/siteorigin-css.php',
- 'wpCloud\\StatelessMedia\\SOWidgetCSS' => __DIR__ . '/../..' . '/lib/classes/compatibility/siteorigin-widget-bundle.php',
'wpCloud\\StatelessMedia\\Settings' => __DIR__ . '/../..' . '/lib/classes/class-settings.php',
- 'wpCloud\\StatelessMedia\\ShortPixel' => __DIR__ . '/../..' . '/lib/classes/compatibility/shortpixel.php',
'wpCloud\\StatelessMedia\\Singleton' => __DIR__ . '/../..' . '/lib/classes/trait-singleton.php',
'wpCloud\\StatelessMedia\\StreamWrapper' => __DIR__ . '/../..' . '/lib/classes/class-gs-stream-wrapper.php',
'wpCloud\\StatelessMedia\\SyncNonMedia' => __DIR__ . '/../..' . '/lib/classes/class-sync-non-media.php',
@@ -192,12 +100,6 @@ class ComposerStaticInitc59d002476a452800baaf79c430753cb
'wpCloud\\StatelessMedia\\UnprocessableException' => __DIR__ . '/../..' . '/lib/classes/exception-unprocessable.php',
'wpCloud\\StatelessMedia\\Upgrader' => __DIR__ . '/../..' . '/lib/classes/class-upgrader.php',
'wpCloud\\StatelessMedia\\Utility' => __DIR__ . '/../..' . '/lib/classes/class-utility.php',
- 'wpCloud\\StatelessMedia\\VidoRev' => __DIR__ . '/../..' . '/lib/classes/compatibility/vidorev.php',
- 'wpCloud\\StatelessMedia\\WPBakeryPageBuilder' => __DIR__ . '/../..' . '/lib/classes/compatibility/wpbakery-page-builder.php',
- 'wpCloud\\StatelessMedia\\WPForms' => __DIR__ . '/../..' . '/lib/classes/compatibility/wpforms.php',
- 'wpCloud\\StatelessMedia\\WPRetina2x' => __DIR__ . '/../..' . '/lib/classes/compatibility/wp-retina-2x.php',
- 'wpCloud\\StatelessMedia\\WPSmush' => __DIR__ . '/../..' . '/lib/classes/compatibility/wp-smush.php',
- 'wpCloud\\StatelessMedia\\WooCommerce' => __DIR__ . '/../..' . '/lib/classes/compatibility/woocommerce.php',
);
public static function getInitializer(ClassLoader $loader)
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index d1abce28a..1dc71e802 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -46,1412 +46,221 @@
],
"install-path": "../ccampbell/chromephp"
},
- {
- "name": "coenjacobs/mozart",
- "version": "0.7.1",
- "version_normalized": "0.7.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/coenjacobs/mozart.git",
- "reference": "dbcdeb992d20d9c8914eef090f9a0d684bb1102c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/coenjacobs/mozart/zipball/dbcdeb992d20d9c8914eef090f9a0d684bb1102c",
- "reference": "dbcdeb992d20d9c8914eef090f9a0d684bb1102c",
- "shasum": ""
- },
- "require": {
- "league/flysystem": "^1.0",
- "php": "^7.3|^8.0",
- "symfony/console": "^4|^5",
- "symfony/finder": "^4|^5"
- },
- "require-dev": {
- "mheap/phpunit-github-actions-printer": "^1.4",
- "phpunit/phpunit": "^8.5",
- "squizlabs/php_codesniffer": "^3.5",
- "vimeo/psalm": "^4.4"
- },
- "time": "2021-02-02T21:37:03+00:00",
- "bin": [
- "bin/mozart"
- ],
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "CoenJacobs\\Mozart\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Coen Jacobs",
- "email": "coenjacobs@gmail.com"
- }
- ],
- "description": "Composes all dependencies as a package inside a WordPress plugin",
- "funding": [
- {
- "url": "https://github.com/coenjacobs",
- "type": "github"
- }
- ],
- "install-path": "../coenjacobs/mozart"
- },
{
"name": "composer/installers",
"version": "v1.12.0",
"version_normalized": "1.12.0.0",
"source": {
"type": "git",
- "url": "https://github.com/composer/installers.git",
- "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/composer/installers/zipball/d20a64ed3c94748397ff5973488761b22f6d3f19",
- "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19",
- "shasum": ""
- },
- "require": {
- "composer-plugin-api": "^1.0 || ^2.0"
- },
- "replace": {
- "roundcube/plugin-installer": "*",
- "shama/baton": "*"
- },
- "require-dev": {
- "composer/composer": "1.6.* || ^2.0",
- "composer/semver": "^1 || ^3",
- "phpstan/phpstan": "^0.12.55",
- "phpstan/phpstan-phpunit": "^0.12.16",
- "symfony/phpunit-bridge": "^4.2 || ^5",
- "symfony/process": "^2.3"
- },
- "time": "2021-09-13T08:19:44+00:00",
- "type": "composer-plugin",
- "extra": {
- "class": "Composer\\Installers\\Plugin",
- "branch-alias": {
- "dev-main": "1.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Composer\\Installers\\": "src/Composer/Installers"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Kyle Robinson Young",
- "email": "kyle@dontkry.com",
- "homepage": "https://github.com/shama"
- }
- ],
- "description": "A multi-framework Composer library installer",
- "homepage": "https://composer.github.io/installers/",
- "keywords": [
- "Craft",
- "Dolibarr",
- "Eliasis",
- "Hurad",
- "ImageCMS",
- "Kanboard",
- "Lan Management System",
- "MODX Evo",
- "MantisBT",
- "Mautic",
- "Maya",
- "OXID",
- "Plentymarkets",
- "Porto",
- "RadPHP",
- "SMF",
- "Starbug",
- "Thelia",
- "Whmcs",
- "WolfCMS",
- "agl",
- "aimeos",
- "annotatecms",
- "attogram",
- "bitrix",
- "cakephp",
- "chef",
- "cockpit",
- "codeigniter",
- "concrete5",
- "croogo",
- "dokuwiki",
- "drupal",
- "eZ Platform",
- "elgg",
- "expressionengine",
- "fuelphp",
- "grav",
- "installer",
- "itop",
- "joomla",
- "known",
- "kohana",
- "laravel",
- "lavalite",
- "lithium",
- "magento",
- "majima",
- "mako",
- "mediawiki",
- "miaoxing",
- "modulework",
- "modx",
- "moodle",
- "osclass",
- "pantheon",
- "phpbb",
- "piwik",
- "ppi",
- "processwire",
- "puppet",
- "pxcms",
- "reindex",
- "roundcube",
- "shopware",
- "silverstripe",
- "sydes",
- "sylius",
- "symfony",
- "tastyigniter",
- "typo3",
- "wordpress",
- "yawik",
- "zend",
- "zikula"
- ],
- "funding": [
- {
- "url": "https://packagist.com",
- "type": "custom"
- },
- {
- "url": "https://github.com/composer",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/composer/composer",
- "type": "tidelift"
- }
- ],
- "install-path": "./installers"
- },
- {
- "name": "deliciousbrains/wp-background-processing",
- "version": "1.1.0",
- "version_normalized": "1.1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/deliciousbrains/wp-background-processing.git",
- "reference": "d5ef95cecba7f792ddca3e3bd70ebfb90dc4996d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/deliciousbrains/wp-background-processing/zipball/d5ef95cecba7f792ddca3e3bd70ebfb90dc4996d",
- "reference": "d5ef95cecba7f792ddca3e3bd70ebfb90dc4996d",
- "shasum": ""
- },
- "require": {
- "php": ">=5.6"
- },
- "require-dev": {
- "phpcompatibility/phpcompatibility-wp": "*",
- "phpunit/phpunit": "^8.0",
- "spryker/code-sniffer": "^0.17.18",
- "wp-coding-standards/wpcs": "^2.3",
- "yoast/phpunit-polyfills": "^1.0"
- },
- "suggest": {
- "coenjacobs/mozart": "Easily wrap this library with your own prefix, to prevent collisions when multiple plugins use this library"
- },
- "time": "2023-04-18T12:32:25+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "classmap": [
- "classes/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "GPL-2.0-or-later"
- ],
- "authors": [
- {
- "name": "Delicious Brains",
- "email": "nom@deliciousbrains.com"
- }
- ],
- "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.",
- "install-path": "../deliciousbrains/wp-background-processing"
- },
- {
- "name": "firebase/php-jwt",
- "version": "v6.6.0",
- "version_normalized": "6.6.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/firebase/php-jwt.git",
- "reference": "5a9cf79b4a2eb347230384648cc7b0d68cd97faa"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/firebase/php-jwt/zipball/5a9cf79b4a2eb347230384648cc7b0d68cd97faa",
- "reference": "5a9cf79b4a2eb347230384648cc7b0d68cd97faa",
- "shasum": ""
- },
- "require": {
- "php": "^7.4||^8.0"
- },
- "require-dev": {
- "guzzlehttp/guzzle": "^6.5||^7.4",
- "phpspec/prophecy-phpunit": "^2.0",
- "phpunit/phpunit": "^9.5",
- "psr/cache": "^1.0||^2.0",
- "psr/http-client": "^1.0",
- "psr/http-factory": "^1.0"
- },
- "suggest": {
- "ext-sodium": "Support EdDSA (Ed25519) signatures",
- "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
- },
- "time": "2023-06-13T17:11:06+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Firebase\\JWT\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Neuman Vong",
- "email": "neuman+pear@twilio.com",
- "role": "Developer"
- },
- {
- "name": "Anant Narayanan",
- "email": "anant@php.net",
- "role": "Developer"
- }
- ],
- "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
- "homepage": "https://github.com/firebase/php-jwt",
- "keywords": [
- "jwt",
- "php"
- ],
- "install-path": "../firebase/php-jwt"
- },
- {
- "name": "league/flysystem",
- "version": "1.1.10",
- "version_normalized": "1.1.10.0",
- "source": {
- "type": "git",
- "url": "https://github.com/thephpleague/flysystem.git",
- "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3239285c825c152bcc315fe0e87d6b55f5972ed1",
- "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1",
- "shasum": ""
- },
- "require": {
- "ext-fileinfo": "*",
- "league/mime-type-detection": "^1.3",
- "php": "^7.2.5 || ^8.0"
- },
- "conflict": {
- "league/flysystem-sftp": "<1.0.6"
- },
- "require-dev": {
- "phpspec/prophecy": "^1.11.1",
- "phpunit/phpunit": "^8.5.8"
- },
- "suggest": {
- "ext-ftp": "Allows you to use FTP server storage",
- "ext-openssl": "Allows you to use FTPS server storage",
- "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
- "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3",
- "league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
- "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching",
- "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
- "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
- "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib",
- "league/flysystem-webdav": "Allows you to use WebDAV storage",
- "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter",
- "spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
- "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
- },
- "time": "2022-10-04T09:16:37+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "League\\Flysystem\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Frank de Jonge",
- "email": "info@frenky.net"
- }
- ],
- "description": "Filesystem abstraction: Many filesystems, one API.",
- "keywords": [
- "Cloud Files",
- "WebDAV",
- "abstraction",
- "aws",
- "cloud",
- "copy.com",
- "dropbox",
- "file systems",
- "files",
- "filesystem",
- "filesystems",
- "ftp",
- "rackspace",
- "remote",
- "s3",
- "sftp",
- "storage"
- ],
- "funding": [
- {
- "url": "https://offset.earth/frankdejonge",
- "type": "other"
- }
- ],
- "install-path": "../league/flysystem"
- },
- {
- "name": "league/mime-type-detection",
- "version": "1.11.0",
- "version_normalized": "1.11.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/thephpleague/mime-type-detection.git",
- "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
- "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
- "shasum": ""
- },
- "require": {
- "ext-fileinfo": "*",
- "php": "^7.2 || ^8.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "^3.2",
- "phpstan/phpstan": "^0.12.68",
- "phpunit/phpunit": "^8.5.8 || ^9.3"
- },
- "time": "2022-04-17T13:12:02+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "League\\MimeTypeDetection\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Frank de Jonge",
- "email": "info@frankdejonge.nl"
- }
- ],
- "description": "Mime-type detection for Flysystem",
- "funding": [
- {
- "url": "https://github.com/frankdejonge",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/league/flysystem",
- "type": "tidelift"
- }
- ],
- "install-path": "../league/mime-type-detection"
- },
- {
- "name": "psr/container",
- "version": "2.0.2",
- "version_normalized": "2.0.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/container.git",
- "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
- "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
- "shasum": ""
- },
- "require": {
- "php": ">=7.4.0"
- },
- "time": "2021-11-05T16:47:00+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Psr\\Container\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common Container Interface (PHP FIG PSR-11)",
- "homepage": "https://github.com/php-fig/container",
- "keywords": [
- "PSR-11",
- "container",
- "container-interface",
- "container-interop",
- "psr"
- ],
- "install-path": "../psr/container"
- },
- {
- "name": "symfony/console",
- "version": "v5.4.24",
- "version_normalized": "5.4.24.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/console.git",
- "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8",
- "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1|^3",
- "symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php73": "^1.9",
- "symfony/polyfill-php80": "^1.16",
- "symfony/service-contracts": "^1.1|^2|^3",
- "symfony/string": "^5.1|^6.0"
- },
- "conflict": {
- "psr/log": ">=3",
- "symfony/dependency-injection": "<4.4",
- "symfony/dotenv": "<5.1",
- "symfony/event-dispatcher": "<4.4",
- "symfony/lock": "<4.4",
- "symfony/process": "<4.4"
- },
- "provide": {
- "psr/log-implementation": "1.0|2.0"
- },
- "require-dev": {
- "psr/log": "^1|^2",
- "symfony/config": "^4.4|^5.0|^6.0",
- "symfony/dependency-injection": "^4.4|^5.0|^6.0",
- "symfony/event-dispatcher": "^4.4|^5.0|^6.0",
- "symfony/lock": "^4.4|^5.0|^6.0",
- "symfony/process": "^4.4|^5.0|^6.0",
- "symfony/var-dumper": "^4.4|^5.0|^6.0"
- },
- "suggest": {
- "psr/log": "For using the console logger",
- "symfony/event-dispatcher": "",
- "symfony/lock": "",
- "symfony/process": ""
- },
- "time": "2023-05-26T05:13:16+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Console\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Eases the creation of beautiful and testable command line interfaces",
- "homepage": "https://symfony.com",
- "keywords": [
- "cli",
- "command-line",
- "console",
- "terminal"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "install-path": "../symfony/console"
- },
- {
- "name": "symfony/deprecation-contracts",
- "version": "v3.3.0",
- "version_normalized": "3.3.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/deprecation-contracts.git",
- "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf",
- "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf",
- "shasum": ""
- },
- "require": {
- "php": ">=8.1"
- },
- "time": "2023-05-23T14:45:45+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.4-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "function.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "A generic function and convention to trigger deprecation notices",
- "homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "install-path": "../symfony/deprecation-contracts"
- },
- {
- "name": "symfony/finder",
- "version": "v5.4.21",
- "version_normalized": "5.4.21.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/finder.git",
- "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19",
- "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1|^3",
- "symfony/polyfill-php80": "^1.16"
- },
- "time": "2023-02-16T09:33:00+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Finder\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Finds files and directories via an intuitive fluent interface",
- "homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "install-path": "../symfony/finder"
- },
- {
- "name": "symfony/polyfill-ctype",
- "version": "v1.27.0",
- "version_normalized": "1.27.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
- "reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "provide": {
- "ext-ctype": "*"
- },
- "suggest": {
- "ext-ctype": "For best performance"
- },
- "time": "2022-11-03T14:55:06+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Ctype\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Gert de Pagter",
- "email": "BackEndTea@gmail.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for ctype functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "ctype",
- "polyfill",
- "portable"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "install-path": "../symfony/polyfill-ctype"
- },
- {
- "name": "symfony/polyfill-intl-grapheme",
- "version": "v1.27.0",
- "version_normalized": "1.27.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "511a08c03c1960e08a883f4cffcacd219b758354"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354",
- "reference": "511a08c03c1960e08a883f4cffcacd219b758354",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "suggest": {
- "ext-intl": "For best performance"
- },
- "time": "2022-11-03T14:55:06+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for intl's grapheme_* functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "grapheme",
- "intl",
- "polyfill",
- "portable",
- "shim"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "install-path": "../symfony/polyfill-intl-grapheme"
- },
- {
- "name": "symfony/polyfill-intl-normalizer",
- "version": "v1.27.0",
- "version_normalized": "1.27.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
- "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6",
- "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "suggest": {
- "ext-intl": "For best performance"
- },
- "time": "2022-11-03T14:55:06+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
- },
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for intl's Normalizer class and related functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "intl",
- "normalizer",
- "polyfill",
- "portable",
- "shim"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "install-path": "../symfony/polyfill-intl-normalizer"
- },
- {
- "name": "symfony/polyfill-mbstring",
- "version": "v1.27.0",
- "version_normalized": "1.27.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "provide": {
- "ext-mbstring": "*"
- },
- "suggest": {
- "ext-mbstring": "For best performance"
- },
- "time": "2022-11-03T14:55:06+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for the Mbstring extension",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "mbstring",
- "polyfill",
- "portable",
- "shim"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "install-path": "../symfony/polyfill-mbstring"
- },
- {
- "name": "symfony/polyfill-php73",
- "version": "v1.27.0",
- "version_normalized": "1.27.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9"
+ "url": "https://github.com/composer/installers.git",
+ "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
- "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
+ "url": "https://api.github.com/repos/composer/installers/zipball/d20a64ed3c94748397ff5973488761b22f6d3f19",
+ "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19",
"shasum": ""
},
"require": {
- "php": ">=7.1"
- },
- "time": "2022-11-03T14:55:06+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "files": [
- "bootstrap.php"
- ],
- "psr-4": {
- "Symfony\\Polyfill\\Php73\\": ""
- },
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "install-path": "../symfony/polyfill-php73"
- },
- {
- "name": "symfony/polyfill-php80",
- "version": "v1.27.0",
- "version_normalized": "1.27.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
+ "composer-plugin-api": "^1.0 || ^2.0"
},
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
- "shasum": ""
+ "replace": {
+ "roundcube/plugin-installer": "*",
+ "shama/baton": "*"
},
- "require": {
- "php": ">=7.1"
+ "require-dev": {
+ "composer/composer": "1.6.* || ^2.0",
+ "composer/semver": "^1 || ^3",
+ "phpstan/phpstan": "^0.12.55",
+ "phpstan/phpstan-phpunit": "^0.12.16",
+ "symfony/phpunit-bridge": "^4.2 || ^5",
+ "symfony/process": "^2.3"
},
- "time": "2022-11-03T14:55:06+00:00",
- "type": "library",
+ "time": "2021-09-13T08:19:44+00:00",
+ "type": "composer-plugin",
"extra": {
+ "class": "Composer\\Installers\\Plugin",
"branch-alias": {
- "dev-main": "1.27-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
+ "dev-main": "1.x-dev"
}
},
"installation-source": "dist",
"autoload": {
- "files": [
- "bootstrap.php"
- ],
"psr-4": {
- "Symfony\\Polyfill\\Php80\\": ""
- },
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Ion Bazan",
- "email": "ion.bazan@gmail.com"
- },
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "install-path": "../symfony/polyfill-php80"
- },
- {
- "name": "symfony/service-contracts",
- "version": "v3.3.0",
- "version_normalized": "3.3.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/service-contracts.git",
- "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4",
- "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4",
- "shasum": ""
- },
- "require": {
- "php": ">=8.1",
- "psr/container": "^2.0"
- },
- "conflict": {
- "ext-psr": "<1.1|>=2"
- },
- "time": "2023-05-23T14:45:45+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.4-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
+ "Composer\\Installers\\": "src/Composer/Installers"
}
},
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Contracts\\Service\\": ""
- },
- "exclude-from-classmap": [
- "/Test/"
- ]
- },
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
+ "name": "Kyle Robinson Young",
+ "email": "kyle@dontkry.com",
+ "homepage": "https://github.com/shama"
}
],
- "description": "Generic abstractions related to writing services",
- "homepage": "https://symfony.com",
+ "description": "A multi-framework Composer library installer",
+ "homepage": "https://composer.github.io/installers/",
"keywords": [
- "abstractions",
- "contracts",
- "decoupling",
- "interfaces",
- "interoperability",
- "standards"
+ "Craft",
+ "Dolibarr",
+ "Eliasis",
+ "Hurad",
+ "ImageCMS",
+ "Kanboard",
+ "Lan Management System",
+ "MODX Evo",
+ "MantisBT",
+ "Mautic",
+ "Maya",
+ "OXID",
+ "Plentymarkets",
+ "Porto",
+ "RadPHP",
+ "SMF",
+ "Starbug",
+ "Thelia",
+ "Whmcs",
+ "WolfCMS",
+ "agl",
+ "aimeos",
+ "annotatecms",
+ "attogram",
+ "bitrix",
+ "cakephp",
+ "chef",
+ "cockpit",
+ "codeigniter",
+ "concrete5",
+ "croogo",
+ "dokuwiki",
+ "drupal",
+ "eZ Platform",
+ "elgg",
+ "expressionengine",
+ "fuelphp",
+ "grav",
+ "installer",
+ "itop",
+ "joomla",
+ "known",
+ "kohana",
+ "laravel",
+ "lavalite",
+ "lithium",
+ "magento",
+ "majima",
+ "mako",
+ "mediawiki",
+ "miaoxing",
+ "modulework",
+ "modx",
+ "moodle",
+ "osclass",
+ "pantheon",
+ "phpbb",
+ "piwik",
+ "ppi",
+ "processwire",
+ "puppet",
+ "pxcms",
+ "reindex",
+ "roundcube",
+ "shopware",
+ "silverstripe",
+ "sydes",
+ "sylius",
+ "symfony",
+ "tastyigniter",
+ "typo3",
+ "wordpress",
+ "yawik",
+ "zend",
+ "zikula"
],
"funding": [
{
- "url": "https://symfony.com/sponsor",
+ "url": "https://packagist.com",
"type": "custom"
},
{
- "url": "https://github.com/fabpot",
+ "url": "https://github.com/composer",
"type": "github"
},
{
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
- "install-path": "../symfony/service-contracts"
+ "install-path": "./installers"
},
{
- "name": "symfony/string",
- "version": "v6.3.0",
- "version_normalized": "6.3.0.0",
+ "name": "firebase/php-jwt",
+ "version": "v6.9.0",
+ "version_normalized": "6.9.0.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/string.git",
- "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f"
+ "url": "https://github.com/firebase/php-jwt.git",
+ "reference": "f03270e63eaccf3019ef0f32849c497385774e11"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
- "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f",
+ "url": "https://api.github.com/repos/firebase/php-jwt/zipball/f03270e63eaccf3019ef0f32849c497385774e11",
+ "reference": "f03270e63eaccf3019ef0f32849c497385774e11",
"shasum": ""
},
"require": {
- "php": ">=8.1",
- "symfony/polyfill-ctype": "~1.8",
- "symfony/polyfill-intl-grapheme": "~1.0",
- "symfony/polyfill-intl-normalizer": "~1.0",
- "symfony/polyfill-mbstring": "~1.0"
- },
- "conflict": {
- "symfony/translation-contracts": "<2.5"
+ "php": "^7.4||^8.0"
},
"require-dev": {
- "symfony/error-handler": "^5.4|^6.0",
- "symfony/http-client": "^5.4|^6.0",
- "symfony/intl": "^6.2",
- "symfony/translation-contracts": "^2.5|^3.0",
- "symfony/var-exporter": "^5.4|^6.0"
+ "guzzlehttp/guzzle": "^6.5||^7.4",
+ "phpspec/prophecy-phpunit": "^2.0",
+ "phpunit/phpunit": "^9.5",
+ "psr/cache": "^1.0||^2.0",
+ "psr/http-client": "^1.0",
+ "psr/http-factory": "^1.0"
+ },
+ "suggest": {
+ "ext-sodium": "Support EdDSA (Ed25519) signatures",
+ "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
},
- "time": "2023-03-21T21:06:29+00:00",
+ "time": "2023-10-05T00:24:42+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
- "files": [
- "Resources/functions.php"
- ],
"psr-4": {
- "Symfony\\Component\\String\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
+ "Firebase\\JWT\\": "src"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "BSD-3-Clause"
],
"authors": [
{
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
+ "name": "Neuman Vong",
+ "email": "neuman+pear@twilio.com",
+ "role": "Developer"
},
{
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
+ "name": "Anant Narayanan",
+ "email": "anant@php.net",
+ "role": "Developer"
}
],
- "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
- "homepage": "https://symfony.com",
+ "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
+ "homepage": "https://github.com/firebase/php-jwt",
"keywords": [
- "grapheme",
- "i18n",
- "string",
- "unicode",
- "utf-8",
- "utf8"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
+ "jwt",
+ "php"
],
- "install-path": "../symfony/string"
+ "support": {
+ "issues": "https://github.com/firebase/php-jwt/issues",
+ "source": "https://github.com/firebase/php-jwt/tree/v6.9.0"
+ },
+ "install-path": "../firebase/php-jwt"
},
{
"name": "udx/lib-settings",
@@ -1464,8 +273,7 @@
},
"dist": {
"type": "zip",
- "url": "https://github.com/udx/lib-settings/archive/0.3.0.zip",
- "reference": "0.3.0"
+ "url": "https://github.com/udx/lib-settings/archive/0.3.0.zip"
},
"require": {
"udx/lib-utility": "~0.3"
@@ -1534,8 +342,7 @@
},
"dist": {
"type": "zip",
- "url": "https://github.com/udx/lib-ud-api-client/archive/1.2.1.zip",
- "reference": "1.2.1"
+ "url": "https://github.com/udx/lib-ud-api-client/archive/1.2.1.zip"
},
"require": {
"php": ">=5.3"
@@ -1581,8 +388,7 @@
},
"dist": {
"type": "zip",
- "url": "https://github.com/udx/lib-utility/archive/0.4.0.zip",
- "reference": "0.4.0"
+ "url": "https://github.com/udx/lib-utility/archive/0.4.0.zip"
},
"require-dev": {
"phpunit/phpunit": "4.1.*"
@@ -1644,8 +450,7 @@
},
"dist": {
"type": "zip",
- "url": "https://github.com/udx/lib-wp-bootstrap/archive/1.3.0.zip",
- "reference": "1.3.0"
+ "url": "https://github.com/udx/lib-wp-bootstrap/archive/1.3.0.zip"
},
"require": {
"php": ">=5.3",
@@ -1673,22 +478,27 @@
},
{
"name": "wpmetabox/meta-box",
- "version": "5.6.3",
- "version_normalized": "5.6.3.0",
+ "version": "5.8.2",
+ "version_normalized": "5.8.2.0",
"source": {
"type": "git",
"url": "https://github.com/wpmetabox/meta-box.git",
- "reference": "c2c4a30ed70163dfdfe93f2865e88a7a45c46856"
+ "reference": "de583a74171bdee1b5213232a5bf50f82c6fee14"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/wpmetabox/meta-box/zipball/c2c4a30ed70163dfdfe93f2865e88a7a45c46856",
- "reference": "c2c4a30ed70163dfdfe93f2865e88a7a45c46856",
+ "url": "https://api.github.com/repos/wpmetabox/meta-box/zipball/de583a74171bdee1b5213232a5bf50f82c6fee14",
+ "reference": "de583a74171bdee1b5213232a5bf50f82c6fee14",
"shasum": ""
},
- "time": "2022-04-18T03:20:58+00:00",
+ "time": "2023-10-13T13:53:33+00:00",
"type": "wordpress-plugin",
"installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "MetaBox\\": "src/"
+ }
+ },
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0"
@@ -1712,26 +522,13 @@
"wordpress-plugin",
"wp-admin"
],
+ "support": {
+ "issues": "https://github.com/wpmetabox/meta-box/issues",
+ "source": "https://github.com/wpmetabox/meta-box/tree/5.8.2"
+ },
"install-path": "../wpmetabox/meta-box"
}
],
- "dev": true,
- "dev-package-names": [
- "coenjacobs/mozart",
- "deliciousbrains/wp-background-processing",
- "league/flysystem",
- "league/mime-type-detection",
- "psr/container",
- "symfony/console",
- "symfony/deprecation-contracts",
- "symfony/finder",
- "symfony/polyfill-ctype",
- "symfony/polyfill-intl-grapheme",
- "symfony/polyfill-intl-normalizer",
- "symfony/polyfill-mbstring",
- "symfony/polyfill-php73",
- "symfony/polyfill-php80",
- "symfony/service-contracts",
- "symfony/string"
- ]
+ "dev": false,
+ "dev-package-names": []
}
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index 301196736..896b9976c 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -1,13 +1,13 @@
array(
'name' => 'wpcloud/wp-stateless',
- 'pretty_version' => 'dev-latest',
- 'version' => 'dev-latest',
- 'reference' => '642420f5fd4f9c33c4e07bc1de46107e7d2108ad',
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => '6526bd59264ab37e0336fb0abf27eea93eaa73ab',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
- 'dev' => true,
+ 'dev' => false,
),
'versions' => array(
'ccampbell/chromephp' => array(
@@ -19,15 +19,6 @@
'aliases' => array(),
'dev_requirement' => false,
),
- 'coenjacobs/mozart' => array(
- 'pretty_version' => '0.7.1',
- 'version' => '0.7.1.0',
- 'reference' => 'dbcdeb992d20d9c8914eef090f9a0d684bb1102c',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../coenjacobs/mozart',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
'composer/installers' => array(
'pretty_version' => 'v1.12.0',
'version' => '1.12.0.0',
@@ -37,57 +28,15 @@
'aliases' => array(),
'dev_requirement' => false,
),
- 'deliciousbrains/wp-background-processing' => array(
- 'pretty_version' => '1.1.0',
- 'version' => '1.1.0.0',
- 'reference' => 'd5ef95cecba7f792ddca3e3bd70ebfb90dc4996d',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../deliciousbrains/wp-background-processing',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
'firebase/php-jwt' => array(
- 'pretty_version' => 'v6.6.0',
- 'version' => '6.6.0.0',
- 'reference' => '5a9cf79b4a2eb347230384648cc7b0d68cd97faa',
+ 'pretty_version' => 'v6.9.0',
+ 'version' => '6.9.0.0',
+ 'reference' => 'f03270e63eaccf3019ef0f32849c497385774e11',
'type' => 'library',
'install_path' => __DIR__ . '/../firebase/php-jwt',
'aliases' => array(),
'dev_requirement' => false,
),
- 'league/flysystem' => array(
- 'pretty_version' => '1.1.10',
- 'version' => '1.1.10.0',
- 'reference' => '3239285c825c152bcc315fe0e87d6b55f5972ed1',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../league/flysystem',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'league/mime-type-detection' => array(
- 'pretty_version' => '1.11.0',
- 'version' => '1.11.0.0',
- 'reference' => 'ff6248ea87a9f116e78edd6002e39e5128a0d4dd',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../league/mime-type-detection',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'psr/container' => array(
- 'pretty_version' => '2.0.2',
- 'version' => '2.0.2.0',
- 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../psr/container',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'psr/log-implementation' => array(
- 'dev_requirement' => true,
- 'provided' => array(
- 0 => '1.0|2.0',
- ),
- ),
'roundcube/plugin-installer' => array(
'dev_requirement' => false,
'replaced' => array(
@@ -100,105 +49,6 @@
0 => '*',
),
),
- 'symfony/console' => array(
- 'pretty_version' => 'v5.4.24',
- 'version' => '5.4.24.0',
- 'reference' => '560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../symfony/console',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'symfony/deprecation-contracts' => array(
- 'pretty_version' => 'v3.3.0',
- 'version' => '3.3.0.0',
- 'reference' => '7c3aff79d10325257a001fcf92d991f24fc967cf',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'symfony/finder' => array(
- 'pretty_version' => 'v5.4.21',
- 'version' => '5.4.21.0',
- 'reference' => '078e9a5e1871fcfe6a5ce421b539344c21afef19',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../symfony/finder',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'symfony/polyfill-ctype' => array(
- 'pretty_version' => 'v1.27.0',
- 'version' => '1.27.0.0',
- 'reference' => '5bbc823adecdae860bb64756d639ecfec17b050a',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'symfony/polyfill-intl-grapheme' => array(
- 'pretty_version' => 'v1.27.0',
- 'version' => '1.27.0.0',
- 'reference' => '511a08c03c1960e08a883f4cffcacd219b758354',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'symfony/polyfill-intl-normalizer' => array(
- 'pretty_version' => 'v1.27.0',
- 'version' => '1.27.0.0',
- 'reference' => '19bd1e4fcd5b91116f14d8533c57831ed00571b6',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'symfony/polyfill-mbstring' => array(
- 'pretty_version' => 'v1.27.0',
- 'version' => '1.27.0.0',
- 'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'symfony/polyfill-php73' => array(
- 'pretty_version' => 'v1.27.0',
- 'version' => '1.27.0.0',
- 'reference' => '9e8ecb5f92152187c4799efd3c96b78ccab18ff9',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../symfony/polyfill-php73',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'symfony/polyfill-php80' => array(
- 'pretty_version' => 'v1.27.0',
- 'version' => '1.27.0.0',
- 'reference' => '7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../symfony/polyfill-php80',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'symfony/service-contracts' => array(
- 'pretty_version' => 'v3.3.0',
- 'version' => '3.3.0.0',
- 'reference' => '40da9cc13ec349d9e4966ce18b5fbcd724ab10a4',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../symfony/service-contracts',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
- 'symfony/string' => array(
- 'pretty_version' => 'v6.3.0',
- 'version' => '6.3.0.0',
- 'reference' => 'f2e190ee75ff0f5eced645ec0be5c66fac81f51f',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../symfony/string',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
'udx/lib-settings' => array(
'pretty_version' => '0.3.0',
'version' => '0.3.0.0',
@@ -236,18 +86,18 @@
'dev_requirement' => false,
),
'wpcloud/wp-stateless' => array(
- 'pretty_version' => 'dev-latest',
- 'version' => 'dev-latest',
- 'reference' => '642420f5fd4f9c33c4e07bc1de46107e7d2108ad',
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => '6526bd59264ab37e0336fb0abf27eea93eaa73ab',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'wpmetabox/meta-box' => array(
- 'pretty_version' => '5.6.3',
- 'version' => '5.6.3.0',
- 'reference' => 'c2c4a30ed70163dfdfe93f2865e88a7a45c46856',
+ 'pretty_version' => '5.8.2',
+ 'version' => '5.8.2.0',
+ 'reference' => 'de583a74171bdee1b5213232a5bf50f82c6fee14',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../wpmetabox/meta-box',
'aliases' => array(),
diff --git a/vendor/deliciousbrains/wp-background-processing/.circleci/config.yml b/vendor/deliciousbrains/wp-background-processing/.circleci/config.yml
deleted file mode 100644
index 212e51cee..000000000
--- a/vendor/deliciousbrains/wp-background-processing/.circleci/config.yml
+++ /dev/null
@@ -1,93 +0,0 @@
-workflows:
- version: 2
- main:
- jobs:
- - php72-build
- - php73-build
- - php74-build
- - php80-build
-
-version: 2
-
-job-references:
- mysql_image: &mysql_image
- cimg/mysql:5.7
-
- setup_environment: &setup_environment
- name: "Setup Environment Variables"
- command: |
- echo "export PATH=$HOME/.composer/vendor/bin:$PATH" >> $BASH_ENV
- source /home/circleci/.bashrc
-
- install_dependencies: &install_dependencies
- name: "Install Dependencies"
- command: |
- sudo apt-get update && sudo apt-get install mysql-client subversion
-
- php_job: &php_job
- environment:
- - WP_TESTS_DIR: "/tmp/wordpress-tests-lib"
- - WP_CORE_DIR: "/tmp/wordpress/"
- steps:
- - checkout
- - run: php --version
- - run: composer --version
- - run: *setup_environment
- - run: *install_dependencies
- - run:
- name: "Run Tests"
- command: |
- rm -rf $WP_TESTS_DIR $WP_CORE_DIR
- bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
- make test-unit
- WP_MULTISITE=1 make test-unit
- make test-style
-
-jobs:
- php56-build:
- <<: *php_job
- docker:
- - image: cimg/php:5.6
- - image: *mysql_image
-
- php70-build:
- <<: *php_job
- docker:
- - image: cimg/php:7.0
- - image: *mysql_image
-
- php71-build:
- <<: *php_job
- docker:
- - image: cimg/php:7.1
- - image: *mysql_image
-
- php72-build:
- <<: *php_job
- docker:
- - image: cimg/php:7.2
- - image: *mysql_image
-
- php73-build:
- <<: *php_job
- docker:
- - image: cimg/php:7.3
- - image: *mysql_image
-
- php74-build:
- <<: *php_job
- docker:
- - image: cimg/php:7.4
- - image: *mysql_image
-
- php80-build:
- <<: *php_job
- docker:
- - image: cimg/php:8.0
- - image: *mysql_image
-
- php81-build:
- <<: *php_job
- docker:
- - image: cimg/php:8.1
- - image: *mysql_image
diff --git a/vendor/deliciousbrains/wp-background-processing/.gitignore b/vendor/deliciousbrains/wp-background-processing/.gitignore
deleted file mode 100644
index 23505a971..000000000
--- a/vendor/deliciousbrains/wp-background-processing/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/vendor/
-/.idea
-*.cache
diff --git a/vendor/deliciousbrains/wp-background-processing/.phpcs.xml b/vendor/deliciousbrains/wp-background-processing/.phpcs.xml
deleted file mode 100644
index c082481f4..000000000
--- a/vendor/deliciousbrains/wp-background-processing/.phpcs.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
- Generally-applicable sniffs for WordPress plugins.
-
-
- .
- /vendor/
- /node_modules/
- /tests/*
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/deliciousbrains/wp-background-processing/Makefile b/vendor/deliciousbrains/wp-background-processing/Makefile
deleted file mode 100644
index 7ad63b81d..000000000
--- a/vendor/deliciousbrains/wp-background-processing/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-.PHONY: test
-test: test-unit test-style
-
-.PHONY: test-unit
-test-unit: vendor
- vendor/bin/phpunit
-
-.PHONY: test-style
-test-style: vendor
- vendor/bin/phpcs
-
-vendor: composer.json
- composer install --ignore-platform-reqs
-
-.PHONY: clean
-clean:
- rm -rf vendor
- rm -f tests/.phpunit.result.cache
diff --git a/vendor/deliciousbrains/wp-background-processing/README.md b/vendor/deliciousbrains/wp-background-processing/README.md
deleted file mode 100644
index 923e129d9..000000000
--- a/vendor/deliciousbrains/wp-background-processing/README.md
+++ /dev/null
@@ -1,376 +0,0 @@
-# WP Background Processing
-
-WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks. Check out the [example plugin](https://github.com/A5hleyRich/wp-background-processing-example) or read the [accompanying article](https://deliciousbrains.com/background-processing-wordpress/).
-
-Inspired by [TechCrunch WP Asynchronous Tasks](https://github.com/techcrunch/wp-async-task).
-
-__Requires PHP 5.6+__
-
-## Install
-
-The recommended way to install this library in your project is by loading it through Composer:
-
-```shell
-composer require deliciousbrains/wp-background-processing
-```
-
-It is highly recommended to prefix wrap the library class files using [the Mozart package](https://packagist.org/packages/coenjacobs/mozart), to prevent collisions with other projects using this same library.
-
-## Usage
-
-### Async Request
-
-Async requests are useful for pushing slow one-off tasks such as sending emails to a background process. Once the request has been dispatched it will process in the background instantly.
-
-Extend the `WP_Async_Request` class:
-
-```php
-class WP_Example_Request extends WP_Async_Request {
-
- /**
- * @var string
- */
- protected $prefix = 'my_plugin';
-
- /**
- * @var string
- */
- protected $action = 'example_request';
-
- /**
- * Handle a dispatched request.
- *
- * Override this method to perform any actions required
- * during the async request.
- */
- protected function handle() {
- // Actions to perform.
- }
-
-}
-```
-
-#### `protected $prefix`
-
-Should be set to a unique prefix associated with your plugin, theme, or site's custom function prefix.
-
-#### `protected $action`
-
-Should be set to a unique name.
-
-#### `protected function handle()`
-
-Should contain any logic to perform during the non-blocking request. The data passed to the request will be accessible via `$_POST`.
-
-#### Dispatching Requests
-
-Instantiate your request:
-
-```php
-$this->example_request = new WP_Example_Request();
-```
-
-Add data to the request if required:
-
-```php
-$this->example_request->data( array( 'value1' => $value1, 'value2' => $value2 ) );
-```
-
-Fire off the request:
-
-```php
-$this->example_request->dispatch();
-```
-
-Chaining is also supported:
-
-```php
-$this->example_request->data( array( 'data' => $data ) )->dispatch();
-```
-
-### Background Process
-
-Background processes work in a similar fashion to async requests, but they allow you to queue tasks. Items pushed onto the queue will be processed in the background once the queue has been saved and dispatched. Queues will also scale based on available server resources, so higher end servers will process more items per batch. Once a batch has completed, the next batch will start instantly.
-
-Health checks run by default every 5 minutes to ensure the queue is running when queued items exist. If the queue has failed it will be restarted.
-
-Queues work on a first in first out basis, which allows additional items to be pushed to the queue even if it’s already processing. Saving a new batch of queued items and dispatching while another background processing instance is already running will result in the dispatch shortcutting out and the existing instance eventually picking up the new items and processing them when it is their turn.
-
-Extend the `WP_Background_Process` class:
-
-```php
-class WP_Example_Process extends WP_Background_Process {
-
- /**
- * @var string
- */
- protected $prefix = 'my_plugin';
-
- /**
- * @var string
- */
- protected $action = 'example_process';
-
- /**
- * Perform task with queued item.
- *
- * Override this method to perform any actions required on each
- * queue item. Return the modified item for further processing
- * in the next pass through. Or, return false to remove the
- * item from the queue.
- *
- * @param mixed $item Queue item to iterate over.
- *
- * @return mixed
- */
- protected function task( $item ) {
- // Actions to perform.
-
- return false;
- }
-
- /**
- * Complete processing.
- *
- * Override if applicable, but ensure that the below actions are
- * performed, or, call parent::complete().
- */
- protected function complete() {
- parent::complete();
-
- // Show notice to user or perform some other arbitrary task...
- }
-
-}
-```
-
-#### `protected $prefix`
-
-Should be set to a unique prefix associated with your plugin, theme, or site's custom function prefix.
-
-#### `protected $action`
-
-Should be set to a unique name.
-
-#### `protected function task( $item )`
-
-Should contain any logic to perform on the queued item. Return `false` to remove the item from the queue or return `$item` to push it back onto the queue for further processing. If the item has been modified and is pushed back onto the queue the current state will be saved before the batch is exited.
-
-#### `protected function complete()`
-
-Optionally contain any logic to perform once the queue has completed.
-
-#### Dispatching Processes
-
-Instantiate your process:
-
-```php
-$this->example_process = new WP_Example_Process();
-```
-
-**Note:** You must instantiate your process unconditionally. All requests should do this, even if nothing is pushed to the queue.
-
-Push items to the queue:
-
-```php
-foreach ( $items as $item ) {
- $this->example_process->push_to_queue( $item );
-}
-```
-
-Save and dispatch the queue:
-
-```php
-$this->example_process->save()->dispatch();
-```
-
-#### Background Process Status
-
-A background process can be queued, processing, paused, cancelled, or none of the above (not started or has completed).
-
-##### Queued
-
-To check whether a background process has queued items use `is_queued()`.
-
-```php
-if ( $this->example_process->is_queued() ) {
- // Do something because background process has queued items, e.g. add notice in admin UI.
-}
-```
-
-##### Processing
-
-To check whether a background process is currently handling a queue of items use `is_processing()`.
-
-```php
-if ( $this->example_process->is_processing() ) {
- // Do something because background process is running, e.g. add notice in admin UI.
-}
-```
-
-##### Paused
-
-You can pause a background process with `pause()`.
-
-```php
-$this->example_process->pause();
-```
-
-The currently processing batch will continue until it either completes or reaches the time or memory limit. At that point it'll unlock the process and either complete the batch if the queue is empty, or perform a dispatch that will result in the handler removing the healthcheck cron and firing a "paused" action.
-
-To check whether a background process is currently paused use `is_paused()`.
-
-```php
-if ( $this->example_process->is_paused() ) {
- // Do something because background process is paused, e.g. add notice in admin UI.
-}
-```
-
-You can perform an action in response to background processing being paused by handling the "paused" action for the background process's identifier ($prefix + $action).
-
-```php
-add_action( 'my_plugin_example_process_paused', function() {
- // Do something because background process is paused, e.g. add notice in admin UI.
-});
-```
-
-You can resume a background process with `resume()`.
-
-```php
-$this->example_process->resume();
-```
-
-You can perform an action in response to background processing being resumed by handling the "resumed" action for the background process's identifier ($prefix + $action).
-
-```php
-add_action( 'my_plugin_example_process_resumed', function() {
- // Do something because background process is resumed, e.g. add notice in admin UI.
-});
-```
-
-##### Cancelled
-
-You can cancel a background process with `cancel()`.
-
-```php
-$this->example_process->cancel();
-```
-
-The currently processing batch will continue until it either completes or reaches the time or memory limit. At that point it'll unlock the process and either complete the batch if the queue is empty, or perform a dispatch that will result in the handler removing the healthcheck cron, deleting all batches of queued items and firing a "cancelled" action.
-
-To check whether a background process is currently cancelled use `is_cancelled()`.
-
-```php
-if ( $this->example_process->is_cancelled() ) {
- // Do something because background process is cancelled, e.g. add notice in admin UI.
-}
-```
-
-You can perform an action in response to background processing being cancelled by handling the "cancelled" action for the background process's identifier ($prefix + $action).
-
-```php
-add_action( 'my_plugin_example_process_cancelled', function() {
- // Do something because background process is paused, e.g. add notice in admin UI.
-});
-```
-
-The "cancelled" action fires once the queue has been cleared down and cancelled status removed. After which `is_cancelled()` will no longer be true as the background process is now dormant.
-
-##### Active
-
-To check whether a background process has queued items, is processing, is paused, or is cancelling, use `is_active()`.
-
-```php
-if ( $this->example_process->is_active() ) {
- // Do something because background process is active, e.g. add notice in admin UI.
-}
-```
-
-If a background process is not active, then it either has not had anything queued yet and not started, or has finished processing all queued items.
-
-### BasicAuth
-
-If your site is behind BasicAuth, both async requests and background processes will fail to complete. This is because WP Background Processing relies on the [WordPress HTTP API](https://developer.wordpress.org/plugins/http-api/), which requires you to attach your BasicAuth credentials to requests. The easiest way to do this is using the following filter:
-
-```php
-function wpbp_http_request_args( $r, $url ) {
- $r['headers']['Authorization'] = 'Basic ' . base64_encode( USERNAME . ':' . PASSWORD );
-
- return $r;
-}
-add_filter( 'http_request_args', 'wpbp_http_request_args', 10, 2);
-```
-
-## Contributing
-
-Contributions are welcome via Pull Requests, but please do raise an issue before
-working on anything to discuss the change if there isn't already an issue. If there
-is an approved issue you'd like to tackle, please post a comment on it to let people know
-you're going to have a go at it so that effort isn't wasted through duplicated work.
-
-### Unit & Style Tests
-
-When working on the library, please add unit tests to the appropriate file in the
-`tests` directory that cover your changes.
-
-#### Setting Up
-
-We use the standard WordPress test libraries for running unit tests.
-
-Please run the following command to set up the libraries:
-
-```shell
-bin/install-wp-tests.sh db_name db_user db_pass
-```
-
-Substitute `db_name`, `db_user` and `db_pass` as appropriate.
-
-Please be aware that running the unit tests is a **destructive operation**, *database
-tables will be cleared*, so please use a database name dedicated to running unit tests.
-The standard database name usually used by the WordPress community is `wordpress_test`, e.g.
-
-```shell
-bin/install-wp-tests.sh wordpress_test root root
-```
-
-Please refer to the [Initialize the testing environment locally](https://make.wordpress.org/cli/handbook/misc/plugin-unit-tests/#3-initialize-the-testing-environment-locally)
-section of the WordPress Handbook's [Plugin Integration Tests](https://make.wordpress.org/cli/handbook/misc/plugin-unit-tests/)
-entry should you run into any issues.
-
-#### Running Unit Tests
-
-To run the unit tests, simply run:
-
-```shell
-make test-unit
-```
-
-If the `composer` dependencies aren't in place, they'll be automatically installed first.
-
-#### Running Style Tests
-
-It's important that the code in the library use a consistent style to aid in quickly
-understanding it, and to avoid some common issues. `PHP_Code_Sniffer` is used with
-mostly standard WordPress rules to help check for consistency.
-
-To run the style tests, simply run:
-
-```shell
-make test-style
-```
-
-If the `composer` dependencies aren't in place, they'll be automatically installed first.
-
-#### Running All Tests
-
-To make things super simple, just run the following to run all tests:
-
-```shell
-make
-```
-
-If the `composer` dependencies aren't in place, they'll be automatically installed first.
-
-## License
-
-[GPLv2+](http://www.gnu.org/licenses/gpl-2.0.html)
diff --git a/vendor/deliciousbrains/wp-background-processing/bin/install-wp-tests.sh b/vendor/deliciousbrains/wp-background-processing/bin/install-wp-tests.sh
deleted file mode 100755
index ee05775c8..000000000
--- a/vendor/deliciousbrains/wp-background-processing/bin/install-wp-tests.sh
+++ /dev/null
@@ -1,181 +0,0 @@
-#!/usr/bin/env bash
-
-if [ $# -lt 3 ]; then
- echo "usage: $0 [db-host] [wp-version] [skip-database-creation]"
- exit 1
-fi
-
-DB_NAME=$1
-DB_USER=$2
-DB_PASS=$3
-DB_HOST=${4-localhost}
-WP_VERSION=${5-latest}
-SKIP_DB_CREATE=${6-false}
-
-TMPDIR=${TMPDIR-/tmp}
-TMPDIR=$(echo $TMPDIR | sed -e "s/\/$//")
-WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR/wordpress-tests-lib}
-WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress}
-
-download() {
- if [ `which curl` ]; then
- curl -s "$1" > "$2";
- elif [ `which wget` ]; then
- wget -nv -O "$2" "$1"
- fi
-}
-
-if [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+\-(beta|RC)[0-9]+$ ]]; then
- WP_BRANCH=${WP_VERSION%\-*}
- WP_TESTS_TAG="branches/$WP_BRANCH"
-
-elif [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then
- WP_TESTS_TAG="branches/$WP_VERSION"
-elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
- if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then
- # version x.x.0 means the first release of the major version, so strip off the .0 and download version x.x
- WP_TESTS_TAG="tags/${WP_VERSION%??}"
- else
- WP_TESTS_TAG="tags/$WP_VERSION"
- fi
-elif [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
- WP_TESTS_TAG="trunk"
-else
- # http serves a single offer, whereas https serves multiple. we only want one
- download http://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json
- grep '[0-9]+\.[0-9]+(\.[0-9]+)?' /tmp/wp-latest.json
- LATEST_VERSION=$(grep -o '"version":"[^"]*' /tmp/wp-latest.json | sed 's/"version":"//')
- if [[ -z "$LATEST_VERSION" ]]; then
- echo "Latest WordPress version could not be found"
- exit 1
- fi
- WP_TESTS_TAG="tags/$LATEST_VERSION"
-fi
-set -ex
-
-install_wp() {
-
- if [ -d $WP_CORE_DIR ]; then
- return;
- fi
-
- mkdir -p $WP_CORE_DIR
-
- if [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
- mkdir -p $TMPDIR/wordpress-trunk
- rm -rf $TMPDIR/wordpress-trunk/*
- svn export --quiet https://core.svn.wordpress.org/trunk $TMPDIR/wordpress-trunk/wordpress
- mv $TMPDIR/wordpress-trunk/wordpress/* $WP_CORE_DIR
- else
- if [ $WP_VERSION == 'latest' ]; then
- local ARCHIVE_NAME='latest'
- elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+ ]]; then
- # https serves multiple offers, whereas http serves single.
- download https://api.wordpress.org/core/version-check/1.7/ $TMPDIR/wp-latest.json
- if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then
- # version x.x.0 means the first release of the major version, so strip off the .0 and download version x.x
- LATEST_VERSION=${WP_VERSION%??}
- else
- # otherwise, scan the releases and get the most up to date minor version of the major release
- local VERSION_ESCAPED=`echo $WP_VERSION | sed 's/\./\\\\./g'`
- LATEST_VERSION=$(grep -o '"version":"'$VERSION_ESCAPED'[^"]*' $TMPDIR/wp-latest.json | sed 's/"version":"//' | head -1)
- fi
- if [[ -z "$LATEST_VERSION" ]]; then
- local ARCHIVE_NAME="wordpress-$WP_VERSION"
- else
- local ARCHIVE_NAME="wordpress-$LATEST_VERSION"
- fi
- else
- local ARCHIVE_NAME="wordpress-$WP_VERSION"
- fi
- download https://wordpress.org/${ARCHIVE_NAME}.tar.gz $TMPDIR/wordpress.tar.gz
- tar --strip-components=1 -zxmf $TMPDIR/wordpress.tar.gz -C $WP_CORE_DIR
- fi
-
- download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php
-}
-
-install_test_suite() {
- # portable in-place argument for both GNU sed and Mac OSX sed
- if [[ $(uname -s) == 'Darwin' ]]; then
- local ioption='-i.bak'
- else
- local ioption='-i'
- fi
-
- # set up testing suite if it doesn't yet exist
- if [ ! -d $WP_TESTS_DIR ]; then
- # set up testing suite
- mkdir -p $WP_TESTS_DIR
- rm -rf $WP_TESTS_DIR/{includes,data}
- svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
- svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data
- fi
-
- if [ ! -f wp-tests-config.php ]; then
- download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php
- # remove all forward slashes in the end
- WP_CORE_DIR=$(echo $WP_CORE_DIR | sed "s:/\+$::")
- sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php
- sed $ioption "s:__DIR__ . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php
- sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php
- sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php
- sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php
- sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php
- fi
-
-}
-
-recreate_db() {
- shopt -s nocasematch
- if [[ $1 =~ ^(y|yes)$ ]]
- then
- mysqladmin drop $DB_NAME -f --user="$DB_USER" --password="$DB_PASS"$EXTRA
- create_db
- echo "Recreated the database ($DB_NAME)."
- else
- echo "Leaving the existing database ($DB_NAME) in place."
- fi
- shopt -u nocasematch
-}
-
-create_db() {
- mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"$EXTRA
-}
-
-install_db() {
-
- if [ ${SKIP_DB_CREATE} = "true" ]; then
- return 0
- fi
-
- # parse DB_HOST for port or socket references
- local PARTS=(${DB_HOST//\:/ })
- local DB_HOSTNAME=${PARTS[0]};
- local DB_SOCK_OR_PORT=${PARTS[1]};
- local EXTRA=""
-
- if ! [ -z $DB_HOSTNAME ] ; then
- if [ $(echo $DB_SOCK_OR_PORT | grep -e '^[0-9]\{1,\}$') ]; then
- EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp"
- elif ! [ -z $DB_SOCK_OR_PORT ] ; then
- EXTRA=" --socket=$DB_SOCK_OR_PORT"
- elif ! [ -z $DB_HOSTNAME ] ; then
- EXTRA=" --host=$DB_HOSTNAME --protocol=tcp"
- fi
- fi
-
- # create database
- if [ $(mysql --user="$DB_USER" --password="$DB_PASS"$EXTRA --execute='show databases;' | grep ^$DB_NAME$) ]
- then
- echo "Reinstalling will delete the existing test database ($DB_NAME)"
- read -p 'Are you sure you want to proceed? [y/N]: ' DELETE_EXISTING_DB
- recreate_db $DELETE_EXISTING_DB
- else
- create_db
- fi
-}
-
-install_wp
-install_test_suite
-install_db
diff --git a/vendor/deliciousbrains/wp-background-processing/classes/wp-async-request.php b/vendor/deliciousbrains/wp-background-processing/classes/wp-async-request.php
deleted file mode 100644
index 9759ab091..000000000
--- a/vendor/deliciousbrains/wp-background-processing/classes/wp-async-request.php
+++ /dev/null
@@ -1,202 +0,0 @@
-identifier = $this->prefix . '_' . $this->action;
-
- add_action( 'wp_ajax_' . $this->identifier, array( $this, 'maybe_handle' ) );
- add_action( 'wp_ajax_nopriv_' . $this->identifier, array( $this, 'maybe_handle' ) );
- }
-
- /**
- * Set data used during the request.
- *
- * @param array $data Data.
- *
- * @return $this
- */
- public function data( $data ) {
- $this->data = $data;
-
- return $this;
- }
-
- /**
- * Dispatch the async request.
- *
- * @return array|WP_Error|false HTTP Response array, WP_Error on failure, or false if not attempted.
- */
- public function dispatch() {
- $url = add_query_arg( $this->get_query_args(), $this->get_query_url() );
- $args = $this->get_post_args();
-
- return wp_remote_post( esc_url_raw( $url ), $args );
- }
-
- /**
- * Get query args.
- *
- * @return array
- */
- protected function get_query_args() {
- if ( property_exists( $this, 'query_args' ) ) {
- return $this->query_args;
- }
-
- $args = array(
- 'action' => $this->identifier,
- 'nonce' => wp_create_nonce( $this->identifier ),
- );
-
- /**
- * Filters the post arguments used during an async request.
- *
- * @param array $url
- */
- return apply_filters( $this->identifier . '_query_args', $args );
- }
-
- /**
- * Get query URL.
- *
- * @return string
- */
- protected function get_query_url() {
- if ( property_exists( $this, 'query_url' ) ) {
- return $this->query_url;
- }
-
- $url = admin_url( 'admin-ajax.php' );
-
- /**
- * Filters the post arguments used during an async request.
- *
- * @param string $url
- */
- return apply_filters( $this->identifier . '_query_url', $url );
- }
-
- /**
- * Get post args.
- *
- * @return array
- */
- protected function get_post_args() {
- if ( property_exists( $this, 'post_args' ) ) {
- return $this->post_args;
- }
-
- $args = array(
- 'timeout' => 0.01,
- 'blocking' => false,
- 'body' => $this->data,
- 'cookies' => $_COOKIE, // Passing cookies ensures request is performed as initiating user.
- 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), // Local requests, fine to pass false.
- );
-
- /**
- * Filters the post arguments used during an async request.
- *
- * @param array $args
- */
- return apply_filters( $this->identifier . '_post_args', $args );
- }
-
- /**
- * Maybe handle a dispatched request.
- *
- * Check for correct nonce and pass to handler.
- *
- * @return void|mixed
- */
- public function maybe_handle() {
- // Don't lock up other requests while processing.
- session_write_close();
-
- check_ajax_referer( $this->identifier, 'nonce' );
-
- $this->handle();
-
- return $this->maybe_wp_die();
- }
-
- /**
- * Should the process exit with wp_die?
- *
- * @param mixed $return What to return if filter says don't die, default is null.
- *
- * @return void|mixed
- */
- protected function maybe_wp_die( $return = null ) {
- /**
- * Should wp_die be used?
- *
- * @return bool
- */
- if ( apply_filters( $this->identifier . '_wp_die', true ) ) {
- wp_die();
- }
-
- return $return;
- }
-
- /**
- * Handle a dispatched request.
- *
- * Override this method to perform any actions required
- * during the async request.
- */
- abstract protected function handle();
-}
diff --git a/vendor/deliciousbrains/wp-background-processing/classes/wp-background-process.php b/vendor/deliciousbrains/wp-background-processing/classes/wp-background-process.php
deleted file mode 100644
index 82a8e637b..000000000
--- a/vendor/deliciousbrains/wp-background-processing/classes/wp-background-process.php
+++ /dev/null
@@ -1,733 +0,0 @@
-cron_hook_identifier = $this->identifier . '_cron';
- $this->cron_interval_identifier = $this->identifier . '_cron_interval';
-
- add_action( $this->cron_hook_identifier, array( $this, 'handle_cron_healthcheck' ) );
- add_filter( 'cron_schedules', array( $this, 'schedule_cron_healthcheck' ) );
- }
-
- /**
- * Schedule the cron healthcheck and dispatch an async request to start processing the queue.
- *
- * @access public
- * @return array|WP_Error|false HTTP Response array, WP_Error on failure, or false if not attempted.
- */
- public function dispatch() {
- if ( $this->is_processing() ) {
- // Process already running.
- return false;
- }
-
- // Schedule the cron healthcheck.
- $this->schedule_event();
-
- // Perform remote post.
- return parent::dispatch();
- }
-
- /**
- * Push to the queue.
- *
- * Note, save must be called in order to persist queued items to a batch for processing.
- *
- * @param mixed $data Data.
- *
- * @return $this
- */
- public function push_to_queue( $data ) {
- $this->data[] = $data;
-
- return $this;
- }
-
- /**
- * Save the queued items for future processing.
- *
- * @return $this
- */
- public function save() {
- $key = $this->generate_key();
-
- if ( ! empty( $this->data ) ) {
- update_site_option( $key, $this->data );
- }
-
- // Clean out data so that new data isn't prepended with closed session's data.
- $this->data = array();
-
- return $this;
- }
-
- /**
- * Update a batch's queued items.
- *
- * @param string $key Key.
- * @param array $data Data.
- *
- * @return $this
- */
- public function update( $key, $data ) {
- if ( ! empty( $data ) ) {
- update_site_option( $key, $data );
- }
-
- return $this;
- }
-
- /**
- * Delete a batch of queued items.
- *
- * @param string $key Key.
- *
- * @return $this
- */
- public function delete( $key ) {
- delete_site_option( $key );
-
- return $this;
- }
-
- /**
- * Delete entire job queue.
- */
- public function delete_all() {
- $batches = $this->get_batches();
-
- foreach ( $batches as $batch ) {
- $this->delete( $batch->key );
- }
-
- delete_site_option( $this->get_status_key() );
-
- $this->cancelled();
- }
-
- /**
- * Cancel job on next batch.
- */
- public function cancel() {
- update_site_option( $this->get_status_key(), self::STATUS_CANCELLED );
-
- // Just in case the job was paused at the time.
- $this->dispatch();
- }
-
- /**
- * Has the process been cancelled?
- *
- * @return bool
- */
- public function is_cancelled() {
- $status = get_site_option( $this->get_status_key(), 0 );
-
- if ( absint( $status ) === self::STATUS_CANCELLED ) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Called when background process has been cancelled.
- */
- protected function cancelled() {
- do_action( $this->identifier . '_cancelled' );
- }
-
- /**
- * Pause job on next batch.
- */
- public function pause() {
- update_site_option( $this->get_status_key(), self::STATUS_PAUSED );
- }
-
- /**
- * Is the job paused?
- *
- * @return bool
- */
- public function is_paused() {
- $status = get_site_option( $this->get_status_key(), 0 );
-
- if ( absint( $status ) === self::STATUS_PAUSED ) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Called when background process has been paused.
- */
- protected function paused() {
- do_action( $this->identifier . '_paused' );
- }
-
- /**
- * Resume job.
- */
- public function resume() {
- delete_site_option( $this->get_status_key() );
-
- $this->schedule_event();
- $this->dispatch();
- $this->resumed();
- }
-
- /**
- * Called when background process has been resumed.
- */
- protected function resumed() {
- do_action( $this->identifier . '_resumed' );
- }
-
- /**
- * Is queued?
- *
- * @return bool
- */
- public function is_queued() {
- return ! $this->is_queue_empty();
- }
-
- /**
- * Is the tool currently active, e.g. starting, working, paused or cleaning up?
- *
- * @return bool
- */
- public function is_active() {
- return $this->is_queued() || $this->is_processing() || $this->is_paused() || $this->is_cancelled();
- }
-
- /**
- * Generate key for a batch.
- *
- * Generates a unique key based on microtime. Queue items are
- * given a unique key so that they can be merged upon save.
- *
- * @param int $length Optional max length to trim key to, defaults to 64 characters.
- * @param string $key Optional string to append to identifier before hash, defaults to "batch".
- *
- * @return string
- */
- protected function generate_key( $length = 64, $key = 'batch' ) {
- $unique = md5( microtime() . wp_rand() );
- $prepend = $this->identifier . '_' . $key . '_';
-
- return substr( $prepend . $unique, 0, $length );
- }
-
- /**
- * Get the status key.
- *
- * @return string
- */
- protected function get_status_key() {
- return $this->identifier . '_status';
- }
-
- /**
- * Maybe process a batch of queued items.
- *
- * Checks whether data exists within the queue and that
- * the process is not already running.
- */
- public function maybe_handle() {
- // Don't lock up other requests while processing.
- session_write_close();
-
- if ( $this->is_processing() ) {
- // Background process already running.
- return $this->maybe_wp_die();
- }
-
- if ( $this->is_cancelled() ) {
- $this->clear_scheduled_event();
- $this->delete_all();
-
- return $this->maybe_wp_die();
- }
-
- if ( $this->is_paused() ) {
- $this->clear_scheduled_event();
- $this->paused();
-
- return $this->maybe_wp_die();
- }
-
- if ( $this->is_queue_empty() ) {
- // No data to process.
- return $this->maybe_wp_die();
- }
-
- check_ajax_referer( $this->identifier, 'nonce' );
-
- $this->handle();
-
- return $this->maybe_wp_die();
- }
-
- /**
- * Is queue empty?
- *
- * @return bool
- */
- protected function is_queue_empty() {
- return empty( $this->get_batch() );
- }
-
- /**
- * Is process running?
- *
- * Check whether the current process is already running
- * in a background process.
- *
- * @return bool
- *
- * @deprecated 1.1.0 Superseded.
- * @see is_processing()
- */
- protected function is_process_running() {
- return $this->is_processing();
- }
-
- /**
- * Is the background process currently running?
- *
- * @return bool
- */
- public function is_processing() {
- if ( get_site_transient( $this->identifier . '_process_lock' ) ) {
- // Process already running.
- return true;
- }
-
- return false;
- }
-
- /**
- * Lock process.
- *
- * Lock the process so that multiple instances can't run simultaneously.
- * Override if applicable, but the duration should be greater than that
- * defined in the time_exceeded() method.
- */
- protected function lock_process() {
- $this->start_time = time(); // Set start time of current process.
-
- $lock_duration = ( property_exists( $this, 'queue_lock_time' ) ) ? $this->queue_lock_time : 60; // 1 minute
- $lock_duration = apply_filters( $this->identifier . '_queue_lock_time', $lock_duration );
-
- set_site_transient( $this->identifier . '_process_lock', microtime(), $lock_duration );
- }
-
- /**
- * Unlock process.
- *
- * Unlock the process so that other instances can spawn.
- *
- * @return $this
- */
- protected function unlock_process() {
- delete_site_transient( $this->identifier . '_process_lock' );
-
- return $this;
- }
-
- /**
- * Get batch.
- *
- * @return stdClass Return the first batch of queued items.
- */
- protected function get_batch() {
- return array_reduce(
- $this->get_batches( 1 ),
- function ( $carry, $batch ) {
- return $batch;
- },
- array()
- );
- }
-
- /**
- * Get batches.
- *
- * @param int $limit Number of batches to return, defaults to all.
- *
- * @return array of stdClass
- */
- public function get_batches( $limit = 0 ) {
- global $wpdb;
-
- if ( empty( $limit ) || ! is_int( $limit ) ) {
- $limit = 0;
- }
-
- $table = $wpdb->options;
- $column = 'option_name';
- $key_column = 'option_id';
- $value_column = 'option_value';
-
- if ( is_multisite() ) {
- $table = $wpdb->sitemeta;
- $column = 'meta_key';
- $key_column = 'meta_id';
- $value_column = 'meta_value';
- }
-
- $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';
-
- $sql = '
- SELECT *
- FROM ' . $table . '
- WHERE ' . $column . ' LIKE %s
- ORDER BY ' . $key_column . ' ASC
- ';
-
- $args = array( $key );
-
- if ( ! empty( $limit ) ) {
- $sql .= ' LIMIT %d';
-
- $args[] = $limit;
- }
-
- $items = $wpdb->get_results( $wpdb->prepare( $sql, $args ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
-
- $batches = array();
-
- if ( ! empty( $items ) ) {
- $batches = array_map(
- function ( $item ) use ( $column, $value_column ) {
- $batch = new stdClass();
- $batch->key = $item->{$column};
- $batch->data = maybe_unserialize( $item->{$value_column} );
-
- return $batch;
- },
- $items
- );
- }
-
- return $batches;
- }
-
- /**
- * Handle a dispatched request.
- *
- * Pass each queue item to the task handler, while remaining
- * within server memory and time limit constraints.
- */
- protected function handle() {
- $this->lock_process();
-
- /**
- * Number of seconds to sleep between batches. Defaults to 0 seconds, minimum 0.
- *
- * @param int $seconds
- */
- $throttle_seconds = max(
- 0,
- apply_filters(
- $this->identifier . '_seconds_between_batches',
- apply_filters(
- $this->prefix . '_seconds_between_batches',
- 0
- )
- )
- );
-
- do {
- $batch = $this->get_batch();
-
- foreach ( $batch->data as $key => $value ) {
- $task = $this->task( $value );
-
- if ( false !== $task ) {
- $batch->data[ $key ] = $task;
- } else {
- unset( $batch->data[ $key ] );
- }
-
- // Keep the batch up to date while processing it.
- if ( ! empty( $batch->data ) ) {
- $this->update( $batch->key, $batch->data );
- }
-
- // Let the server breathe a little.
- sleep( $throttle_seconds );
-
- if ( $this->time_exceeded() || $this->memory_exceeded() ) {
- // Batch limits reached.
- break;
- }
- }
-
- // Delete current batch if fully processed.
- if ( empty( $batch->data ) ) {
- $this->delete( $batch->key );
- }
- } while ( ! $this->time_exceeded() && ! $this->memory_exceeded() && ! $this->is_queue_empty() );
-
- $this->unlock_process();
-
- // Start next batch or complete process.
- if ( ! $this->is_queue_empty() ) {
- $this->dispatch();
- } else {
- $this->complete();
- }
-
- return $this->maybe_wp_die();
- }
-
- /**
- * Memory exceeded?
- *
- * Ensures the batch process never exceeds 90%
- * of the maximum WordPress memory.
- *
- * @return bool
- */
- protected function memory_exceeded() {
- $memory_limit = $this->get_memory_limit() * 0.9; // 90% of max memory
- $current_memory = memory_get_usage( true );
- $return = false;
-
- if ( $current_memory >= $memory_limit ) {
- $return = true;
- }
-
- return apply_filters( $this->identifier . '_memory_exceeded', $return );
- }
-
- /**
- * Get memory limit in bytes.
- *
- * @return int
- */
- protected function get_memory_limit() {
- if ( function_exists( 'ini_get' ) ) {
- $memory_limit = ini_get( 'memory_limit' );
- } else {
- // Sensible default.
- $memory_limit = '128M';
- }
-
- if ( ! $memory_limit || -1 === intval( $memory_limit ) ) {
- // Unlimited, set to 32GB.
- $memory_limit = '32000M';
- }
-
- return wp_convert_hr_to_bytes( $memory_limit );
- }
-
- /**
- * Time limit exceeded?
- *
- * Ensures the batch never exceeds a sensible time limit.
- * A timeout limit of 30s is common on shared hosting.
- *
- * @return bool
- */
- protected function time_exceeded() {
- $finish = $this->start_time + apply_filters( $this->identifier . '_default_time_limit', 20 ); // 20 seconds
- $return = false;
-
- if ( time() >= $finish ) {
- $return = true;
- }
-
- return apply_filters( $this->identifier . '_time_exceeded', $return );
- }
-
- /**
- * Complete processing.
- *
- * Override if applicable, but ensure that the below actions are
- * performed, or, call parent::complete().
- */
- protected function complete() {
- delete_site_option( $this->get_status_key() );
-
- // Remove the cron healthcheck job from the cron schedule.
- $this->clear_scheduled_event();
-
- $this->completed();
- }
-
- /**
- * Called when background process has completed.
- */
- protected function completed() {
- do_action( $this->identifier . '_completed' );
- }
-
- /**
- * Schedule the cron healthcheck job.
- *
- * @access public
- *
- * @param mixed $schedules Schedules.
- *
- * @return mixed
- */
- public function schedule_cron_healthcheck( $schedules ) {
- $interval = apply_filters( $this->cron_interval_identifier, 5 );
-
- if ( property_exists( $this, 'cron_interval' ) ) {
- $interval = apply_filters( $this->cron_interval_identifier, $this->cron_interval );
- }
-
- if ( 1 === $interval ) {
- $display = __( 'Every Minute' );
- } else {
- $display = sprintf( __( 'Every %d Minutes' ), $interval );
- }
-
- // Adds an "Every NNN Minute(s)" schedule to the existing cron schedules.
- $schedules[ $this->cron_interval_identifier ] = array(
- 'interval' => MINUTE_IN_SECONDS * $interval,
- 'display' => $display,
- );
-
- return $schedules;
- }
-
- /**
- * Handle cron healthcheck event.
- *
- * Restart the background process if not already running
- * and data exists in the queue.
- */
- public function handle_cron_healthcheck() {
- if ( $this->is_processing() ) {
- // Background process already running.
- exit;
- }
-
- if ( $this->is_queue_empty() ) {
- // No data to process.
- $this->clear_scheduled_event();
- exit;
- }
-
- $this->dispatch();
- }
-
- /**
- * Schedule the cron healthcheck event.
- */
- protected function schedule_event() {
- if ( ! wp_next_scheduled( $this->cron_hook_identifier ) ) {
- wp_schedule_event( time(), $this->cron_interval_identifier, $this->cron_hook_identifier );
- }
- }
-
- /**
- * Clear scheduled cron healthcheck event.
- */
- protected function clear_scheduled_event() {
- $timestamp = wp_next_scheduled( $this->cron_hook_identifier );
-
- if ( $timestamp ) {
- wp_unschedule_event( $timestamp, $this->cron_hook_identifier );
- }
- }
-
- /**
- * Cancel the background process.
- *
- * Stop processing queue items, clear cron job and delete batch.
- *
- * @deprecated 1.1.0 Superseded.
- * @see cancel()
- */
- public function cancel_process() {
- $this->cancel();
- }
-
- /**
- * Perform task with queued item.
- *
- * Override this method to perform any actions required on each
- * queue item. Return the modified item for further processing
- * in the next pass through. Or, return false to remove the
- * item from the queue.
- *
- * @param mixed $item Queue item to iterate over.
- *
- * @return mixed
- */
- abstract protected function task( $item );
-}
diff --git a/vendor/deliciousbrains/wp-background-processing/composer.json b/vendor/deliciousbrains/wp-background-processing/composer.json
deleted file mode 100644
index 5f65733f8..000000000
--- a/vendor/deliciousbrains/wp-background-processing/composer.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "deliciousbrains/wp-background-processing",
- "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.",
- "type": "library",
- "require": {
- "php": ">=5.6"
- },
- "suggest": {
- "coenjacobs/mozart": "Easily wrap this library with your own prefix, to prevent collisions when multiple plugins use this library"
- },
- "license": "GPL-2.0-or-later",
- "authors": [
- {
- "name": "Delicious Brains",
- "email": "nom@deliciousbrains.com"
- }
- ],
- "autoload": {
- "classmap": [
- "classes/"
- ]
- },
- "require-dev": {
- "phpunit/phpunit": "^8.0",
- "yoast/phpunit-polyfills": "^1.0",
- "spryker/code-sniffer": "^0.17.18",
- "phpcompatibility/phpcompatibility-wp": "*",
- "wp-coding-standards/wpcs": "^2.3"
- },
- "config": {
- "allow-plugins": {
- "dealerdirect/phpcodesniffer-composer-installer": true
- }
- }
-}
diff --git a/vendor/deliciousbrains/wp-background-processing/composer.lock b/vendor/deliciousbrains/wp-background-processing/composer.lock
deleted file mode 100644
index 3674cd539..000000000
--- a/vendor/deliciousbrains/wp-background-processing/composer.lock
+++ /dev/null
@@ -1,2022 +0,0 @@
-{
- "_readme": [
- "This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
- "This file is @generated automatically"
- ],
- "content-hash": "a9e05db155afa8fde60a18a19cc4f591",
- "packages": [],
- "packages-dev": [
- {
- "name": "dealerdirect/phpcodesniffer-composer-installer",
- "version": "v1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/PHPCSStandards/composer-installer.git",
- "reference": "4be43904336affa5c2f70744a348312336afd0da"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da",
- "reference": "4be43904336affa5c2f70744a348312336afd0da",
- "shasum": ""
- },
- "require": {
- "composer-plugin-api": "^1.0 || ^2.0",
- "php": ">=5.4",
- "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0"
- },
- "require-dev": {
- "composer/composer": "*",
- "ext-json": "*",
- "ext-zip": "*",
- "php-parallel-lint/php-parallel-lint": "^1.3.1",
- "phpcompatibility/php-compatibility": "^9.0",
- "yoast/phpunit-polyfills": "^1.0"
- },
- "type": "composer-plugin",
- "extra": {
- "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
- },
- "autoload": {
- "psr-4": {
- "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Franck Nijhof",
- "email": "franck.nijhof@dealerdirect.com",
- "homepage": "http://www.frenck.nl",
- "role": "Developer / IT Manager"
- },
- {
- "name": "Contributors",
- "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors"
- }
- ],
- "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
- "homepage": "http://www.dealerdirect.com",
- "keywords": [
- "PHPCodeSniffer",
- "PHP_CodeSniffer",
- "code quality",
- "codesniffer",
- "composer",
- "installer",
- "phpcbf",
- "phpcs",
- "plugin",
- "qa",
- "quality",
- "standard",
- "standards",
- "style guide",
- "stylecheck",
- "tests"
- ],
- "support": {
- "issues": "https://github.com/PHPCSStandards/composer-installer/issues",
- "source": "https://github.com/PHPCSStandards/composer-installer"
- },
- "time": "2023-01-05T11:28:13+00:00"
- },
- {
- "name": "doctrine/instantiator",
- "version": "1.5.0",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/instantiator.git",
- "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
- "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
- "shasum": ""
- },
- "require": {
- "php": "^7.1 || ^8.0"
- },
- "require-dev": {
- "doctrine/coding-standard": "^9 || ^11",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpbench/phpbench": "^0.16 || ^1",
- "phpstan/phpstan": "^1.4",
- "phpstan/phpstan-phpunit": "^1",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "vimeo/psalm": "^4.30 || ^5.4"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com",
- "homepage": "https://ocramius.github.io/"
- }
- ],
- "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
- "keywords": [
- "constructor",
- "instantiate"
- ],
- "support": {
- "issues": "https://github.com/doctrine/instantiator/issues",
- "source": "https://github.com/doctrine/instantiator/tree/1.5.0"
- },
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
- "type": "tidelift"
- }
- ],
- "time": "2022-12-30T00:15:36+00:00"
- },
- {
- "name": "myclabs/deep-copy",
- "version": "1.11.1",
- "source": {
- "type": "git",
- "url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
- "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
- "shasum": ""
- },
- "require": {
- "php": "^7.1 || ^8.0"
- },
- "conflict": {
- "doctrine/collections": "<1.6.8",
- "doctrine/common": "<2.13.3 || >=3,<3.2.2"
- },
- "require-dev": {
- "doctrine/collections": "^1.6.8",
- "doctrine/common": "^2.13.3 || ^3.2.2",
- "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
- },
- "type": "library",
- "autoload": {
- "files": [
- "src/DeepCopy/deep_copy.php"
- ],
- "psr-4": {
- "DeepCopy\\": "src/DeepCopy/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "Create deep copies (clones) of your objects",
- "keywords": [
- "clone",
- "copy",
- "duplicate",
- "object",
- "object graph"
- ],
- "support": {
- "issues": "https://github.com/myclabs/DeepCopy/issues",
- "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1"
- },
- "funding": [
- {
- "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
- "type": "tidelift"
- }
- ],
- "time": "2023-03-08T13:26:56+00:00"
- },
- {
- "name": "phar-io/manifest",
- "version": "2.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/phar-io/manifest.git",
- "reference": "97803eca37d319dfa7826cc2437fc020857acb53"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
- "reference": "97803eca37d319dfa7826cc2437fc020857acb53",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-phar": "*",
- "ext-xmlwriter": "*",
- "phar-io/version": "^3.0.1",
- "php": "^7.2 || ^8.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Arne Blankerts",
- "email": "arne@blankerts.de",
- "role": "Developer"
- },
- {
- "name": "Sebastian Heuer",
- "email": "sebastian@phpeople.de",
- "role": "Developer"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "Developer"
- }
- ],
- "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
- "support": {
- "issues": "https://github.com/phar-io/manifest/issues",
- "source": "https://github.com/phar-io/manifest/tree/2.0.3"
- },
- "time": "2021-07-20T11:28:43+00:00"
- },
- {
- "name": "phar-io/version",
- "version": "3.2.1",
- "source": {
- "type": "git",
- "url": "https://github.com/phar-io/version.git",
- "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
- "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
- "shasum": ""
- },
- "require": {
- "php": "^7.2 || ^8.0"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Arne Blankerts",
- "email": "arne@blankerts.de",
- "role": "Developer"
- },
- {
- "name": "Sebastian Heuer",
- "email": "sebastian@phpeople.de",
- "role": "Developer"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "Developer"
- }
- ],
- "description": "Library for handling version information and constraints",
- "support": {
- "issues": "https://github.com/phar-io/version/issues",
- "source": "https://github.com/phar-io/version/tree/3.2.1"
- },
- "time": "2022-02-21T01:04:05+00:00"
- },
- {
- "name": "phpcompatibility/php-compatibility",
- "version": "9.3.5",
- "source": {
- "type": "git",
- "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
- "reference": "9fb324479acf6f39452e0655d2429cc0d3914243"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243",
- "reference": "9fb324479acf6f39452e0655d2429cc0d3914243",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3",
- "squizlabs/php_codesniffer": "^2.3 || ^3.0.2"
- },
- "conflict": {
- "squizlabs/php_codesniffer": "2.6.2"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0"
- },
- "suggest": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.",
- "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
- },
- "type": "phpcodesniffer-standard",
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "LGPL-3.0-or-later"
- ],
- "authors": [
- {
- "name": "Wim Godden",
- "homepage": "https://github.com/wimg",
- "role": "lead"
- },
- {
- "name": "Juliette Reinders Folmer",
- "homepage": "https://github.com/jrfnl",
- "role": "lead"
- },
- {
- "name": "Contributors",
- "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
- }
- ],
- "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
- "homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
- "keywords": [
- "compatibility",
- "phpcs",
- "standards"
- ],
- "support": {
- "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues",
- "source": "https://github.com/PHPCompatibility/PHPCompatibility"
- },
- "time": "2019-12-27T09:44:58+00:00"
- },
- {
- "name": "phpcompatibility/phpcompatibility-paragonie",
- "version": "1.3.2",
- "source": {
- "type": "git",
- "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
- "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26",
- "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26",
- "shasum": ""
- },
- "require": {
- "phpcompatibility/php-compatibility": "^9.0"
- },
- "require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
- "paragonie/random_compat": "dev-master",
- "paragonie/sodium_compat": "dev-master"
- },
- "suggest": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
- "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
- },
- "type": "phpcodesniffer-standard",
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "LGPL-3.0-or-later"
- ],
- "authors": [
- {
- "name": "Wim Godden",
- "role": "lead"
- },
- {
- "name": "Juliette Reinders Folmer",
- "role": "lead"
- }
- ],
- "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.",
- "homepage": "http://phpcompatibility.com/",
- "keywords": [
- "compatibility",
- "paragonie",
- "phpcs",
- "polyfill",
- "standards",
- "static analysis"
- ],
- "support": {
- "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues",
- "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie"
- },
- "time": "2022-10-25T01:46:02+00:00"
- },
- {
- "name": "phpcompatibility/phpcompatibility-wp",
- "version": "2.1.4",
- "source": {
- "type": "git",
- "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
- "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5",
- "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5",
- "shasum": ""
- },
- "require": {
- "phpcompatibility/php-compatibility": "^9.0",
- "phpcompatibility/phpcompatibility-paragonie": "^1.0"
- },
- "require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7"
- },
- "suggest": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
- "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
- },
- "type": "phpcodesniffer-standard",
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "LGPL-3.0-or-later"
- ],
- "authors": [
- {
- "name": "Wim Godden",
- "role": "lead"
- },
- {
- "name": "Juliette Reinders Folmer",
- "role": "lead"
- }
- ],
- "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.",
- "homepage": "http://phpcompatibility.com/",
- "keywords": [
- "compatibility",
- "phpcs",
- "standards",
- "static analysis",
- "wordpress"
- ],
- "support": {
- "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues",
- "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP"
- },
- "time": "2022-10-24T09:00:36+00:00"
- },
- {
- "name": "phpstan/phpdoc-parser",
- "version": "1.18.1",
- "source": {
- "type": "git",
- "url": "https://github.com/phpstan/phpdoc-parser.git",
- "reference": "22dcdfd725ddf99583bfe398fc624ad6c5004a0f"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/22dcdfd725ddf99583bfe398fc624ad6c5004a0f",
- "reference": "22dcdfd725ddf99583bfe398fc624ad6c5004a0f",
- "shasum": ""
- },
- "require": {
- "php": "^7.2 || ^8.0"
- },
- "require-dev": {
- "php-parallel-lint/php-parallel-lint": "^1.2",
- "phpstan/extension-installer": "^1.0",
- "phpstan/phpstan": "^1.5",
- "phpstan/phpstan-phpunit": "^1.1",
- "phpstan/phpstan-strict-rules": "^1.0",
- "phpunit/phpunit": "^9.5",
- "symfony/process": "^5.2"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "PHPStan\\PhpDocParser\\": [
- "src/"
- ]
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "PHPDoc parser with support for nullable, intersection and generic types",
- "support": {
- "issues": "https://github.com/phpstan/phpdoc-parser/issues",
- "source": "https://github.com/phpstan/phpdoc-parser/tree/1.18.1"
- },
- "time": "2023-04-07T11:51:11+00:00"
- },
- {
- "name": "phpunit/php-code-coverage",
- "version": "7.0.15",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "819f92bba8b001d4363065928088de22f25a3a48"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48",
- "reference": "819f92bba8b001d4363065928088de22f25a3a48",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-xmlwriter": "*",
- "php": ">=7.2",
- "phpunit/php-file-iterator": "^2.0.2",
- "phpunit/php-text-template": "^1.2.1",
- "phpunit/php-token-stream": "^3.1.3 || ^4.0",
- "sebastian/code-unit-reverse-lookup": "^1.0.1",
- "sebastian/environment": "^4.2.2",
- "sebastian/version": "^2.0.1",
- "theseer/tokenizer": "^1.1.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^8.2.2"
- },
- "suggest": {
- "ext-xdebug": "^2.7.2"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "7.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
- "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
- "keywords": [
- "coverage",
- "testing",
- "xunit"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2021-07-26T12:20:09+00:00"
- },
- {
- "name": "phpunit/php-file-iterator",
- "version": "2.0.5",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5",
- "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^8.5"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "FilterIterator implementation that filters files based on a list of suffixes.",
- "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
- "keywords": [
- "filesystem",
- "iterator"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2021-12-02T12:42:26+00:00"
- },
- {
- "name": "phpunit/php-text-template",
- "version": "1.2.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
- "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Simple template engine.",
- "homepage": "https://github.com/sebastianbergmann/php-text-template/",
- "keywords": [
- "template"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
- "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1"
- },
- "time": "2015-06-21T13:50:34+00:00"
- },
- {
- "name": "phpunit/php-timer",
- "version": "2.1.3",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662",
- "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^8.5"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.1-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Utility class for timing",
- "homepage": "https://github.com/sebastianbergmann/php-timer/",
- "keywords": [
- "timer"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-timer/issues",
- "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-11-30T08:20:02+00:00"
- },
- {
- "name": "phpunit/php-token-stream",
- "version": "4.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3",
- "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3",
- "shasum": ""
- },
- "require": {
- "ext-tokenizer": "*",
- "php": "^7.3 || ^8.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Wrapper around PHP's tokenizer extension.",
- "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
- "keywords": [
- "tokenizer"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
- "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "abandoned": true,
- "time": "2020-08-04T08:28:15+00:00"
- },
- {
- "name": "phpunit/phpunit",
- "version": "8.5.33",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e",
- "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e",
- "shasum": ""
- },
- "require": {
- "doctrine/instantiator": "^1.3.1",
- "ext-dom": "*",
- "ext-json": "*",
- "ext-libxml": "*",
- "ext-mbstring": "*",
- "ext-xml": "*",
- "ext-xmlwriter": "*",
- "myclabs/deep-copy": "^1.10.0",
- "phar-io/manifest": "^2.0.3",
- "phar-io/version": "^3.0.2",
- "php": ">=7.2",
- "phpunit/php-code-coverage": "^7.0.12",
- "phpunit/php-file-iterator": "^2.0.4",
- "phpunit/php-text-template": "^1.2.1",
- "phpunit/php-timer": "^2.1.2",
- "sebastian/comparator": "^3.0.5",
- "sebastian/diff": "^3.0.2",
- "sebastian/environment": "^4.2.3",
- "sebastian/exporter": "^3.1.5",
- "sebastian/global-state": "^3.0.0",
- "sebastian/object-enumerator": "^3.0.3",
- "sebastian/resource-operations": "^2.0.1",
- "sebastian/type": "^1.1.3",
- "sebastian/version": "^2.0.1"
- },
- "suggest": {
- "ext-soap": "*",
- "ext-xdebug": "*",
- "phpunit/php-invoker": "^2.0.0"
- },
- "bin": [
- "phpunit"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "8.5-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "The PHP Unit Testing framework.",
- "homepage": "https://phpunit.de/",
- "keywords": [
- "phpunit",
- "testing",
- "xunit"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.33"
- },
- "funding": [
- {
- "url": "https://phpunit.de/sponsors.html",
- "type": "custom"
- },
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
- "type": "tidelift"
- }
- ],
- "time": "2023-02-27T13:04:50+00:00"
- },
- {
- "name": "sebastian/code-unit-reverse-lookup",
- "version": "1.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619",
- "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619",
- "shasum": ""
- },
- "require": {
- "php": ">=5.6"
- },
- "require-dev": {
- "phpunit/phpunit": "^8.5"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Looks up which function or method a line of code belongs to",
- "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
- "support": {
- "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
- "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-11-30T08:15:22+00:00"
- },
- {
- "name": "sebastian/comparator",
- "version": "3.0.5",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770",
- "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1",
- "sebastian/diff": "^3.0",
- "sebastian/exporter": "^3.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^8.5"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- }
- ],
- "description": "Provides the functionality to compare PHP values for equality",
- "homepage": "https://github.com/sebastianbergmann/comparator",
- "keywords": [
- "comparator",
- "compare",
- "equality"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/comparator/issues",
- "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2022-09-14T12:31:48+00:00"
- },
- {
- "name": "sebastian/diff",
- "version": "3.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211",
- "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^7.5 || ^8.0",
- "symfony/process": "^2 || ^3.3 || ^4"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
- }
- ],
- "description": "Diff implementation",
- "homepage": "https://github.com/sebastianbergmann/diff",
- "keywords": [
- "diff",
- "udiff",
- "unidiff",
- "unified diff"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-11-30T07:59:04+00:00"
- },
- {
- "name": "sebastian/environment",
- "version": "4.2.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0",
- "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^7.5"
- },
- "suggest": {
- "ext-posix": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.2-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Provides functionality to handle HHVM/PHP environments",
- "homepage": "http://www.github.com/sebastianbergmann/environment",
- "keywords": [
- "Xdebug",
- "environment",
- "hhvm"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-11-30T07:53:42+00:00"
- },
- {
- "name": "sebastian/exporter",
- "version": "3.1.5",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6",
- "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6",
- "shasum": ""
- },
- "require": {
- "php": ">=7.0",
- "sebastian/recursion-context": "^3.0"
- },
- "require-dev": {
- "ext-mbstring": "*",
- "phpunit/phpunit": "^8.5"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.1.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Volker Dusch",
- "email": "github@wallbash.com"
- },
- {
- "name": "Adam Harvey",
- "email": "aharvey@php.net"
- },
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@gmail.com"
- }
- ],
- "description": "Provides the functionality to export PHP variables for visualization",
- "homepage": "http://www.github.com/sebastianbergmann/exporter",
- "keywords": [
- "export",
- "exporter"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2022-09-14T06:00:17+00:00"
- },
- {
- "name": "sebastian/global-state",
- "version": "3.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921",
- "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2",
- "sebastian/object-reflector": "^1.1.1",
- "sebastian/recursion-context": "^3.0"
- },
- "require-dev": {
- "ext-dom": "*",
- "phpunit/phpunit": "^8.0"
- },
- "suggest": {
- "ext-uopz": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Snapshotting of global state",
- "homepage": "http://www.github.com/sebastianbergmann/global-state",
- "keywords": [
- "global state"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2022-02-10T06:55:38+00:00"
- },
- {
- "name": "sebastian/object-enumerator",
- "version": "3.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
- "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
- "shasum": ""
- },
- "require": {
- "php": ">=7.0",
- "sebastian/object-reflector": "^1.1.1",
- "sebastian/recursion-context": "^3.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Traverses array structures and object graphs to enumerate all referenced objects",
- "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "support": {
- "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
- "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-11-30T07:40:27+00:00"
- },
- {
- "name": "sebastian/object-reflector",
- "version": "1.1.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
- "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
- "shasum": ""
- },
- "require": {
- "php": ">=7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Allows reflection of object attributes, including inherited and non-public ones",
- "homepage": "https://github.com/sebastianbergmann/object-reflector/",
- "support": {
- "issues": "https://github.com/sebastianbergmann/object-reflector/issues",
- "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-11-30T07:37:18+00:00"
- },
- {
- "name": "sebastian/recursion-context",
- "version": "3.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb",
- "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb",
- "shasum": ""
- },
- "require": {
- "php": ">=7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Adam Harvey",
- "email": "aharvey@php.net"
- }
- ],
- "description": "Provides functionality to recursively process PHP variables",
- "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "support": {
- "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
- "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-11-30T07:34:24+00:00"
- },
- {
- "name": "sebastian/resource-operations",
- "version": "2.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3",
- "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Provides a list of PHP built-in functions that operate on resources",
- "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "support": {
- "issues": "https://github.com/sebastianbergmann/resource-operations/issues",
- "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-11-30T07:30:19+00:00"
- },
- {
- "name": "sebastian/type",
- "version": "1.1.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/type.git",
- "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4",
- "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2"
- },
- "require-dev": {
- "phpunit/phpunit": "^8.2"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Collection of value objects that represent the types of the PHP type system",
- "homepage": "https://github.com/sebastianbergmann/type",
- "support": {
- "issues": "https://github.com/sebastianbergmann/type/issues",
- "source": "https://github.com/sebastianbergmann/type/tree/1.1.4"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-11-30T07:25:11+00:00"
- },
- {
- "name": "sebastian/version",
- "version": "2.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/version.git",
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
- "shasum": ""
- },
- "require": {
- "php": ">=5.6"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
- }
- ],
- "description": "Library that helps with managing the version number of Git-hosted PHP projects",
- "homepage": "https://github.com/sebastianbergmann/version",
- "support": {
- "issues": "https://github.com/sebastianbergmann/version/issues",
- "source": "https://github.com/sebastianbergmann/version/tree/master"
- },
- "time": "2016-10-03T07:35:21+00:00"
- },
- {
- "name": "slevomat/coding-standard",
- "version": "8.10.0",
- "source": {
- "type": "git",
- "url": "https://github.com/slevomat/coding-standard.git",
- "reference": "c4e213e6e57f741451a08e68ef838802eec92287"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/c4e213e6e57f741451a08e68ef838802eec92287",
- "reference": "c4e213e6e57f741451a08e68ef838802eec92287",
- "shasum": ""
- },
- "require": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0",
- "php": "^7.2 || ^8.0",
- "phpstan/phpdoc-parser": ">=1.18.0 <1.19.0",
- "squizlabs/php_codesniffer": "^3.7.1"
- },
- "require-dev": {
- "phing/phing": "2.17.4",
- "php-parallel-lint/php-parallel-lint": "1.3.2",
- "phpstan/phpstan": "1.4.10|1.10.11",
- "phpstan/phpstan-deprecation-rules": "1.1.3",
- "phpstan/phpstan-phpunit": "1.0.0|1.3.11",
- "phpstan/phpstan-strict-rules": "1.5.1",
- "phpunit/phpunit": "7.5.20|8.5.21|9.6.6|10.0.19"
- },
- "type": "phpcodesniffer-standard",
- "extra": {
- "branch-alias": {
- "dev-master": "8.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "SlevomatCodingStandard\\": "SlevomatCodingStandard/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.",
- "keywords": [
- "dev",
- "phpcs"
- ],
- "support": {
- "issues": "https://github.com/slevomat/coding-standard/issues",
- "source": "https://github.com/slevomat/coding-standard/tree/8.10.0"
- },
- "funding": [
- {
- "url": "https://github.com/kukulich",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard",
- "type": "tidelift"
- }
- ],
- "time": "2023-04-10T07:39:29+00:00"
- },
- {
- "name": "spryker/code-sniffer",
- "version": "0.17.18",
- "source": {
- "type": "git",
- "url": "https://github.com/spryker/code-sniffer.git",
- "reference": "5fb8b573abc4a906d0d364a4a03abd38e565ba29"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/spryker/code-sniffer/zipball/5fb8b573abc4a906d0d364a4a03abd38e565ba29",
- "reference": "5fb8b573abc4a906d0d364a4a03abd38e565ba29",
- "shasum": ""
- },
- "require": {
- "php": ">=7.4",
- "slevomat/coding-standard": "^7.2.0 || ^8.0.1",
- "squizlabs/php_codesniffer": "^3.6.2"
- },
- "require-dev": {
- "phpstan/phpstan": "^1.0.0",
- "phpunit/phpunit": "^9.5"
- },
- "bin": [
- "bin/tokenize"
- ],
- "type": "phpcodesniffer-standard",
- "autoload": {
- "psr-4": {
- "Spryker\\": "Spryker/",
- "SprykerStrict\\": "SprykerStrict/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Spryker",
- "homepage": "https://spryker.com"
- }
- ],
- "description": "Spryker Code Sniffer Standards",
- "homepage": "https://spryker.com",
- "keywords": [
- "codesniffer",
- "framework",
- "phpcs",
- "standards",
- "static analysis"
- ],
- "support": {
- "issues": "https://github.com/spryker/code-sniffer/issues",
- "source": "https://github.com/spryker/code-sniffer"
- },
- "time": "2023-01-03T16:08:22+00:00"
- },
- {
- "name": "squizlabs/php_codesniffer",
- "version": "3.7.2",
- "source": {
- "type": "git",
- "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879",
- "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879",
- "shasum": ""
- },
- "require": {
- "ext-simplexml": "*",
- "ext-tokenizer": "*",
- "ext-xmlwriter": "*",
- "php": ">=5.4.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
- },
- "bin": [
- "bin/phpcs",
- "bin/phpcbf"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.x-dev"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Greg Sherwood",
- "role": "lead"
- }
- ],
- "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
- "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
- "keywords": [
- "phpcs",
- "standards",
- "static analysis"
- ],
- "support": {
- "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
- "source": "https://github.com/squizlabs/PHP_CodeSniffer",
- "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
- },
- "time": "2023-02-22T23:07:41+00:00"
- },
- {
- "name": "theseer/tokenizer",
- "version": "1.2.1",
- "source": {
- "type": "git",
- "url": "https://github.com/theseer/tokenizer.git",
- "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
- "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-tokenizer": "*",
- "ext-xmlwriter": "*",
- "php": "^7.2 || ^8.0"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Arne Blankerts",
- "email": "arne@blankerts.de",
- "role": "Developer"
- }
- ],
- "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
- "support": {
- "issues": "https://github.com/theseer/tokenizer/issues",
- "source": "https://github.com/theseer/tokenizer/tree/1.2.1"
- },
- "funding": [
- {
- "url": "https://github.com/theseer",
- "type": "github"
- }
- ],
- "time": "2021-07-28T10:34:58+00:00"
- },
- {
- "name": "wp-coding-standards/wpcs",
- "version": "2.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
- "reference": "7da1894633f168fe244afc6de00d141f27517b62"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62",
- "reference": "7da1894633f168fe244afc6de00d141f27517b62",
- "shasum": ""
- },
- "require": {
- "php": ">=5.4",
- "squizlabs/php_codesniffer": "^3.3.1"
- },
- "require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6",
- "phpcompatibility/php-compatibility": "^9.0",
- "phpcsstandards/phpcsdevtools": "^1.0",
- "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
- },
- "suggest": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
- },
- "type": "phpcodesniffer-standard",
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Contributors",
- "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors"
- }
- ],
- "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
- "keywords": [
- "phpcs",
- "standards",
- "wordpress"
- ],
- "support": {
- "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues",
- "source": "https://github.com/WordPress/WordPress-Coding-Standards",
- "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki"
- },
- "time": "2020-05-13T23:57:56+00:00"
- },
- {
- "name": "yoast/phpunit-polyfills",
- "version": "1.0.5",
- "source": {
- "type": "git",
- "url": "https://github.com/Yoast/PHPUnit-Polyfills.git",
- "reference": "3b59adeef77fb1c03ff5381dbb9d68b0aaff3171"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/3b59adeef77fb1c03ff5381dbb9d68b0aaff3171",
- "reference": "3b59adeef77fb1c03ff5381dbb9d68b0aaff3171",
- "shasum": ""
- },
- "require": {
- "php": ">=5.4",
- "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
- },
- "require-dev": {
- "yoast/yoastcs": "^2.3.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "2.x-dev"
- }
- },
- "autoload": {
- "files": [
- "phpunitpolyfills-autoload.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Team Yoast",
- "email": "support@yoast.com",
- "homepage": "https://yoast.com"
- },
- {
- "name": "Contributors",
- "homepage": "https://github.com/Yoast/PHPUnit-Polyfills/graphs/contributors"
- }
- ],
- "description": "Set of polyfills for changed PHPUnit functionality to allow for creating PHPUnit cross-version compatible tests",
- "homepage": "https://github.com/Yoast/PHPUnit-Polyfills",
- "keywords": [
- "phpunit",
- "polyfill",
- "testing"
- ],
- "support": {
- "issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues",
- "source": "https://github.com/Yoast/PHPUnit-Polyfills"
- },
- "time": "2023-03-30T23:39:05+00:00"
- }
- ],
- "aliases": [],
- "minimum-stability": "stable",
- "stability-flags": [],
- "prefer-stable": false,
- "prefer-lowest": false,
- "platform": {
- "php": ">=5.6"
- },
- "platform-dev": [],
- "plugin-api-version": "2.3.0"
-}
diff --git a/vendor/deliciousbrains/wp-background-processing/license.txt b/vendor/deliciousbrains/wp-background-processing/license.txt
deleted file mode 100644
index a0939e921..000000000
--- a/vendor/deliciousbrains/wp-background-processing/license.txt
+++ /dev/null
@@ -1,280 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
-
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/vendor/deliciousbrains/wp-background-processing/phpunit.xml b/vendor/deliciousbrains/wp-background-processing/phpunit.xml
deleted file mode 100644
index d6218767c..000000000
--- a/vendor/deliciousbrains/wp-background-processing/phpunit.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- ./tests/
-
-
-
diff --git a/vendor/deliciousbrains/wp-background-processing/tests/Test_Setup.php b/vendor/deliciousbrains/wp-background-processing/tests/Test_Setup.php
deleted file mode 100644
index cfbaa8ed0..000000000
--- a/vendor/deliciousbrains/wp-background-processing/tests/Test_Setup.php
+++ /dev/null
@@ -1,19 +0,0 @@
-assertTrue( true );
- }
-}
diff --git a/vendor/deliciousbrains/wp-background-processing/tests/Test_WP_Background_Process.php b/vendor/deliciousbrains/wp-background-processing/tests/Test_WP_Background_Process.php
deleted file mode 100644
index 19926e95b..000000000
--- a/vendor/deliciousbrains/wp-background-processing/tests/Test_WP_Background_Process.php
+++ /dev/null
@@ -1,589 +0,0 @@
-wpbp = $this->getMockForAbstractClass( WP_Background_Process::class );
-
- $this->wpbp->expects( $this->any() )
- ->method( 'task' )
- ->will( $this->returnValue( false ) );
- }
-
- /**
- * Get a property value from WPBP regardless of accessibility.
- *
- * @param string $name
- *
- * @return mixed
- */
- private function getWPBPProperty( string $name ) {
- try {
- $property = new ReflectionProperty( 'WP_Background_Process', $name );
- } catch ( Exception $e ) {
- return new WP_Error( $e->getCode(), $e->getMessage() );
- }
- $property->setAccessible( true );
-
- return $property->getValue( $this->wpbp );
- }
-
- /**
- * Execute a method of WPBP regardless of accessibility.
- *
- * @param string $name Method name.
- * @param mixed $args None, one or more args to pass to method.
- *
- * @return mixed
- */
- private function executeWPBPMethod( string $name, ...$args ) {
- try {
- $method = new ReflectionMethod( 'WP_Background_Process', $name );
- $method->setAccessible( true );
-
- return $method->invoke( $this->wpbp, ...$args );
- } catch ( Exception $e ) {
- return new WP_Error( $e->getCode(), $e->getMessage() );
- }
- }
-
- /**
- * Test push_to_queue.
- *
- * @return void
- */
- public function test_push_to_queue() {
- $this->assertClassHasAttribute( 'data', 'WP_Background_Process', 'class has data property' );
- $this->assertEmpty( $this->getWPBPProperty( 'data' ) );
-
- $this->wpbp->push_to_queue( 'wibble' );
- $this->assertNotEmpty( $this->getWPBPProperty( 'data' ) );
- $this->assertEquals( array( 'wibble' ), $this->getWPBPProperty( 'data' ) );
-
- $this->wpbp->push_to_queue( 'wobble' );
- $this->assertEquals( array( 'wibble', 'wobble' ), $this->getWPBPProperty( 'data' ) );
- }
-
- /**
- * Test save.
- *
- * @return void
- */
- public function test_save() {
- $this->assertClassHasAttribute( 'data', 'WP_Background_Process', 'class has data property' );
- $this->assertEmpty( $this->getWPBPProperty( 'data' ) );
- $this->assertEmpty( $this->wpbp->get_batches(), 'no batches until save' );
-
- $this->wpbp->push_to_queue( 'wibble' );
- $this->assertNotEmpty( $this->getWPBPProperty( 'data' ) );
- $this->assertEquals( array( 'wibble' ), $this->getWPBPProperty( 'data' ) );
- $this->wpbp->save();
- $this->assertEmpty( $this->getWPBPProperty( 'data' ), 'data emptied after save' );
- $this->assertNotEmpty( $this->wpbp->get_batches(), 'batches exist after save' );
- }
-
- /**
- * Test get_batches.
- *
- * @return void
- */
- public function test_get_batches() {
- $this->assertEmpty( $this->wpbp->get_batches(), 'no batches until save' );
-
- $this->wpbp->push_to_queue( 'wibble' );
- $this->assertNotEmpty( $this->getWPBPProperty( 'data' ) );
- $this->assertEquals( array( 'wibble' ), $this->getWPBPProperty( 'data' ) );
- $this->assertEmpty( $this->wpbp->get_batches(), 'no batches until save' );
-
- $this->wpbp->push_to_queue( 'wobble' );
- $this->assertEquals( array( 'wibble', 'wobble' ), $this->getWPBPProperty( 'data' ) );
- $this->assertEmpty( $this->wpbp->get_batches(), 'no batches until save' );
-
- $this->wpbp->save();
- $first_batch = $this->wpbp->get_batches();
- $this->assertNotEmpty( $first_batch );
- $this->assertCount( 1, $first_batch );
-
- $this->wpbp->push_to_queue( 'more wibble' );
- $this->wpbp->save();
- $this->assertCount( 2, $this->wpbp->get_batches() );
-
- $this->wpbp->push_to_queue( 'Wibble wobble all day long.' );
- $this->wpbp->save();
- $this->assertCount( 3, $this->wpbp->get_batches() );
-
- $this->assertEquals( $first_batch, $this->wpbp->get_batches( 1 ) );
- $this->assertNotEquals( $first_batch, $this->wpbp->get_batches( 2 ) );
- $this->assertCount( 2, $this->wpbp->get_batches( 2 ) );
- $this->assertCount( 3, $this->wpbp->get_batches( 3 ) );
- $this->assertCount( 3, $this->wpbp->get_batches( 5 ) );
- }
-
- /**
- * Test get_batch.
- *
- * @return void
- */
- public function test_get_batch() {
- $this->assertEmpty( $this->executeWPBPMethod( 'get_batch' ), 'no batches until save' );
-
- $this->wpbp->push_to_queue( 'wibble' );
- $this->assertNotEmpty( $this->getWPBPProperty( 'data' ) );
- $this->assertEquals( array( 'wibble' ), $this->getWPBPProperty( 'data' ) );
- $this->assertEmpty( $this->executeWPBPMethod( 'get_batch' ), 'no batches until save' );
-
- $this->wpbp->push_to_queue( 'wobble' );
- $this->assertEquals( array( 'wibble', 'wobble' ), $this->getWPBPProperty( 'data' ) );
- $this->assertEmpty( $this->executeWPBPMethod( 'get_batch' ), 'no batches until save' );
-
- $this->wpbp->save();
- $first_batch = $this->executeWPBPMethod( 'get_batch' );
- $this->assertNotEmpty( $first_batch );
- $this->assertInstanceOf( 'stdClass', $first_batch );
- $this->assertEquals( array( 'wibble', 'wobble' ), $first_batch->data );
-
- $this->wpbp->push_to_queue( 'more wibble' );
- $this->wpbp->save();
- $second_batch = $this->executeWPBPMethod( 'get_batch' );
- $this->assertNotEmpty( $second_batch );
- $this->assertInstanceOf( 'stdClass', $second_batch );
- $this->assertEquals( $first_batch, $second_batch, 'same 1st batch returned until deleted' );
-
- $this->wpbp->delete( $first_batch->key );
- $second_batch = $this->executeWPBPMethod( 'get_batch' );
- $this->assertNotEmpty( $second_batch );
- $this->assertInstanceOf( 'stdClass', $second_batch );
- $this->assertNotEquals( $first_batch, $second_batch, '2nd batch returned as 1st deleted' );
- $this->assertEquals( array( 'more wibble' ), $second_batch->data );
- }
-
- /**
- * Test cancel.
- *
- * @return void
- */
- public function test_cancel() {
- $this->wpbp->push_to_queue( 'wibble' );
- $this->wpbp->save();
- $this->assertFalse( $this->wpbp->is_cancelled() );
- $this->wpbp->cancel();
- $this->assertTrue( $this->wpbp->is_cancelled() );
- }
-
- /**
- * Test pause.
- *
- * @return void
- */
- public function test_pause() {
- $this->wpbp->push_to_queue( 'wibble' );
- $this->wpbp->save();
- $this->assertFalse( $this->wpbp->is_paused() );
- $this->wpbp->pause();
- $this->assertTrue( $this->wpbp->is_paused() );
- }
-
- /**
- * Test resume.
- *
- * @return void
- */
- public function test_resume() {
- $this->wpbp->push_to_queue( 'wibble' );
- $this->wpbp->save();
- $this->assertFalse( $this->wpbp->is_paused() );
- $this->wpbp->pause();
- $this->assertTrue( $this->wpbp->is_paused() );
- $this->wpbp->resume();
- $this->assertFalse( $this->wpbp->is_paused() );
- }
-
- /**
- * Test delete.
- *
- * @return void
- */
- public function test_delete() {
- $this->wpbp->push_to_queue( 'wibble' );
- $this->wpbp->save();
- $this->assertCount( 1, $this->wpbp->get_batches() );
- $this->wpbp->push_to_queue( 'wobble' );
- $this->wpbp->save();
- $this->assertCount( 2, $this->wpbp->get_batches() );
- $first_batch = $this->executeWPBPMethod( 'get_batch' );
- $this->wpbp->delete( $first_batch->key );
- $this->assertCount( 1, $this->wpbp->get_batches() );
- $second_batch = $this->executeWPBPMethod( 'get_batch' );
- $this->assertNotEquals( $first_batch, $second_batch, '2nd batch returned as 1st deleted' );
- }
-
- /**
- * Test delete_all.
- *
- * @return void
- */
- public function test_delete_all() {
- $this->wpbp->push_to_queue( 'wibble' );
- $this->wpbp->save();
- $this->assertCount( 1, $this->wpbp->get_batches() );
- $this->wpbp->push_to_queue( 'wobble' );
- $this->wpbp->save();
- $this->assertCount( 2, $this->wpbp->get_batches() );
- $this->wpbp->delete_all();
- $this->assertCount( 0, $this->wpbp->get_batches() );
- }
-
- /**
- * Test update.
- *
- * @return void
- */
- public function test_update() {
- $this->wpbp->push_to_queue( 'wibble' );
- $this->wpbp->save();
- $this->assertCount( 1, $this->wpbp->get_batches() );
- $this->wpbp->push_to_queue( 'wobble' );
- $this->wpbp->save();
- $this->assertCount( 2, $this->wpbp->get_batches() );
- $first_batch = $this->executeWPBPMethod( 'get_batch' );
- $this->wpbp->update( $first_batch->key, array( 'Wibble wobble all day long!' ) );
- $this->assertCount( 2, $this->wpbp->get_batches() );
- $updated_batch = $this->executeWPBPMethod( 'get_batch' );
- $this->assertNotEquals( $first_batch, $updated_batch, 'fetched updated batch different to 1st fetch' );
- $this->assertEquals( array( 'Wibble wobble all day long!' ), $updated_batch->data, 'fetched updated batch has expected data' );
- }
-
- /**
- * Test maybe_handle when cancelling.
- *
- * @return void
- */
- public function test_maybe_handle_cancelled() {
- // Cancelled status results in cleared batches and action fired.
- $cancelled_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_cancelled', function () use ( &$cancelled_fired ) {
- $cancelled_fired = true;
- } );
- // Paused action should not be fired though.
- $paused_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_paused', function () use ( &$paused_fired ) {
- $paused_fired = true;
- } );
- // Completed action should not be fired though.
- $completed_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_completed', function () use ( &$completed_fired ) {
- $completed_fired = true;
- } );
- add_filter( $this->getWPBPProperty( 'identifier' ) . '_wp_die', '__return_false' );
- $this->wpbp->push_to_queue( 'wibble' );
- $this->wpbp->save();
- $this->assertCount( 1, $this->wpbp->get_batches() );
- $this->wpbp->push_to_queue( 'wobble' );
- $this->wpbp->save();
- $this->assertCount( 2, $this->wpbp->get_batches() );
- update_site_option( $this->executeWPBPMethod( 'get_status_key' ), WP_Background_Process::STATUS_CANCELLED );
- $this->assertTrue( $this->wpbp->is_cancelled(), 'is_cancelled' );
- $this->assertCount( 2, $this->wpbp->get_batches() );
- $this->assertFalse( $cancelled_fired, 'cancelled action not fired yet' );
- $this->assertFalse( $paused_fired, 'paused action not fired yet' );
- $this->assertFalse( $completed_fired, 'completed action not fired yet' );
- $this->wpbp->maybe_handle();
- $this->assertCount( 0, $this->wpbp->get_batches() );
- $this->assertTrue( $cancelled_fired, 'cancelled action fired' );
- $this->assertFalse( $paused_fired, 'paused action still not fired yet' );
- $this->assertFalse( $completed_fired, 'completed action not fired yet' );
- }
-
- /**
- * Test maybe_handle when pausing and resuming.
- *
- * @return void
- */
- public function test_maybe_handle_paused_resumed() {
- // Cancelled action should not be fired.
- $cancelled_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_cancelled', function () use ( &$cancelled_fired ) {
- $cancelled_fired = true;
- } );
- // Paused action should fire and batches remain intact.
- $paused_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_paused', function () use ( &$paused_fired ) {
- $paused_fired = true;
- } );
- // Resumed action should fire on resume before batches handled.
- $resumed_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_resumed', function () use ( &$resumed_fired ) {
- $resumed_fired = true;
- } );
- // Completed action should fire after batches handled.
- $completed_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_completed', function () use ( &$completed_fired ) {
- $completed_fired = true;
- } );
- add_filter( $this->getWPBPProperty( 'identifier' ) . '_wp_die', '__return_false' );
- $this->wpbp->push_to_queue( 'wibble' );
- $this->wpbp->save();
- $this->assertCount( 1, $this->wpbp->get_batches() );
- $this->wpbp->push_to_queue( 'wobble' );
- $this->wpbp->save();
- $this->assertCount( 2, $this->wpbp->get_batches() );
- $this->wpbp->pause();
- $this->assertTrue( $this->wpbp->is_paused(), 'is_paused' );
- $this->assertCount( 2, $this->wpbp->get_batches() );
- $this->assertFalse( $cancelled_fired, 'cancelled action not fired yet' );
- $this->assertFalse( $paused_fired, 'paused action not fired yet' );
- $this->assertFalse( $resumed_fired, 'resumed action not fired yet' );
- $this->assertFalse( $completed_fired, 'completed action not fired yet' );
- $this->wpbp->maybe_handle();
- $this->assertCount( 2, $this->wpbp->get_batches() );
- $this->assertFalse( $cancelled_fired, 'cancelled action still not fired yet' );
- $this->assertTrue( $paused_fired, 'paused action fired' );
- $this->assertFalse( $resumed_fired, 'resumed action still not fired yet' );
- $this->assertFalse( $completed_fired, 'completed action not fired yet' );
-
- // Reset for resume and ensure dispatch does nothing to that maybe_handle can be monitored.
- $paused_fired = false;
- add_filter( 'pre_http_request', '__return_true' );
- $this->wpbp->resume();
- remove_filter( 'pre_http_request', '__return_true' );
- $this->assertFalse( $this->wpbp->is_paused(), 'not is_paused after resume' );
- $this->assertCount( 2, $this->wpbp->get_batches() );
- $this->assertFalse( $cancelled_fired, 'cancelled action not fired yet' );
- $this->assertFalse( $paused_fired, 'paused action not fired yet' );
- $this->assertTrue( $resumed_fired, 'resumed action fired' );
- $this->assertFalse( $completed_fired, 'completed action not fired yet' );
-
- // Don't expect resumed to be fired again, and batches to be handled with valid security.
- $resumed_fired = false;
- $_REQUEST['nonce'] = wp_create_nonce( $this->getWPBPProperty( 'identifier' ) );
- $this->wpbp->maybe_handle();
- $this->assertCount( 0, $this->wpbp->get_batches(), 'after resume all batches processed with maybe_handle' );
- $this->assertFalse( $cancelled_fired, 'cancelled action still not fired yet' );
- $this->assertFalse( $paused_fired, 'paused action not fired yet' );
- $this->assertFalse( $resumed_fired, 'resumed action still not fired yet' );
- $this->assertTrue( $completed_fired, 'completed action fired' );
- }
-
- /**
- * Test maybe_handle when handling a single batch.
- *
- * @return void
- */
- public function test_maybe_handle_single_batch() {
- // Cancelled action should not be fired.
- $cancelled_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_cancelled', function () use ( &$cancelled_fired ) {
- $cancelled_fired = true;
- } );
- // Paused action should not be fired.
- $paused_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_paused', function () use ( &$paused_fired ) {
- $paused_fired = true;
- } );
- // Resumed action should not be fired.
- $resumed_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_resumed', function () use ( &$resumed_fired ) {
- $resumed_fired = true;
- } );
- // Completed action should fire after batches handled.
- $completed_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_completed', function () use ( &$completed_fired ) {
- $completed_fired = true;
- } );
- add_filter( $this->getWPBPProperty( 'identifier' ) . '_wp_die', '__return_false' );
- $this->wpbp->push_to_queue( 'wibble' );
- $this->wpbp->save();
- $this->assertCount( 1, $this->wpbp->get_batches() );
- $this->assertFalse( $cancelled_fired, 'cancelled action not fired yet' );
- $this->assertFalse( $paused_fired, 'paused action not fired yet' );
- $this->assertFalse( $resumed_fired, 'resumed action not fired yet' );
- $this->assertFalse( $completed_fired, 'completed action not fired yet' );
-
- $_REQUEST['nonce'] = wp_create_nonce( $this->getWPBPProperty( 'identifier' ) );
- $this->wpbp->maybe_handle();
- $this->assertCount( 0, $this->wpbp->get_batches(), 'after resume all batches processed with maybe_handle' );
- $this->assertFalse( $cancelled_fired, 'cancelled action still not fired yet' );
- $this->assertFalse( $paused_fired, 'paused action not fired yet' );
- $this->assertFalse( $resumed_fired, 'resumed action still not fired yet' );
- $this->assertTrue( $completed_fired, 'completed action fired' );
- }
-
- /**
- * Test maybe_handle when handling nothing.
- *
- * @return void
- */
- public function test_maybe_handle_nothing() {
- // Cancelled action should not be fired.
- $cancelled_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_cancelled', function () use ( &$cancelled_fired ) {
- $cancelled_fired = true;
- } );
- // Paused action should not be fired.
- $paused_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_paused', function () use ( &$paused_fired ) {
- $paused_fired = true;
- } );
- // Resumed action should not be fired.
- $resumed_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_resumed', function () use ( &$resumed_fired ) {
- $resumed_fired = true;
- } );
- // Completed action should not be fired.
- $completed_fired = false;
- add_action( $this->getWPBPProperty( 'identifier' ) . '_completed', function () use ( &$completed_fired ) {
- $completed_fired = true;
- } );
- add_filter( $this->getWPBPProperty( 'identifier' ) . '_wp_die', '__return_false' );
- $this->assertCount( 0, $this->wpbp->get_batches() );
- $this->assertFalse( $cancelled_fired, 'cancelled action not fired yet' );
- $this->assertFalse( $paused_fired, 'paused action not fired yet' );
- $this->assertFalse( $resumed_fired, 'resumed action not fired yet' );
- $this->assertFalse( $completed_fired, 'completed action not fired yet' );
-
- $this->wpbp->maybe_handle();
- $this->assertCount( 0, $this->wpbp->get_batches(), 'after resume all batches processed with maybe_handle' );
- $this->assertFalse( $cancelled_fired, 'cancelled action still not fired yet' );
- $this->assertFalse( $paused_fired, 'paused action not fired yet' );
- $this->assertFalse( $resumed_fired, 'resumed action still not fired yet' );
- $this->assertFalse( $completed_fired, 'completed action not fired yet' );
- }
-
- /**
- * Test is_processing.
- *
- * @return void
- */
- public function test_is_processing() {
- $this->assertFalse( $this->wpbp->is_processing(), 'not processing yet' );
- $this->executeWPBPMethod( 'lock_process' );
- $this->assertTrue( $this->wpbp->is_processing(), 'processing' );
-
- // With batches to be processed, maybe_handle does nothing as "another instance is processing".
- add_filter( $this->getWPBPProperty( 'identifier' ) . '_wp_die', '__return_false' );
- $this->wpbp->push_to_queue( 'wibble' );
- $this->wpbp->save();
- $this->assertCount( 1, $this->wpbp->get_batches() );
- $this->wpbp->maybe_handle();
- $this->assertCount( 1, $this->wpbp->get_batches() );
-
- // Unlock and maybe_handle can process the batch.
- $this->executeWPBPMethod( 'unlock_process' );
- $this->assertFalse( $this->wpbp->is_processing(), 'not processing yet' );
- $this->assertCount( 1, $this->wpbp->get_batches() );
- $_REQUEST['nonce'] = wp_create_nonce( $this->getWPBPProperty( 'identifier' ) );
- $this->wpbp->maybe_handle();
- $this->assertCount( 0, $this->wpbp->get_batches() );
- $this->assertFalse( $this->wpbp->is_processing(), 'not left processing on complete' );
- }
-
- /**
- * Test is_queued.
- *
- * @return void
- */
- public function test_is_queued() {
- $this->assertFalse( $this->wpbp->is_queued(), 'nothing queued until save' );
-
- $this->wpbp->push_to_queue( 'wibble' );
- $this->assertFalse( $this->wpbp->is_queued(), 'nothing queued until save' );
-
- $this->wpbp->save();
- $this->assertTrue( $this->wpbp->is_queued(), 'queued items exist' );
-
- $this->wpbp->push_to_queue( 'wobble' );
- $this->wpbp->save();
- $this->assertTrue( $this->wpbp->is_queued(), 'queued items exist' );
-
- $this->wpbp->delete_all();
- $this->assertFalse( $this->wpbp->is_queued(), 'queue emptied' );
- }
-
- /**
- * Test is_active.
- *
- * @return void
- */
- public function test_is_active() {
- $this->assertFalse( $this->wpbp->is_active(), 'not queued, processing, paused or cancelling' );
-
- // Queued.
- $this->wpbp->push_to_queue( 'wibble' );
- $this->assertFalse( $this->wpbp->is_active(), 'nothing queued until save' );
-
- $this->wpbp->save();
- $this->assertTrue( $this->wpbp->is_active(), 'queued items exist, so now active' );
-
- $this->wpbp->delete_all();
- $this->assertFalse( $this->wpbp->is_active(), 'queue emptied, so no longer active' );
-
- // Processing.
- $this->executeWPBPMethod( 'lock_process' );
- $this->assertTrue( $this->wpbp->is_active(), 'processing, so now active' );
-
- $this->executeWPBPMethod( 'unlock_process' );
- $this->assertFalse( $this->wpbp->is_active(), 'not processing, so no longer active' );
-
- // Paused.
- $this->wpbp->pause();
- $this->assertTrue( $this->wpbp->is_active(), 'paused, so now active' );
-
- $this->wpbp->resume();
- $this->assertFalse( $this->wpbp->is_active(), 'not paused, nothing queued, so no longer active' );
-
- $this->wpbp->push_to_queue( 'wibble' );
- $this->wpbp->save();
- $this->assertTrue( $this->wpbp->is_active(), 'queued items exist, so now active' );
- $this->wpbp->pause();
- $this->assertTrue( $this->wpbp->is_active(), 'paused, so still active' );
- add_filter( 'pre_http_request', '__return_true' );
- $this->wpbp->resume();
- remove_filter( 'pre_http_request', '__return_true' );
- $this->assertTrue( $this->wpbp->is_active(), 'resumed but with queued items, so still active' );
- $this->wpbp->delete_all();
- $this->assertFalse( $this->wpbp->is_active(), 'queue emptied, so no longer active' );
-
- // Cancelled.
- add_filter( 'pre_http_request', '__return_true' );
- $this->wpbp->cancel();
- remove_filter( 'pre_http_request', '__return_true' );
- $this->assertTrue( $this->wpbp->is_active(), 'cancelling, so now active' );
-
- add_filter( $this->getWPBPProperty( 'identifier' ) . '_wp_die', '__return_false' );
- $this->wpbp->maybe_handle();
- $this->assertFalse( $this->wpbp->is_active(), 'cancel handled, so no longer active' );
-
- $this->wpbp->push_to_queue( 'wibble' );
- $this->wpbp->save();
- $this->assertTrue( $this->wpbp->is_active(), 'queued items exist, so now active' );
- add_filter( 'pre_http_request', '__return_true' );
- $this->wpbp->cancel();
- remove_filter( 'pre_http_request', '__return_true' );
- $this->assertTrue( $this->wpbp->is_active(), 'cancelling, so still active' );
- $this->wpbp->maybe_handle();
- $this->assertFalse( $this->wpbp->is_active(), 'cancel handled, queue emptied, so no longer active' );
- }
-}
diff --git a/vendor/deliciousbrains/wp-background-processing/tests/bootstrap.php b/vendor/deliciousbrains/wp-background-processing/tests/bootstrap.php
deleted file mode 100644
index 94036dc18..000000000
--- a/vendor/deliciousbrains/wp-background-processing/tests/bootstrap.php
+++ /dev/null
@@ -1,38 +0,0 @@
-payload = $payload;
+ }
+
+ public function getPayload(): object
+ {
+ return $this->payload;
+ }
}
diff --git a/vendor/firebase/php-jwt/src/CachedKeySet.php b/vendor/firebase/php-jwt/src/CachedKeySet.php
index baf801f13..ee529f9f5 100644
--- a/vendor/firebase/php-jwt/src/CachedKeySet.php
+++ b/vendor/firebase/php-jwt/src/CachedKeySet.php
@@ -178,6 +178,16 @@ private function keyIdExists(string $keyId): bool
}
$request = $this->httpFactory->createRequest('GET', $this->jwksUri);
$jwksResponse = $this->httpClient->sendRequest($request);
+ if ($jwksResponse->getStatusCode() !== 200) {
+ throw new UnexpectedValueException(
+ sprintf('HTTP Error: %d %s for URI "%s"',
+ $jwksResponse->getStatusCode(),
+ $jwksResponse->getReasonPhrase(),
+ $this->jwksUri,
+ ),
+ $jwksResponse->getStatusCode()
+ );
+ }
$this->keySet = $this->formatJwksForCache((string) $jwksResponse->getBody());
if (!isset($this->keySet[$keyId])) {
diff --git a/vendor/firebase/php-jwt/src/ExpiredException.php b/vendor/firebase/php-jwt/src/ExpiredException.php
index 81ba52d43..12fef0944 100644
--- a/vendor/firebase/php-jwt/src/ExpiredException.php
+++ b/vendor/firebase/php-jwt/src/ExpiredException.php
@@ -2,6 +2,17 @@
namespace Firebase\JWT;
-class ExpiredException extends \UnexpectedValueException
+class ExpiredException extends \UnexpectedValueException implements JWTExceptionWithPayloadInterface
{
+ private object $payload;
+
+ public function setPayload(object $payload): void
+ {
+ $this->payload = $payload;
+ }
+
+ public function getPayload(): object
+ {
+ return $this->payload;
+ }
}
diff --git a/vendor/firebase/php-jwt/src/JWK.php b/vendor/firebase/php-jwt/src/JWK.php
index c7eff8ae4..63fb2484b 100644
--- a/vendor/firebase/php-jwt/src/JWK.php
+++ b/vendor/firebase/php-jwt/src/JWK.php
@@ -27,10 +27,16 @@ class JWK
private const EC_CURVES = [
'P-256' => '1.2.840.10045.3.1.7', // Len: 64
'secp256k1' => '1.3.132.0.10', // Len: 64
- // 'P-384' => '1.3.132.0.34', // Len: 96 (not yet supported)
+ 'P-384' => '1.3.132.0.34', // Len: 96
// 'P-521' => '1.3.132.0.35', // Len: 132 (not supported)
];
+ // For keys with "kty" equal to "OKP" (Octet Key Pair), the "crv" parameter must contain the key subtype.
+ // This library supports the following subtypes:
+ private const OKP_SUBTYPES = [
+ 'Ed25519' => true, // RFC 8037
+ ];
+
/**
* Parse a set of JWK keys
*
@@ -145,8 +151,28 @@ public static function parseKey(array $jwk, string $defaultAlg = null): ?Key
$publicKey = self::createPemFromCrvAndXYCoordinates($jwk['crv'], $jwk['x'], $jwk['y']);
return new Key($publicKey, $jwk['alg']);
+ case 'OKP':
+ if (isset($jwk['d'])) {
+ // The key is actually a private key
+ throw new UnexpectedValueException('Key data must be for a public key');
+ }
+
+ if (!isset($jwk['crv'])) {
+ throw new UnexpectedValueException('crv not set');
+ }
+
+ if (empty(self::OKP_SUBTYPES[$jwk['crv']])) {
+ throw new DomainException('Unrecognised or unsupported OKP key subtype');
+ }
+
+ if (empty($jwk['x'])) {
+ throw new UnexpectedValueException('x not set');
+ }
+
+ // This library works internally with EdDSA keys (Ed25519) encoded in standard base64.
+ $publicKey = JWT::convertBase64urlToBase64($jwk['x']);
+ return new Key($publicKey, $jwk['alg']);
default:
- // Currently only RSA is supported
break;
}
@@ -156,7 +182,7 @@ public static function parseKey(array $jwk, string $defaultAlg = null): ?Key
/**
* Converts the EC JWK values to pem format.
*
- * @param string $crv The EC curve (only P-256 is supported)
+ * @param string $crv The EC curve (only P-256 & P-384 is supported)
* @param string $x The EC x-coordinate
* @param string $y The EC y-coordinate
*
diff --git a/vendor/firebase/php-jwt/src/JWT.php b/vendor/firebase/php-jwt/src/JWT.php
index 7ffb98521..6efcbb56d 100644
--- a/vendor/firebase/php-jwt/src/JWT.php
+++ b/vendor/firebase/php-jwt/src/JWT.php
@@ -152,24 +152,30 @@ public static function decode(
// Check the nbf if it is defined. This is the time that the
// token can actually be used. If it's not yet that time, abort.
- if (isset($payload->nbf) && $payload->nbf > ($timestamp + static::$leeway)) {
- throw new BeforeValidException(
- 'Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->nbf)
+ if (isset($payload->nbf) && floor($payload->nbf) > ($timestamp + static::$leeway)) {
+ $ex = new BeforeValidException(
+ 'Cannot handle token with nbf prior to ' . \date(DateTime::ISO8601, (int) $payload->nbf)
);
+ $ex->setPayload($payload);
+ throw $ex;
}
// Check that this token has been created before 'now'. This prevents
// using tokens that have been created for later use (and haven't
// correctly used the nbf claim).
- if (!isset($payload->nbf) && isset($payload->iat) && $payload->iat > ($timestamp + static::$leeway)) {
- throw new BeforeValidException(
- 'Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->iat)
+ if (!isset($payload->nbf) && isset($payload->iat) && floor($payload->iat) > ($timestamp + static::$leeway)) {
+ $ex = new BeforeValidException(
+ 'Cannot handle token with iat prior to ' . \date(DateTime::ISO8601, (int) $payload->iat)
);
+ $ex->setPayload($payload);
+ throw $ex;
}
// Check if this token has expired.
if (isset($payload->exp) && ($timestamp - static::$leeway) >= $payload->exp) {
- throw new ExpiredException('Expired token');
+ $ex = new ExpiredException('Expired token');
+ $ex->setPayload($payload);
+ throw $ex;
}
return $payload;
@@ -220,7 +226,7 @@ public static function encode(
*
* @param string $msg The message to sign
* @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $key The secret key.
- * @param string $alg Supported algorithms are 'ES384','ES256', 'ES256K', 'HS256',
+ * @param string $alg Supported algorithms are 'EdDSA', 'ES384', 'ES256', 'ES256K', 'HS256',
* 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512'
*
* @return string An encrypted message
@@ -283,7 +289,7 @@ public static function sign(
*
* @param string $msg The original message (header and body)
* @param string $signature The original signature
- * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $keyMaterial For HS*, a string key works. for RS*, must be an instance of OpenSSLAsymmetricKey
+ * @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $keyMaterial For Ed*, ES*, HS*, a string key works. for RS*, must be an instance of OpenSSLAsymmetricKey
* @param string $alg The algorithm
*
* @return bool
@@ -404,13 +410,28 @@ public static function jsonEncode(array $input): string
* @throws InvalidArgumentException invalid base64 characters
*/
public static function urlsafeB64Decode(string $input): string
+ {
+ return \base64_decode(self::convertBase64UrlToBase64($input));
+ }
+
+ /**
+ * Convert a string in the base64url (URL-safe Base64) encoding to standard base64.
+ *
+ * @param string $input A Base64 encoded string with URL-safe characters (-_ and no padding)
+ *
+ * @return string A Base64 encoded string with standard characters (+/) and padding (=), when
+ * needed.
+ *
+ * @see https://www.rfc-editor.org/rfc/rfc4648
+ */
+ public static function convertBase64UrlToBase64(string $input): string
{
$remainder = \strlen($input) % 4;
if ($remainder) {
$padlen = 4 - $remainder;
$input .= \str_repeat('=', $padlen);
}
- return \base64_decode(\strtr($input, '-_', '+/'));
+ return \strtr($input, '-_', '+/');
}
/**
diff --git a/vendor/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php b/vendor/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php
new file mode 100644
index 000000000..7933ed68b
--- /dev/null
+++ b/vendor/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php
@@ -0,0 +1,20 @@
+pathPrefix = null;
-
- return;
- }
-
- $this->pathPrefix = rtrim($prefix, '\\/') . $this->pathSeparator;
- }
-
- /**
- * Get the path prefix.
- *
- * @return string|null path prefix or null if pathPrefix is empty
- */
- public function getPathPrefix()
- {
- return $this->pathPrefix;
- }
-
- /**
- * Prefix a path.
- *
- * @param string $path
- *
- * @return string prefixed path
- */
- public function applyPathPrefix($path)
- {
- return $this->getPathPrefix() . ltrim($path, '\\/');
- }
-
- /**
- * Remove a path prefix.
- *
- * @param string $path
- *
- * @return string path without the prefix
- */
- public function removePathPrefix($path)
- {
- return substr($path, strlen((string) $this->getPathPrefix()));
- }
-}
diff --git a/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php b/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php
deleted file mode 100644
index 25d949ead..000000000
--- a/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php
+++ /dev/null
@@ -1,705 +0,0 @@
-safeStorage = new SafeStorage();
- $this->setConfig($config);
- }
-
- /**
- * Set the config.
- *
- * @param array $config
- *
- * @return $this
- */
- public function setConfig(array $config)
- {
- foreach ($this->configurable as $setting) {
- if ( ! isset($config[$setting])) {
- continue;
- }
-
- $method = 'set' . ucfirst($setting);
-
- if (method_exists($this, $method)) {
- $this->$method($config[$setting]);
- }
- }
-
- return $this;
- }
-
- /**
- * Returns the host.
- *
- * @return string
- */
- public function getHost()
- {
- return $this->host;
- }
-
- /**
- * Set the host.
- *
- * @param string $host
- *
- * @return $this
- */
- public function setHost($host)
- {
- $this->host = $host;
-
- return $this;
- }
-
- /**
- * Set the public permission value.
- *
- * @param int $permPublic
- *
- * @return $this
- */
- public function setPermPublic($permPublic)
- {
- $this->permPublic = $permPublic;
-
- return $this;
- }
-
- /**
- * Set the private permission value.
- *
- * @param int $permPrivate
- *
- * @return $this
- */
- public function setPermPrivate($permPrivate)
- {
- $this->permPrivate = $permPrivate;
-
- return $this;
- }
-
- /**
- * Returns the ftp port.
- *
- * @return int
- */
- public function getPort()
- {
- return $this->port;
- }
-
- /**
- * Returns the root folder to work from.
- *
- * @return string
- */
- public function getRoot()
- {
- return $this->root;
- }
-
- /**
- * Set the ftp port.
- *
- * @param int|string $port
- *
- * @return $this
- */
- public function setPort($port)
- {
- $this->port = (int) $port;
-
- return $this;
- }
-
- /**
- * Set the root folder to work from.
- *
- * @param string $root
- *
- * @return $this
- */
- public function setRoot($root)
- {
- $this->root = rtrim($root, '\\/') . $this->separator;
-
- return $this;
- }
-
- /**
- * Returns the ftp username.
- *
- * @return string username
- */
- public function getUsername()
- {
- $username = $this->safeStorage->retrieveSafely('username');
-
- return $username !== null ? $username : 'anonymous';
- }
-
- /**
- * Set ftp username.
- *
- * @param string $username
- *
- * @return $this
- */
- public function setUsername($username)
- {
- $this->safeStorage->storeSafely('username', $username);
-
- return $this;
- }
-
- /**
- * Returns the password.
- *
- * @return string password
- */
- public function getPassword()
- {
- return $this->safeStorage->retrieveSafely('password');
- }
-
- /**
- * Set the ftp password.
- *
- * @param string $password
- *
- * @return $this
- */
- public function setPassword($password)
- {
- $this->safeStorage->storeSafely('password', $password);
-
- return $this;
- }
-
- /**
- * Returns the amount of seconds before the connection will timeout.
- *
- * @return int
- */
- public function getTimeout()
- {
- return $this->timeout;
- }
-
- /**
- * Set the amount of seconds before the connection should timeout.
- *
- * @param int $timeout
- *
- * @return $this
- */
- public function setTimeout($timeout)
- {
- $this->timeout = (int) $timeout;
-
- return $this;
- }
-
- /**
- * Return the FTP system type.
- *
- * @return string
- */
- public function getSystemType()
- {
- return $this->systemType;
- }
-
- /**
- * Set the FTP system type (windows or unix).
- *
- * @param string $systemType
- *
- * @return $this
- */
- public function setSystemType($systemType)
- {
- $this->systemType = strtolower($systemType);
-
- return $this;
- }
-
- /**
- * True to enable timestamps for FTP servers that return unix-style listings.
- *
- * @param bool $bool
- *
- * @return $this
- */
- public function setEnableTimestampsOnUnixListings($bool = false)
- {
- $this->enableTimestampsOnUnixListings = $bool;
-
- return $this;
- }
-
- /**
- * @inheritdoc
- */
- public function listContents($directory = '', $recursive = false)
- {
- return $this->listDirectoryContents($directory, $recursive);
- }
-
- abstract protected function listDirectoryContents($directory, $recursive = false);
-
- /**
- * Normalize a directory listing.
- *
- * @param array $listing
- * @param string $prefix
- *
- * @return array directory listing
- */
- protected function normalizeListing(array $listing, $prefix = '')
- {
- $base = $prefix;
- $result = [];
- $listing = $this->removeDotDirectories($listing);
-
- while ($item = array_shift($listing)) {
- if (preg_match('#^.*:$#', $item)) {
- $base = preg_replace('~^\./*|:$~', '', $item);
- continue;
- }
-
- $result[] = $this->normalizeObject($item, $base);
- }
-
- return $this->sortListing($result);
- }
-
- /**
- * Sort a directory listing.
- *
- * @param array $result
- *
- * @return array sorted listing
- */
- protected function sortListing(array $result)
- {
- $compare = function ($one, $two) {
- return strnatcmp($one['path'], $two['path']);
- };
-
- usort($result, $compare);
-
- return $result;
- }
-
- /**
- * Normalize a file entry.
- *
- * @param string $item
- * @param string $base
- *
- * @return array normalized file array
- *
- * @throws NotSupportedException
- */
- protected function normalizeObject($item, $base)
- {
- $systemType = $this->systemType ?: $this->detectSystemType($item);
-
- if ($systemType === 'unix') {
- return $this->normalizeUnixObject($item, $base);
- } elseif ($systemType === 'windows') {
- return $this->normalizeWindowsObject($item, $base);
- }
-
- throw NotSupportedException::forFtpSystemType($systemType);
- }
-
- /**
- * Normalize a Unix file entry.
- *
- * Given $item contains:
- * '-rw-r--r-- 1 ftp ftp 409 Aug 19 09:01 file1.txt'
- *
- * This function will return:
- * [
- * 'type' => 'file',
- * 'path' => 'file1.txt',
- * 'visibility' => 'public',
- * 'size' => 409,
- * 'timestamp' => 1566205260
- * ]
- *
- * @param string $item
- * @param string $base
- *
- * @return array normalized file array
- */
- protected function normalizeUnixObject($item, $base)
- {
- $item = preg_replace('#\s+#', ' ', trim($item), 7);
-
- if (count(explode(' ', $item, 9)) !== 9) {
- throw new RuntimeException("Metadata can't be parsed from item '$item' , not enough parts.");
- }
-
- list($permissions, /* $number */, /* $owner */, /* $group */, $size, $month, $day, $timeOrYear, $name) = explode(' ', $item, 9);
- $type = $this->detectType($permissions);
- $path = $base === '' ? $name : $base . $this->separator . $name;
-
- if ($type === 'dir') {
- $result = compact('type', 'path');
- if ($this->enableTimestampsOnUnixListings) {
- $timestamp = $this->normalizeUnixTimestamp($month, $day, $timeOrYear);
- $result += compact('timestamp');
- }
-
- return $result;
- }
-
- $permissions = $this->normalizePermissions($permissions);
- $visibility = $permissions & 0044 ? AdapterInterface::VISIBILITY_PUBLIC : AdapterInterface::VISIBILITY_PRIVATE;
- $size = (int) $size;
-
- $result = compact('type', 'path', 'visibility', 'size');
- if ($this->enableTimestampsOnUnixListings) {
- $timestamp = $this->normalizeUnixTimestamp($month, $day, $timeOrYear);
- $result += compact('timestamp');
- }
-
- return $result;
- }
-
- /**
- * Only accurate to the minute (current year), or to the day.
- *
- * Inadequacies in timestamp accuracy are due to limitations of the FTP 'LIST' command
- *
- * Note: The 'MLSD' command is a machine-readable replacement for 'LIST'
- * but many FTP servers do not support it :(
- *
- * @param string $month e.g. 'Aug'
- * @param string $day e.g. '19'
- * @param string $timeOrYear e.g. '09:01' OR '2015'
- *
- * @return int
- */
- protected function normalizeUnixTimestamp($month, $day, $timeOrYear)
- {
- if (is_numeric($timeOrYear)) {
- $year = $timeOrYear;
- $hour = '00';
- $minute = '00';
- $seconds = '00';
- } else {
- $year = date('Y');
- list($hour, $minute) = explode(':', $timeOrYear);
- $seconds = '00';
- }
- $dateTime = DateTime::createFromFormat('Y-M-j-G:i:s', "{$year}-{$month}-{$day}-{$hour}:{$minute}:{$seconds}");
-
- return $dateTime->getTimestamp();
- }
-
- /**
- * Normalize a Windows/DOS file entry.
- *
- * @param string $item
- * @param string $base
- *
- * @return array normalized file array
- */
- protected function normalizeWindowsObject($item, $base)
- {
- $item = preg_replace('#\s+#', ' ', trim($item), 3);
-
- if (count(explode(' ', $item, 4)) !== 4) {
- throw new RuntimeException("Metadata can't be parsed from item '$item' , not enough parts.");
- }
-
- list($date, $time, $size, $name) = explode(' ', $item, 4);
- $path = $base === '' ? $name : $base . $this->separator . $name;
-
- // Check for the correct date/time format
- $format = strlen($date) === 8 ? 'm-d-yH:iA' : 'Y-m-dH:i';
- $dt = DateTime::createFromFormat($format, $date . $time);
- $timestamp = $dt ? $dt->getTimestamp() : (int) strtotime("$date $time");
-
- if ($size === '') {
- $type = 'dir';
-
- return compact('type', 'path', 'timestamp');
- }
-
- $type = 'file';
- $visibility = AdapterInterface::VISIBILITY_PUBLIC;
- $size = (int) $size;
-
- return compact('type', 'path', 'visibility', 'size', 'timestamp');
- }
-
- /**
- * Get the system type from a listing item.
- *
- * @param string $item
- *
- * @return string the system type
- */
- protected function detectSystemType($item)
- {
- return preg_match('/^[0-9]{2,4}-[0-9]{2}-[0-9]{2}/', trim($item)) ? 'windows' : 'unix';
- }
-
- /**
- * Get the file type from the permissions.
- *
- * @param string $permissions
- *
- * @return string file type
- */
- protected function detectType($permissions)
- {
- return substr($permissions, 0, 1) === 'd' ? 'dir' : 'file';
- }
-
- /**
- * Normalize a permissions string.
- *
- * @param string $permissions
- *
- * @return int
- */
- protected function normalizePermissions($permissions)
- {
- if (is_numeric($permissions)) {
- return ((int) $permissions) & 0777;
- }
-
- // remove the type identifier
- $permissions = substr($permissions, 1);
-
- // map the string rights to the numeric counterparts
- $map = ['-' => '0', 'r' => '4', 'w' => '2', 'x' => '1'];
- $permissions = strtr($permissions, $map);
-
- // split up the permission groups
- $parts = str_split($permissions, 3);
-
- // convert the groups
- $mapper = function ($part) {
- return array_sum(str_split($part));
- };
-
- // converts to decimal number
- return octdec(implode('', array_map($mapper, $parts)));
- }
-
- /**
- * Filter out dot-directories.
- *
- * @param array $list
- *
- * @return array
- */
- public function removeDotDirectories(array $list)
- {
- $filter = function ($line) {
- return $line !== '' && ! preg_match('#.* \.(\.)?$|^total#', $line);
- };
-
- return array_filter($list, $filter);
- }
-
- /**
- * @inheritdoc
- */
- public function has($path)
- {
- return $this->getMetadata($path);
- }
-
- /**
- * @inheritdoc
- */
- public function getSize($path)
- {
- return $this->getMetadata($path);
- }
-
- /**
- * @inheritdoc
- */
- public function getVisibility($path)
- {
- return $this->getMetadata($path);
- }
-
- /**
- * Ensure a directory exists.
- *
- * @param string $dirname
- */
- public function ensureDirectory($dirname)
- {
- $dirname = (string) $dirname;
-
- if ($dirname !== '' && ! $this->has($dirname)) {
- $this->createDir($dirname, new Config());
- }
- }
-
- /**
- * @return mixed
- */
- public function getConnection()
- {
- if ( ! $this->isConnected()) {
- $this->disconnect();
- $this->connect();
- }
-
- return $this->connection;
- }
-
- /**
- * Get the public permission value.
- *
- * @return int
- */
- public function getPermPublic()
- {
- return $this->permPublic;
- }
-
- /**
- * Get the private permission value.
- *
- * @return int
- */
- public function getPermPrivate()
- {
- return $this->permPrivate;
- }
-
- /**
- * Disconnect on destruction.
- */
- public function __destruct()
- {
- $this->disconnect();
- }
-
- /**
- * Establish a connection.
- */
- abstract public function connect();
-
- /**
- * Close the connection.
- */
- abstract public function disconnect();
-
- /**
- * Check if a connection is active.
- *
- * @return bool
- */
- abstract public function isConnected();
-
- protected function escapePath($path)
- {
- return str_replace(['*', '[', ']'], ['\\*', '\\[', '\\]'], $path);
- }
-}
diff --git a/vendor/league/flysystem/src/Adapter/CanOverwriteFiles.php b/vendor/league/flysystem/src/Adapter/CanOverwriteFiles.php
deleted file mode 100644
index fd8d2161e..000000000
--- a/vendor/league/flysystem/src/Adapter/CanOverwriteFiles.php
+++ /dev/null
@@ -1,12 +0,0 @@
-transferMode = $mode;
-
- return $this;
- }
-
- /**
- * Set if Ssl is enabled.
- *
- * @param bool $ssl
- *
- * @return $this
- */
- public function setSsl($ssl)
- {
- $this->ssl = (bool) $ssl;
-
- return $this;
- }
-
- /**
- * Set if passive mode should be used.
- *
- * @param bool $passive
- */
- public function setPassive($passive = true)
- {
- $this->passive = $passive;
- }
-
- /**
- * @param bool $ignorePassiveAddress
- */
- public function setIgnorePassiveAddress($ignorePassiveAddress)
- {
- $this->ignorePassiveAddress = $ignorePassiveAddress;
- }
-
- /**
- * @param bool $recurseManually
- */
- public function setRecurseManually($recurseManually)
- {
- $this->recurseManually = $recurseManually;
- }
-
- /**
- * @param bool $utf8
- */
- public function setUtf8($utf8)
- {
- $this->utf8 = (bool) $utf8;
- }
-
- /**
- * Connect to the FTP server.
- */
- public function connect()
- {
- $tries = 3;
- start_connecting:
-
- if ($this->ssl) {
- $this->connection = @ftp_ssl_connect($this->getHost(), $this->getPort(), $this->getTimeout());
- } else {
- $this->connection = @ftp_connect($this->getHost(), $this->getPort(), $this->getTimeout());
- }
-
- if ( ! $this->connection) {
- $tries--;
-
- if ($tries > 0) goto start_connecting;
-
- throw new ConnectionRuntimeException('Could not connect to host: ' . $this->getHost() . ', port:' . $this->getPort());
- }
-
- $this->login();
- $this->setUtf8Mode();
- $this->setConnectionPassiveMode();
- $this->setConnectionRoot();
- $this->isPureFtpd = $this->isPureFtpdServer();
- }
-
- /**
- * Set the connection to UTF-8 mode.
- */
- protected function setUtf8Mode()
- {
- if ($this->utf8) {
- $response = ftp_raw($this->connection, "OPTS UTF8 ON");
- if (!in_array(substr($response[0], 0, 3), ['200', '202'])) {
- throw new ConnectionRuntimeException(
- 'Could not set UTF-8 mode for connection: ' . $this->getHost() . '::' . $this->getPort()
- );
- }
- }
- }
-
- /**
- * Set the connections to passive mode.
- *
- * @throws ConnectionRuntimeException
- */
- protected function setConnectionPassiveMode()
- {
- if (is_bool($this->ignorePassiveAddress) && defined('FTP_USEPASVADDRESS')) {
- ftp_set_option($this->connection, FTP_USEPASVADDRESS, ! $this->ignorePassiveAddress);
- }
-
- if ( ! ftp_pasv($this->connection, $this->passive)) {
- throw new ConnectionRuntimeException(
- 'Could not set passive mode for connection: ' . $this->getHost() . '::' . $this->getPort()
- );
- }
- }
-
- /**
- * Set the connection root.
- */
- protected function setConnectionRoot()
- {
- $root = $this->getRoot();
- $connection = $this->connection;
-
- if ($root && ! ftp_chdir($connection, $root)) {
- throw new InvalidRootException('Root is invalid or does not exist: ' . $this->getRoot());
- }
-
- // Store absolute path for further reference.
- // This is needed when creating directories and
- // initial root was a relative path, else the root
- // would be relative to the chdir'd path.
- $this->root = ftp_pwd($connection);
- }
-
- /**
- * Login.
- *
- * @throws ConnectionRuntimeException
- */
- protected function login()
- {
- set_error_handler(function () {
- });
- $isLoggedIn = ftp_login(
- $this->connection,
- $this->getUsername(),
- $this->getPassword()
- );
- restore_error_handler();
-
- if ( ! $isLoggedIn) {
- $this->disconnect();
- throw new ConnectionRuntimeException(
- 'Could not login with connection: ' . $this->getHost() . '::' . $this->getPort(
- ) . ', username: ' . $this->getUsername()
- );
- }
- }
-
- /**
- * Disconnect from the FTP server.
- */
- public function disconnect()
- {
- if ($this->hasFtpConnection()) {
- @ftp_close($this->connection);
- }
-
- $this->connection = null;
- }
-
- /**
- * @inheritdoc
- */
- public function write($path, $contents, Config $config)
- {
- $stream = fopen('php://temp', 'w+b');
- fwrite($stream, $contents);
- rewind($stream);
- $result = $this->writeStream($path, $stream, $config);
- fclose($stream);
-
- if ($result === false) {
- return false;
- }
-
- $result['contents'] = $contents;
- $result['mimetype'] = $config->get('mimetype') ?: Util::guessMimeType($path, $contents);
-
- return $result;
- }
-
- /**
- * @inheritdoc
- */
- public function writeStream($path, $resource, Config $config)
- {
- $this->ensureDirectory(Util::dirname($path));
-
- if ( ! ftp_fput($this->getConnection(), $path, $resource, $this->transferMode)) {
- return false;
- }
-
- if ($visibility = $config->get('visibility')) {
- $this->setVisibility($path, $visibility);
- }
-
- $type = 'file';
-
- return compact('type', 'path', 'visibility');
- }
-
- /**
- * @inheritdoc
- */
- public function update($path, $contents, Config $config)
- {
- return $this->write($path, $contents, $config);
- }
-
- /**
- * @inheritdoc
- */
- public function updateStream($path, $resource, Config $config)
- {
- return $this->writeStream($path, $resource, $config);
- }
-
- /**
- * @inheritdoc
- */
- public function rename($path, $newpath)
- {
- return ftp_rename($this->getConnection(), $path, $newpath);
- }
-
- /**
- * @inheritdoc
- */
- public function delete($path)
- {
- return ftp_delete($this->getConnection(), $path);
- }
-
- /**
- * @inheritdoc
- */
- public function deleteDir($dirname)
- {
- $connection = $this->getConnection();
- $contents = array_reverse($this->listDirectoryContents($dirname, false));
-
- foreach ($contents as $object) {
- if ($object['type'] === 'file') {
- if ( ! ftp_delete($connection, $object['path'])) {
- return false;
- }
- } elseif ( ! $this->deleteDir($object['path'])) {
- return false;
- }
- }
-
- return ftp_rmdir($connection, $dirname);
- }
-
- /**
- * @inheritdoc
- */
- public function createDir($dirname, Config $config)
- {
- $connection = $this->getConnection();
- $directories = explode('/', $dirname);
-
- foreach ($directories as $directory) {
- if (false === $this->createActualDirectory($directory, $connection)) {
- $this->setConnectionRoot();
-
- return false;
- }
-
- ftp_chdir($connection, $directory);
- }
-
- $this->setConnectionRoot();
-
- return ['type' => 'dir', 'path' => $dirname];
- }
-
- /**
- * Create a directory.
- *
- * @param string $directory
- * @param resource $connection
- *
- * @return bool
- */
- protected function createActualDirectory($directory, $connection)
- {
- // List the current directory
- $listing = ftp_nlist($connection, '.') ?: [];
-
- foreach ($listing as $key => $item) {
- if (preg_match('~^\./.*~', $item)) {
- $listing[$key] = substr($item, 2);
- }
- }
-
- if (in_array($directory, $listing, true)) {
- return true;
- }
-
- return (boolean) ftp_mkdir($connection, $directory);
- }
-
- /**
- * @inheritdoc
- */
- public function getMetadata($path)
- {
- if ($path === '') {
- return ['type' => 'dir', 'path' => ''];
- }
-
- if (@ftp_chdir($this->getConnection(), $path) === true) {
- $this->setConnectionRoot();
-
- return ['type' => 'dir', 'path' => $path];
- }
-
- $listing = $this->ftpRawlist('-A', $path);
-
- if (empty($listing) || in_array('total 0', $listing, true)) {
- return false;
- }
-
- if (preg_match('/.* not found/', $listing[0])) {
- return false;
- }
-
- if (preg_match('/^total [0-9]*$/', $listing[0])) {
- array_shift($listing);
- }
-
- return $this->normalizeObject($listing[0], '');
- }
-
- /**
- * @inheritdoc
- */
- public function getMimetype($path)
- {
- if ( ! $metadata = $this->getMetadata($path)) {
- return false;
- }
-
- $metadata['mimetype'] = MimeType::detectByFilename($path);
-
- return $metadata;
- }
-
- /**
- * @inheritdoc
- */
- public function getTimestamp($path)
- {
- $timestamp = ftp_mdtm($this->getConnection(), $path);
-
- return ($timestamp !== -1) ? ['path' => $path, 'timestamp' => $timestamp] : false;
- }
-
- /**
- * @inheritdoc
- */
- public function read($path)
- {
- if ( ! $object = $this->readStream($path)) {
- return false;
- }
-
- $object['contents'] = stream_get_contents($object['stream']);
- fclose($object['stream']);
- unset($object['stream']);
-
- return $object;
- }
-
- /**
- * @inheritdoc
- */
- public function readStream($path)
- {
- $stream = fopen('php://temp', 'w+b');
- $result = ftp_fget($this->getConnection(), $stream, $path, $this->transferMode);
- rewind($stream);
-
- if ( ! $result) {
- fclose($stream);
-
- return false;
- }
-
- return ['type' => 'file', 'path' => $path, 'stream' => $stream];
- }
-
- /**
- * @inheritdoc
- */
- public function setVisibility($path, $visibility)
- {
- $mode = $visibility === AdapterInterface::VISIBILITY_PUBLIC ? $this->getPermPublic() : $this->getPermPrivate();
-
- if ( ! ftp_chmod($this->getConnection(), $mode, $path)) {
- return false;
- }
-
- return compact('path', 'visibility');
- }
-
- /**
- * @inheritdoc
- *
- * @param string $directory
- */
- protected function listDirectoryContents($directory, $recursive = true)
- {
- if ($recursive && $this->recurseManually) {
- return $this->listDirectoryContentsRecursive($directory);
- }
-
- $options = $recursive ? '-alnR' : '-aln';
- $listing = $this->ftpRawlist($options, $directory);
-
- return $listing ? $this->normalizeListing($listing, $directory) : [];
- }
-
- /**
- * @inheritdoc
- *
- * @param string $directory
- */
- protected function listDirectoryContentsRecursive($directory)
- {
- $listing = $this->normalizeListing($this->ftpRawlist('-aln', $directory) ?: [], $directory);
- $output = [];
-
- foreach ($listing as $item) {
- $output[] = $item;
- if ($item['type'] !== 'dir') {
- continue;
- }
- $output = array_merge($output, $this->listDirectoryContentsRecursive($item['path']));
- }
-
- return $output;
- }
-
- /**
- * Check if the connection is open.
- *
- * @return bool
- *
- * @throws ConnectionErrorException
- */
- public function isConnected()
- {
- return $this->hasFtpConnection() && $this->getRawExecResponseCode('NOOP') === 200;
- }
-
- /**
- * @return bool
- */
- protected function isPureFtpdServer()
- {
- $response = ftp_raw($this->connection, 'HELP');
-
- return stripos(implode(' ', $response), 'Pure-FTPd') !== false;
- }
-
- /**
- * The ftp_rawlist function with optional escaping.
- *
- * @param string $options
- * @param string $path
- *
- * @return array
- */
- protected function ftpRawlist($options, $path)
- {
- $connection = $this->getConnection();
-
- if ($this->isPureFtpd) {
- $path = str_replace([' ', '[', ']'], ['\ ', '\\[', '\\]'], $path);
- }
-
- return ftp_rawlist($connection, $options . ' ' . $this->escapePath($path));
- }
-
- private function getRawExecResponseCode($command)
- {
- $response = @ftp_raw($this->connection, trim($command)) ?: [];
-
- return (int) preg_replace('/\D/', '', implode(' ', (array) $response));
- }
-
- private function hasFtpConnection(): bool
- {
- return is_resource($this->connection) || $this->connection instanceof \FTP\Connection;
- }
-}
diff --git a/vendor/league/flysystem/src/Adapter/Ftpd.php b/vendor/league/flysystem/src/Adapter/Ftpd.php
deleted file mode 100644
index 7e71d19f6..000000000
--- a/vendor/league/flysystem/src/Adapter/Ftpd.php
+++ /dev/null
@@ -1,48 +0,0 @@
- 'dir', 'path' => ''];
- }
-
- if (@ftp_chdir($this->getConnection(), $path) === true) {
- $this->setConnectionRoot();
-
- return ['type' => 'dir', 'path' => $path];
- }
-
- $object = ftp_raw($this->getConnection(), 'STAT ' . $this->escapePath($path));
-
- if ( ! $object || count($object) < 3) {
- return false;
- }
-
- if (substr($object[1], 0, 5) === "ftpd:") {
- return false;
- }
-
- return $this->normalizeObject($object[1], '');
- }
-
- /**
- * @inheritdoc
- */
- protected function listDirectoryContents($directory, $recursive = true)
- {
- $listing = ftp_rawlist($this->getConnection(), $this->escapePath($directory), $recursive);
-
- if ($listing === false || ( ! empty($listing) && substr($listing[0], 0, 5) === "ftpd:")) {
- return [];
- }
-
- return $this->normalizeListing($listing, $directory);
- }
-}
diff --git a/vendor/league/flysystem/src/Adapter/Local.php b/vendor/league/flysystem/src/Adapter/Local.php
deleted file mode 100644
index 747c463ec..000000000
--- a/vendor/league/flysystem/src/Adapter/Local.php
+++ /dev/null
@@ -1,533 +0,0 @@
- [
- 'public' => 0644,
- 'private' => 0600,
- ],
- 'dir' => [
- 'public' => 0755,
- 'private' => 0700,
- ],
- ];
-
- /**
- * @var string
- */
- protected $pathSeparator = DIRECTORY_SEPARATOR;
-
- /**
- * @var array
- */
- protected $permissionMap;
-
- /**
- * @var int
- */
- protected $writeFlags;
-
- /**
- * @var int
- */
- private $linkHandling;
-
- /**
- * Constructor.
- *
- * @param string $root
- * @param int $writeFlags
- * @param int $linkHandling
- * @param array $permissions
- *
- * @throws LogicException
- */
- public function __construct($root, $writeFlags = LOCK_EX, $linkHandling = self::DISALLOW_LINKS, array $permissions = [])
- {
- $root = is_link($root) ? realpath($root) : $root;
- $this->permissionMap = array_replace_recursive(static::$permissions, $permissions);
- $this->ensureDirectory($root);
-
- if ( ! is_dir($root) || ! is_readable($root)) {
- throw new LogicException('The root path ' . $root . ' is not readable.');
- }
-
- $this->setPathPrefix($root);
- $this->writeFlags = $writeFlags;
- $this->linkHandling = $linkHandling;
- }
-
- /**
- * Ensure the root directory exists.
- *
- * @param string $root root directory path
- *
- * @return void
- *
- * @throws Exception in case the root directory can not be created
- */
- protected function ensureDirectory($root)
- {
- if ( ! is_dir($root)) {
- $umask = umask(0);
-
- if ( ! @mkdir($root, $this->permissionMap['dir']['public'], true)) {
- $mkdirError = error_get_last();
- }
-
- umask($umask);
- clearstatcache(false, $root);
-
- if ( ! is_dir($root)) {
- $errorMessage = isset($mkdirError['message']) ? $mkdirError['message'] : '';
- throw new Exception(sprintf('Impossible to create the root directory "%s". %s', $root, $errorMessage));
- }
- }
- }
-
- /**
- * @inheritdoc
- */
- public function has($path)
- {
- $location = $this->applyPathPrefix($path);
-
- return file_exists($location);
- }
-
- /**
- * @inheritdoc
- */
- public function write($path, $contents, Config $config)
- {
- $location = $this->applyPathPrefix($path);
- $this->ensureDirectory(dirname($location));
-
- if (($size = file_put_contents($location, $contents, $this->writeFlags)) === false) {
- return false;
- }
-
- $type = 'file';
- $result = compact('contents', 'type', 'size', 'path');
-
- if ($visibility = $config->get('visibility')) {
- $result['visibility'] = $visibility;
- $this->setVisibility($path, $visibility);
- }
-
- return $result;
- }
-
- /**
- * @inheritdoc
- */
- public function writeStream($path, $resource, Config $config)
- {
- $location = $this->applyPathPrefix($path);
- $this->ensureDirectory(dirname($location));
- $stream = fopen($location, 'w+b');
-
- if ( ! $stream || stream_copy_to_stream($resource, $stream) === false || ! fclose($stream)) {
- return false;
- }
-
- $type = 'file';
- $result = compact('type', 'path');
-
- if ($visibility = $config->get('visibility')) {
- $this->setVisibility($path, $visibility);
- $result['visibility'] = $visibility;
- }
-
- return $result;
- }
-
- /**
- * @inheritdoc
- */
- public function readStream($path)
- {
- $location = $this->applyPathPrefix($path);
- $stream = fopen($location, 'rb');
-
- return ['type' => 'file', 'path' => $path, 'stream' => $stream];
- }
-
- /**
- * @inheritdoc
- */
- public function updateStream($path, $resource, Config $config)
- {
- return $this->writeStream($path, $resource, $config);
- }
-
- /**
- * @inheritdoc
- */
- public function update($path, $contents, Config $config)
- {
- $location = $this->applyPathPrefix($path);
- $size = file_put_contents($location, $contents, $this->writeFlags);
-
- if ($size === false) {
- return false;
- }
-
- $type = 'file';
-
- $result = compact('type', 'path', 'size', 'contents');
-
- if ($visibility = $config->get('visibility')) {
- $this->setVisibility($path, $visibility);
- $result['visibility'] = $visibility;
- }
-
- return $result;
- }
-
- /**
- * @inheritdoc
- */
- public function read($path)
- {
- $location = $this->applyPathPrefix($path);
- $contents = @file_get_contents($location);
-
- if ($contents === false) {
- return false;
- }
-
- return ['type' => 'file', 'path' => $path, 'contents' => $contents];
- }
-
- /**
- * @inheritdoc
- */
- public function rename($path, $newpath)
- {
- $location = $this->applyPathPrefix($path);
- $destination = $this->applyPathPrefix($newpath);
- $parentDirectory = $this->applyPathPrefix(Util::dirname($newpath));
- $this->ensureDirectory($parentDirectory);
-
- return rename($location, $destination);
- }
-
- /**
- * @inheritdoc
- */
- public function copy($path, $newpath)
- {
- $location = $this->applyPathPrefix($path);
- $destination = $this->applyPathPrefix($newpath);
- $this->ensureDirectory(dirname($destination));
-
- return copy($location, $destination);
- }
-
- /**
- * @inheritdoc
- */
- public function delete($path)
- {
- $location = $this->applyPathPrefix($path);
-
- return @unlink($location);
- }
-
- /**
- * @inheritdoc
- */
- public function listContents($directory = '', $recursive = false)
- {
- $result = [];
- $location = $this->applyPathPrefix($directory);
-
- if ( ! is_dir($location)) {
- return [];
- }
-
- $iterator = $recursive ? $this->getRecursiveDirectoryIterator($location) : $this->getDirectoryIterator($location);
-
- foreach ($iterator as $file) {
- $path = $this->getFilePath($file);
-
- if (preg_match('#(^|/|\\\\)\.{1,2}$#', $path)) {
- continue;
- }
-
- $result[] = $this->normalizeFileInfo($file);
- }
-
- unset($iterator);
-
- return array_filter($result);
- }
-
- /**
- * @inheritdoc
- */
- public function getMetadata($path)
- {
- $location = $this->applyPathPrefix($path);
- clearstatcache(false, $location);
- $info = new SplFileInfo($location);
-
- return $this->normalizeFileInfo($info);
- }
-
- /**
- * @inheritdoc
- */
- public function getSize($path)
- {
- return $this->getMetadata($path);
- }
-
- /**
- * @inheritdoc
- */
- public function getMimetype($path)
- {
- $location = $this->applyPathPrefix($path);
- $finfo = new Finfo(FILEINFO_MIME_TYPE);
- $mimetype = $finfo->file($location);
-
- if (in_array($mimetype, ['application/octet-stream', 'inode/x-empty', 'application/x-empty'])) {
- $mimetype = Util\MimeType::detectByFilename($location);
- }
-
- return ['path' => $path, 'type' => 'file', 'mimetype' => $mimetype];
- }
-
- /**
- * @inheritdoc
- */
- public function getTimestamp($path)
- {
- return $this->getMetadata($path);
- }
-
- /**
- * @inheritdoc
- */
- public function getVisibility($path)
- {
- $location = $this->applyPathPrefix($path);
- clearstatcache(false, $location);
- $permissions = octdec(substr(sprintf('%o', fileperms($location)), -4));
- $type = is_dir($location) ? 'dir' : 'file';
-
- foreach ($this->permissionMap[$type] as $visibility => $visibilityPermissions) {
- if ($visibilityPermissions == $permissions) {
- return compact('path', 'visibility');
- }
- }
-
- $visibility = substr(sprintf('%o', fileperms($location)), -4);
-
- return compact('path', 'visibility');
- }
-
- /**
- * @inheritdoc
- */
- public function setVisibility($path, $visibility)
- {
- $location = $this->applyPathPrefix($path);
- $type = is_dir($location) ? 'dir' : 'file';
- $success = chmod($location, $this->permissionMap[$type][$visibility]);
-
- if ($success === false) {
- return false;
- }
-
- return compact('path', 'visibility');
- }
-
- /**
- * @inheritdoc
- */
- public function createDir($dirname, Config $config)
- {
- $location = $this->applyPathPrefix($dirname);
- $umask = umask(0);
- $visibility = $config->get('visibility', 'public');
- $return = ['path' => $dirname, 'type' => 'dir'];
-
- if ( ! is_dir($location)) {
- if (false === @mkdir($location, $this->permissionMap['dir'][$visibility], true)
- || false === is_dir($location)) {
- $return = false;
- }
- }
-
- umask($umask);
-
- return $return;
- }
-
- /**
- * @inheritdoc
- */
- public function deleteDir($dirname)
- {
- $location = $this->applyPathPrefix($dirname);
-
- if ( ! is_dir($location)) {
- return false;
- }
-
- $contents = $this->getRecursiveDirectoryIterator($location, RecursiveIteratorIterator::CHILD_FIRST);
-
- /** @var SplFileInfo $file */
- foreach ($contents as $file) {
- $this->guardAgainstUnreadableFileInfo($file);
- $this->deleteFileInfoObject($file);
- }
-
- unset($contents);
-
- return rmdir($location);
- }
-
- /**
- * @param SplFileInfo $file
- */
- protected function deleteFileInfoObject(SplFileInfo $file)
- {
- switch ($file->getType()) {
- case 'dir':
- rmdir($file->getRealPath());
- break;
- case 'link':
- unlink($file->getPathname());
- break;
- default:
- unlink($file->getRealPath());
- }
- }
-
- /**
- * Normalize the file info.
- *
- * @param SplFileInfo $file
- *
- * @return array|void
- *
- * @throws NotSupportedException
- */
- protected function normalizeFileInfo(SplFileInfo $file)
- {
- if ( ! $file->isLink()) {
- return $this->mapFileInfo($file);
- }
-
- if ($this->linkHandling & self::DISALLOW_LINKS) {
- throw NotSupportedException::forLink($file);
- }
- }
-
- /**
- * Get the normalized path from a SplFileInfo object.
- *
- * @param SplFileInfo $file
- *
- * @return string
- */
- protected function getFilePath(SplFileInfo $file)
- {
- $location = $file->getPathname();
- $path = $this->removePathPrefix($location);
-
- return trim(str_replace('\\', '/', $path), '/');
- }
-
- /**
- * @param string $path
- * @param int $mode
- *
- * @return RecursiveIteratorIterator
- */
- protected function getRecursiveDirectoryIterator($path, $mode = RecursiveIteratorIterator::SELF_FIRST)
- {
- return new RecursiveIteratorIterator(
- new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS),
- $mode
- );
- }
-
- /**
- * @param string $path
- *
- * @return DirectoryIterator
- */
- protected function getDirectoryIterator($path)
- {
- $iterator = new DirectoryIterator($path);
-
- return $iterator;
- }
-
- /**
- * @param SplFileInfo $file
- *
- * @return array
- */
- protected function mapFileInfo(SplFileInfo $file)
- {
- $normalized = [
- 'type' => $file->getType(),
- 'path' => $this->getFilePath($file),
- ];
-
- $normalized['timestamp'] = $file->getMTime();
-
- if ($normalized['type'] === 'file') {
- $normalized['size'] = $file->getSize();
- }
-
- return $normalized;
- }
-
- /**
- * @param SplFileInfo $file
- *
- * @throws UnreadableFileException
- */
- protected function guardAgainstUnreadableFileInfo(SplFileInfo $file)
- {
- if ( ! $file->isReadable()) {
- throw UnreadableFileException::forFileInfo($file);
- }
- }
-}
diff --git a/vendor/league/flysystem/src/Adapter/NullAdapter.php b/vendor/league/flysystem/src/Adapter/NullAdapter.php
deleted file mode 100644
index 2527087f7..000000000
--- a/vendor/league/flysystem/src/Adapter/NullAdapter.php
+++ /dev/null
@@ -1,144 +0,0 @@
-get('visibility')) {
- $result['visibility'] = $visibility;
- }
-
- return $result;
- }
-
- /**
- * @inheritdoc
- */
- public function update($path, $contents, Config $config)
- {
- return false;
- }
-
- /**
- * @inheritdoc
- */
- public function read($path)
- {
- return false;
- }
-
- /**
- * @inheritdoc
- */
- public function rename($path, $newpath)
- {
- return false;
- }
-
- /**
- * @inheritdoc
- */
- public function delete($path)
- {
- return false;
- }
-
- /**
- * @inheritdoc
- */
- public function listContents($directory = '', $recursive = false)
- {
- return [];
- }
-
- /**
- * @inheritdoc
- */
- public function getMetadata($path)
- {
- return false;
- }
-
- /**
- * @inheritdoc
- */
- public function getSize($path)
- {
- return false;
- }
-
- /**
- * @inheritdoc
- */
- public function getMimetype($path)
- {
- return false;
- }
-
- /**
- * @inheritdoc
- */
- public function getTimestamp($path)
- {
- return false;
- }
-
- /**
- * @inheritdoc
- */
- public function getVisibility($path)
- {
- return false;
- }
-
- /**
- * @inheritdoc
- */
- public function setVisibility($path, $visibility)
- {
- return compact('visibility');
- }
-
- /**
- * @inheritdoc
- */
- public function createDir($dirname, Config $config)
- {
- return ['path' => $dirname, 'type' => 'dir'];
- }
-
- /**
- * @inheritdoc
- */
- public function deleteDir($dirname)
- {
- return false;
- }
-}
diff --git a/vendor/league/flysystem/src/Adapter/Polyfill/NotSupportingVisibilityTrait.php b/vendor/league/flysystem/src/Adapter/Polyfill/NotSupportingVisibilityTrait.php
deleted file mode 100644
index fc0a747ac..000000000
--- a/vendor/league/flysystem/src/Adapter/Polyfill/NotSupportingVisibilityTrait.php
+++ /dev/null
@@ -1,33 +0,0 @@
-readStream($path);
-
- if ($response === false || ! is_resource($response['stream'])) {
- return false;
- }
-
- $result = $this->writeStream($newpath, $response['stream'], new Config());
-
- if ($result !== false && is_resource($response['stream'])) {
- fclose($response['stream']);
- }
-
- return $result !== false;
- }
-
- // Required abstract method
-
- /**
- * @param string $path
- *
- * @return resource
- */
- abstract public function readStream($path);
-
- /**
- * @param string $path
- * @param resource $resource
- * @param Config $config
- *
- * @return resource
- */
- abstract public function writeStream($path, $resource, Config $config);
-}
diff --git a/vendor/league/flysystem/src/Adapter/Polyfill/StreamedReadingTrait.php b/vendor/league/flysystem/src/Adapter/Polyfill/StreamedReadingTrait.php
deleted file mode 100644
index 2b31c01d6..000000000
--- a/vendor/league/flysystem/src/Adapter/Polyfill/StreamedReadingTrait.php
+++ /dev/null
@@ -1,44 +0,0 @@
-read($path)) {
- return false;
- }
-
- $stream = fopen('php://temp', 'w+b');
- fwrite($stream, $data['contents']);
- rewind($stream);
- $data['stream'] = $stream;
- unset($data['contents']);
-
- return $data;
- }
-
- /**
- * Reads a file.
- *
- * @param string $path
- *
- * @return array|false
- *
- * @see League\Flysystem\ReadInterface::read()
- */
- abstract public function read($path);
-}
diff --git a/vendor/league/flysystem/src/Adapter/Polyfill/StreamedTrait.php b/vendor/league/flysystem/src/Adapter/Polyfill/StreamedTrait.php
deleted file mode 100644
index 80424960c..000000000
--- a/vendor/league/flysystem/src/Adapter/Polyfill/StreamedTrait.php
+++ /dev/null
@@ -1,9 +0,0 @@
-stream($path, $resource, $config, 'write');
- }
-
- /**
- * Update a file using a stream.
- *
- * @param string $path
- * @param resource $resource
- * @param Config $config Config object or visibility setting
- *
- * @return mixed false of file metadata
- */
- public function updateStream($path, $resource, Config $config)
- {
- return $this->stream($path, $resource, $config, 'update');
- }
-
- // Required abstract methods
- abstract public function write($pash, $contents, Config $config);
- abstract public function update($pash, $contents, Config $config);
-}
diff --git a/vendor/league/flysystem/src/Adapter/SynologyFtp.php b/vendor/league/flysystem/src/Adapter/SynologyFtp.php
deleted file mode 100644
index fe0d344cf..000000000
--- a/vendor/league/flysystem/src/Adapter/SynologyFtp.php
+++ /dev/null
@@ -1,8 +0,0 @@
-settings = $settings;
- }
-
- /**
- * Get a setting.
- *
- * @param string $key
- * @param mixed $default
- *
- * @return mixed config setting or default when not found
- */
- public function get($key, $default = null)
- {
- if ( ! array_key_exists($key, $this->settings)) {
- return $this->getDefault($key, $default);
- }
-
- return $this->settings[$key];
- }
-
- /**
- * Check if an item exists by key.
- *
- * @param string $key
- *
- * @return bool
- */
- public function has($key)
- {
- if (array_key_exists($key, $this->settings)) {
- return true;
- }
-
- return $this->fallback instanceof Config
- ? $this->fallback->has($key)
- : false;
- }
-
- /**
- * Try to retrieve a default setting from a config fallback.
- *
- * @param string $key
- * @param mixed $default
- *
- * @return mixed config setting or default when not found
- */
- protected function getDefault($key, $default)
- {
- if ( ! $this->fallback) {
- return $default;
- }
-
- return $this->fallback->get($key, $default);
- }
-
- /**
- * Set a setting.
- *
- * @param string $key
- * @param mixed $value
- *
- * @return $this
- */
- public function set($key, $value)
- {
- $this->settings[$key] = $value;
-
- return $this;
- }
-
- /**
- * Set the fallback.
- *
- * @param Config $fallback
- *
- * @return $this
- */
- public function setFallback(Config $fallback)
- {
- $this->fallback = $fallback;
-
- return $this;
- }
-}
diff --git a/vendor/league/flysystem/src/ConfigAwareTrait.php b/vendor/league/flysystem/src/ConfigAwareTrait.php
deleted file mode 100644
index 202d605da..000000000
--- a/vendor/league/flysystem/src/ConfigAwareTrait.php
+++ /dev/null
@@ -1,49 +0,0 @@
-config = $config ? Util::ensureConfig($config) : new Config;
- }
-
- /**
- * Get the Config.
- *
- * @return Config config object
- */
- public function getConfig()
- {
- return $this->config;
- }
-
- /**
- * Convert a config array to a Config object with the correct fallback.
- *
- * @param array $config
- *
- * @return Config
- */
- protected function prepareConfig(array $config)
- {
- $config = new Config($config);
- $config->setFallback($this->getConfig());
-
- return $config;
- }
-}
diff --git a/vendor/league/flysystem/src/ConnectionErrorException.php b/vendor/league/flysystem/src/ConnectionErrorException.php
deleted file mode 100644
index adb651d3d..000000000
--- a/vendor/league/flysystem/src/ConnectionErrorException.php
+++ /dev/null
@@ -1,9 +0,0 @@
-filesystem->deleteDir($this->path);
- }
-
- /**
- * List the directory contents.
- *
- * @param bool $recursive
- *
- * @return array|bool directory contents or false
- */
- public function getContents($recursive = false)
- {
- return $this->filesystem->listContents($this->path, $recursive);
- }
-}
diff --git a/vendor/league/flysystem/src/Exception.php b/vendor/league/flysystem/src/Exception.php
deleted file mode 100644
index 4596c0a9a..000000000
--- a/vendor/league/flysystem/src/Exception.php
+++ /dev/null
@@ -1,8 +0,0 @@
-filesystem->has($this->path);
- }
-
- /**
- * Read the file.
- *
- * @return string|false file contents
- */
- public function read()
- {
- return $this->filesystem->read($this->path);
- }
-
- /**
- * Read the file as a stream.
- *
- * @return resource|false file stream
- */
- public function readStream()
- {
- return $this->filesystem->readStream($this->path);
- }
-
- /**
- * Write the new file.
- *
- * @param string $content
- *
- * @return bool success boolean
- */
- public function write($content)
- {
- return $this->filesystem->write($this->path, $content);
- }
-
- /**
- * Write the new file using a stream.
- *
- * @param resource $resource
- *
- * @return bool success boolean
- */
- public function writeStream($resource)
- {
- return $this->filesystem->writeStream($this->path, $resource);
- }
-
- /**
- * Update the file contents.
- *
- * @param string $content
- *
- * @return bool success boolean
- */
- public function update($content)
- {
- return $this->filesystem->update($this->path, $content);
- }
-
- /**
- * Update the file contents with a stream.
- *
- * @param resource $resource
- *
- * @return bool success boolean
- */
- public function updateStream($resource)
- {
- return $this->filesystem->updateStream($this->path, $resource);
- }
-
- /**
- * Create the file or update if exists.
- *
- * @param string $content
- *
- * @return bool success boolean
- */
- public function put($content)
- {
- return $this->filesystem->put($this->path, $content);
- }
-
- /**
- * Create the file or update if exists using a stream.
- *
- * @param resource $resource
- *
- * @return bool success boolean
- */
- public function putStream($resource)
- {
- return $this->filesystem->putStream($this->path, $resource);
- }
-
- /**
- * Rename the file.
- *
- * @param string $newpath
- *
- * @return bool success boolean
- */
- public function rename($newpath)
- {
- if ($this->filesystem->rename($this->path, $newpath)) {
- $this->path = $newpath;
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Copy the file.
- *
- * @param string $newpath
- *
- * @return File|false new file or false
- */
- public function copy($newpath)
- {
- if ($this->filesystem->copy($this->path, $newpath)) {
- return new File($this->filesystem, $newpath);
- }
-
- return false;
- }
-
- /**
- * Get the file's timestamp.
- *
- * @return string|false The timestamp or false on failure.
- */
- public function getTimestamp()
- {
- return $this->filesystem->getTimestamp($this->path);
- }
-
- /**
- * Get the file's mimetype.
- *
- * @return string|false The file mime-type or false on failure.
- */
- public function getMimetype()
- {
- return $this->filesystem->getMimetype($this->path);
- }
-
- /**
- * Get the file's visibility.
- *
- * @return string|false The visibility (public|private) or false on failure.
- */
- public function getVisibility()
- {
- return $this->filesystem->getVisibility($this->path);
- }
-
- /**
- * Get the file's metadata.
- *
- * @return array|false The file metadata or false on failure.
- */
- public function getMetadata()
- {
- return $this->filesystem->getMetadata($this->path);
- }
-
- /**
- * Get the file size.
- *
- * @return int|false The file size or false on failure.
- */
- public function getSize()
- {
- return $this->filesystem->getSize($this->path);
- }
-
- /**
- * Delete the file.
- *
- * @return bool success boolean
- */
- public function delete()
- {
- return $this->filesystem->delete($this->path);
- }
-}
diff --git a/vendor/league/flysystem/src/FileExistsException.php b/vendor/league/flysystem/src/FileExistsException.php
deleted file mode 100644
index c82e20c16..000000000
--- a/vendor/league/flysystem/src/FileExistsException.php
+++ /dev/null
@@ -1,37 +0,0 @@
-path = $path;
-
- parent::__construct('File already exists at path: ' . $this->getPath(), $code, $previous);
- }
-
- /**
- * Get the path which was found.
- *
- * @return string
- */
- public function getPath()
- {
- return $this->path;
- }
-}
diff --git a/vendor/league/flysystem/src/FileNotFoundException.php b/vendor/league/flysystem/src/FileNotFoundException.php
deleted file mode 100644
index 989df69bb..000000000
--- a/vendor/league/flysystem/src/FileNotFoundException.php
+++ /dev/null
@@ -1,37 +0,0 @@
-path = $path;
-
- parent::__construct('File not found at path: ' . $this->getPath(), $code, $previous);
- }
-
- /**
- * Get the path which was not found.
- *
- * @return string
- */
- public function getPath()
- {
- return $this->path;
- }
-}
diff --git a/vendor/league/flysystem/src/Filesystem.php b/vendor/league/flysystem/src/Filesystem.php
deleted file mode 100644
index c4eaf2781..000000000
--- a/vendor/league/flysystem/src/Filesystem.php
+++ /dev/null
@@ -1,409 +0,0 @@
-adapter = $adapter;
- $this->setConfig($config);
- }
-
- /**
- * Get the Adapter.
- *
- * @return AdapterInterface adapter
- */
- public function getAdapter()
- {
- return $this->adapter;
- }
-
- /**
- * @inheritdoc
- */
- public function has($path)
- {
- $path = Util::normalizePath($path);
-
- return strlen($path) === 0 ? false : (bool) $this->getAdapter()->has($path);
- }
-
- /**
- * @inheritdoc
- */
- public function write($path, $contents, array $config = [])
- {
- $path = Util::normalizePath($path);
- $this->assertAbsent($path);
- $config = $this->prepareConfig($config);
-
- return (bool) $this->getAdapter()->write($path, $contents, $config);
- }
-
- /**
- * @inheritdoc
- */
- public function writeStream($path, $resource, array $config = [])
- {
- if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') {
- throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
- }
-
- $path = Util::normalizePath($path);
- $this->assertAbsent($path);
- $config = $this->prepareConfig($config);
-
- Util::rewindStream($resource);
-
- return (bool) $this->getAdapter()->writeStream($path, $resource, $config);
- }
-
- /**
- * @inheritdoc
- */
- public function put($path, $contents, array $config = [])
- {
- $path = Util::normalizePath($path);
- $config = $this->prepareConfig($config);
-
- if ( ! $this->getAdapter() instanceof CanOverwriteFiles && $this->has($path)) {
- return (bool) $this->getAdapter()->update($path, $contents, $config);
- }
-
- return (bool) $this->getAdapter()->write($path, $contents, $config);
- }
-
- /**
- * @inheritdoc
- */
- public function putStream($path, $resource, array $config = [])
- {
- if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') {
- throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
- }
-
- $path = Util::normalizePath($path);
- $config = $this->prepareConfig($config);
- Util::rewindStream($resource);
-
- if ( ! $this->getAdapter() instanceof CanOverwriteFiles && $this->has($path)) {
- return (bool) $this->getAdapter()->updateStream($path, $resource, $config);
- }
-
- return (bool) $this->getAdapter()->writeStream($path, $resource, $config);
- }
-
- /**
- * @inheritdoc
- */
- public function readAndDelete($path)
- {
- $path = Util::normalizePath($path);
- $this->assertPresent($path);
- $contents = $this->read($path);
-
- if ($contents === false) {
- return false;
- }
-
- $this->delete($path);
-
- return $contents;
- }
-
- /**
- * @inheritdoc
- */
- public function update($path, $contents, array $config = [])
- {
- $path = Util::normalizePath($path);
- $config = $this->prepareConfig($config);
-
- $this->assertPresent($path);
-
- return (bool) $this->getAdapter()->update($path, $contents, $config);
- }
-
- /**
- * @inheritdoc
- */
- public function updateStream($path, $resource, array $config = [])
- {
- if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') {
- throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
- }
-
- $path = Util::normalizePath($path);
- $config = $this->prepareConfig($config);
- $this->assertPresent($path);
- Util::rewindStream($resource);
-
- return (bool) $this->getAdapter()->updateStream($path, $resource, $config);
- }
-
- /**
- * @inheritdoc
- */
- public function read($path)
- {
- $path = Util::normalizePath($path);
- $this->assertPresent($path);
-
- if ( ! ($object = $this->getAdapter()->read($path))) {
- return false;
- }
-
- return $object['contents'];
- }
-
- /**
- * @inheritdoc
- */
- public function readStream($path)
- {
- $path = Util::normalizePath($path);
- $this->assertPresent($path);
-
- if ( ! $object = $this->getAdapter()->readStream($path)) {
- return false;
- }
-
- return $object['stream'];
- }
-
- /**
- * @inheritdoc
- */
- public function rename($path, $newpath)
- {
- $path = Util::normalizePath($path);
- $newpath = Util::normalizePath($newpath);
- $this->assertPresent($path);
- $this->assertAbsent($newpath);
-
- return (bool) $this->getAdapter()->rename($path, $newpath);
- }
-
- /**
- * @inheritdoc
- */
- public function copy($path, $newpath)
- {
- $path = Util::normalizePath($path);
- $newpath = Util::normalizePath($newpath);
- $this->assertPresent($path);
- $this->assertAbsent($newpath);
-
- return $this->getAdapter()->copy($path, $newpath);
- }
-
- /**
- * @inheritdoc
- */
- public function delete($path)
- {
- $path = Util::normalizePath($path);
- $this->assertPresent($path);
-
- return $this->getAdapter()->delete($path);
- }
-
- /**
- * @inheritdoc
- */
- public function deleteDir($dirname)
- {
- $dirname = Util::normalizePath($dirname);
-
- if ($dirname === '') {
- throw new RootViolationException('Root directories can not be deleted.');
- }
-
- return (bool) $this->getAdapter()->deleteDir($dirname);
- }
-
- /**
- * @inheritdoc
- */
- public function createDir($dirname, array $config = [])
- {
- $dirname = Util::normalizePath($dirname);
- $config = $this->prepareConfig($config);
-
- return (bool) $this->getAdapter()->createDir($dirname, $config);
- }
-
- /**
- * @inheritdoc
- */
- public function listContents($directory = '', $recursive = false)
- {
- $directory = Util::normalizePath($directory);
- $contents = $this->getAdapter()->listContents($directory, $recursive);
-
- return (new ContentListingFormatter($directory, $recursive, $this->config->get('case_sensitive', true)))
- ->formatListing($contents);
- }
-
- /**
- * @inheritdoc
- */
- public function getMimetype($path)
- {
- $path = Util::normalizePath($path);
- $this->assertPresent($path);
-
- if (( ! $object = $this->getAdapter()->getMimetype($path)) || ! array_key_exists('mimetype', $object)) {
- return false;
- }
-
- return $object['mimetype'];
- }
-
- /**
- * @inheritdoc
- */
- public function getTimestamp($path)
- {
- $path = Util::normalizePath($path);
- $this->assertPresent($path);
-
- if (( ! $object = $this->getAdapter()->getTimestamp($path)) || ! array_key_exists('timestamp', $object)) {
- return false;
- }
-
- return (int) $object['timestamp'];
- }
-
- /**
- * @inheritdoc
- */
- public function getVisibility($path)
- {
- $path = Util::normalizePath($path);
- $this->assertPresent($path);
-
- if (( ! $object = $this->getAdapter()->getVisibility($path)) || ! array_key_exists('visibility', $object)) {
- return false;
- }
-
- return $object['visibility'];
- }
-
- /**
- * @inheritdoc
- */
- public function getSize($path)
- {
- $path = Util::normalizePath($path);
- $this->assertPresent($path);
-
- if (( ! $object = $this->getAdapter()->getSize($path)) || ! array_key_exists('size', $object)) {
- return false;
- }
-
- return (int) $object['size'];
- }
-
- /**
- * @inheritdoc
- */
- public function setVisibility($path, $visibility)
- {
- $path = Util::normalizePath($path);
- $this->assertPresent($path);
-
- return (bool) $this->getAdapter()->setVisibility($path, $visibility);
- }
-
- /**
- * @inheritdoc
- */
- public function getMetadata($path)
- {
- $path = Util::normalizePath($path);
- $this->assertPresent($path);
-
- return $this->getAdapter()->getMetadata($path);
- }
-
- /**
- * @inheritdoc
- */
- public function get($path, Handler $handler = null)
- {
- $path = Util::normalizePath($path);
-
- if ( ! $handler) {
- $metadata = $this->getMetadata($path);
- $handler = ($metadata && $metadata['type'] === 'file') ? new File($this, $path) : new Directory($this, $path);
- }
-
- $handler->setPath($path);
- $handler->setFilesystem($this);
-
- return $handler;
- }
-
- /**
- * Assert a file is present.
- *
- * @param string $path path to file
- *
- * @throws FileNotFoundException
- *
- * @return void
- */
- public function assertPresent($path)
- {
- if ($this->config->get('disable_asserts', false) === false && ! $this->has($path)) {
- throw new FileNotFoundException($path);
- }
- }
-
- /**
- * Assert a file is absent.
- *
- * @param string $path path to file
- *
- * @throws FileExistsException
- *
- * @return void
- */
- public function assertAbsent($path)
- {
- if ($this->config->get('disable_asserts', false) === false && $this->has($path)) {
- throw new FileExistsException($path);
- }
- }
-}
diff --git a/vendor/league/flysystem/src/FilesystemException.php b/vendor/league/flysystem/src/FilesystemException.php
deleted file mode 100644
index 3121e533d..000000000
--- a/vendor/league/flysystem/src/FilesystemException.php
+++ /dev/null
@@ -1,7 +0,0 @@
-path = $path;
- $this->filesystem = $filesystem;
- }
-
- /**
- * Check whether the entree is a directory.
- *
- * @return bool
- */
- public function isDir()
- {
- return $this->getType() === 'dir';
- }
-
- /**
- * Check whether the entree is a file.
- *
- * @return bool
- */
- public function isFile()
- {
- return $this->getType() === 'file';
- }
-
- /**
- * Retrieve the entree type (file|dir).
- *
- * @return string file or dir
- */
- public function getType()
- {
- $metadata = $this->filesystem->getMetadata($this->path);
-
- return $metadata ? $metadata['type'] : 'dir';
- }
-
- /**
- * Set the Filesystem object.
- *
- * @param FilesystemInterface $filesystem
- *
- * @return $this
- */
- public function setFilesystem(FilesystemInterface $filesystem)
- {
- $this->filesystem = $filesystem;
-
- return $this;
- }
-
- /**
- * Retrieve the Filesystem object.
- *
- * @return FilesystemInterface
- */
- public function getFilesystem()
- {
- return $this->filesystem;
- }
-
- /**
- * Set the entree path.
- *
- * @param string $path
- *
- * @return $this
- */
- public function setPath($path)
- {
- $this->path = $path;
-
- return $this;
- }
-
- /**
- * Retrieve the entree path.
- *
- * @return string path
- */
- public function getPath()
- {
- return $this->path;
- }
-
- /**
- * Plugins pass-through.
- *
- * @param string $method
- * @param array $arguments
- *
- * @return mixed
- */
- public function __call($method, array $arguments)
- {
- array_unshift($arguments, $this->path);
- $callback = [$this->filesystem, $method];
-
- try {
- return call_user_func_array($callback, $arguments);
- } catch (BadMethodCallException $e) {
- throw new BadMethodCallException(
- 'Call to undefined method '
- . get_called_class()
- . '::' . $method
- );
- }
- }
-}
diff --git a/vendor/league/flysystem/src/InvalidRootException.php b/vendor/league/flysystem/src/InvalidRootException.php
deleted file mode 100644
index 468d1d58c..000000000
--- a/vendor/league/flysystem/src/InvalidRootException.php
+++ /dev/null
@@ -1,9 +0,0 @@
- Filesystem,]
- *
- * @throws InvalidArgumentException
- */
- public function __construct(array $filesystems = [])
- {
- $this->mountFilesystems($filesystems);
- }
-
- /**
- * Mount filesystems.
- *
- * @param FilesystemInterface[] $filesystems [:prefix => Filesystem,]
- *
- * @throws InvalidArgumentException
- *
- * @return $this
- */
- public function mountFilesystems(array $filesystems)
- {
- foreach ($filesystems as $prefix => $filesystem) {
- $this->mountFilesystem($prefix, $filesystem);
- }
-
- return $this;
- }
-
- /**
- * Mount filesystems.
- *
- * @param string $prefix
- * @param FilesystemInterface $filesystem
- *
- * @throws InvalidArgumentException
- *
- * @return $this
- */
- public function mountFilesystem($prefix, FilesystemInterface $filesystem)
- {
- if ( ! is_string($prefix)) {
- throw new InvalidArgumentException(__METHOD__ . ' expects argument #1 to be a string.');
- }
-
- $this->filesystems[$prefix] = $filesystem;
-
- return $this;
- }
-
- /**
- * Get the filesystem with the corresponding prefix.
- *
- * @param string $prefix
- *
- * @throws FilesystemNotFoundException
- *
- * @return FilesystemInterface
- */
- public function getFilesystem($prefix)
- {
- if ( ! isset($this->filesystems[$prefix])) {
- throw new FilesystemNotFoundException('No filesystem mounted with prefix ' . $prefix);
- }
-
- return $this->filesystems[$prefix];
- }
-
- /**
- * Retrieve the prefix from an arguments array.
- *
- * @param array $arguments
- *
- * @throws InvalidArgumentException
- *
- * @return array [:prefix, :arguments]
- */
- public function filterPrefix(array $arguments)
- {
- if (empty($arguments)) {
- throw new InvalidArgumentException('At least one argument needed');
- }
-
- $path = array_shift($arguments);
-
- if ( ! is_string($path)) {
- throw new InvalidArgumentException('First argument should be a string');
- }
-
- list($prefix, $path) = $this->getPrefixAndPath($path);
- array_unshift($arguments, $path);
-
- return [$prefix, $arguments];
- }
-
- /**
- * @param string $directory
- * @param bool $recursive
- *
- * @throws InvalidArgumentException
- * @throws FilesystemNotFoundException
- *
- * @return array
- */
- public function listContents($directory = '', $recursive = false)
- {
- list($prefix, $directory) = $this->getPrefixAndPath($directory);
- $filesystem = $this->getFilesystem($prefix);
- $result = $filesystem->listContents($directory, $recursive);
-
- foreach ($result as &$file) {
- $file['filesystem'] = $prefix;
- }
-
- return $result;
- }
-
- /**
- * Call forwarder.
- *
- * @param string $method
- * @param array $arguments
- *
- * @throws InvalidArgumentException
- * @throws FilesystemNotFoundException
- *
- * @return mixed
- */
- public function __call($method, $arguments)
- {
- list($prefix, $arguments) = $this->filterPrefix($arguments);
-
- return $this->invokePluginOnFilesystem($method, $arguments, $prefix);
- }
-
- /**
- * @param string $from
- * @param string $to
- * @param array $config
- *
- * @throws InvalidArgumentException
- * @throws FilesystemNotFoundException
- * @throws FileExistsException
- *
- * @return bool
- */
- public function copy($from, $to, array $config = [])
- {
- list($prefixFrom, $from) = $this->getPrefixAndPath($from);
-
- $buffer = $this->getFilesystem($prefixFrom)->readStream($from);
-
- if ($buffer === false) {
- return false;
- }
-
- list($prefixTo, $to) = $this->getPrefixAndPath($to);
-
- $result = $this->getFilesystem($prefixTo)->writeStream($to, $buffer, $config);
-
- if (is_resource($buffer)) {
- fclose($buffer);
- }
-
- return $result;
- }
-
- /**
- * List with plugin adapter.
- *
- * @param array $keys
- * @param string $directory
- * @param bool $recursive
- *
- * @throws InvalidArgumentException
- * @throws FilesystemNotFoundException
- *
- * @return array
- */
- public function listWith(array $keys = [], $directory = '', $recursive = false)
- {
- list($prefix, $directory) = $this->getPrefixAndPath($directory);
- $arguments = [$keys, $directory, $recursive];
-
- return $this->invokePluginOnFilesystem('listWith', $arguments, $prefix);
- }
-
- /**
- * Move a file.
- *
- * @param string $from
- * @param string $to
- * @param array $config
- *
- * @throws InvalidArgumentException
- * @throws FilesystemNotFoundException
- *
- * @return bool
- */
- public function move($from, $to, array $config = [])
- {
- list($prefixFrom, $pathFrom) = $this->getPrefixAndPath($from);
- list($prefixTo, $pathTo) = $this->getPrefixAndPath($to);
-
- if ($prefixFrom === $prefixTo) {
- $filesystem = $this->getFilesystem($prefixFrom);
- $renamed = $filesystem->rename($pathFrom, $pathTo);
-
- if ($renamed && isset($config['visibility'])) {
- return $filesystem->setVisibility($pathTo, $config['visibility']);
- }
-
- return $renamed;
- }
-
- $copied = $this->copy($from, $to, $config);
-
- if ($copied) {
- return $this->delete($from);
- }
-
- return false;
- }
-
- /**
- * Invoke a plugin on a filesystem mounted on a given prefix.
- *
- * @param string $method
- * @param array $arguments
- * @param string $prefix
- *
- * @throws FilesystemNotFoundException
- *
- * @return mixed
- */
- public function invokePluginOnFilesystem($method, $arguments, $prefix)
- {
- $filesystem = $this->getFilesystem($prefix);
-
- try {
- return $this->invokePlugin($method, $arguments, $filesystem);
- } catch (PluginNotFoundException $e) {
- // Let it pass, it's ok, don't panic.
- }
-
- $callback = [$filesystem, $method];
-
- return call_user_func_array($callback, $arguments);
- }
-
- /**
- * @param string $path
- *
- * @throws InvalidArgumentException
- *
- * @return string[] [:prefix, :path]
- */
- protected function getPrefixAndPath($path)
- {
- if (strpos($path, '://') < 1) {
- throw new InvalidArgumentException('No prefix detected in path: ' . $path);
- }
-
- return explode('://', $path, 2);
- }
-
- /**
- * Check whether a file exists.
- *
- * @param string $path
- *
- * @return bool
- */
- public function has($path)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->has($path);
- }
-
- /**
- * Read a file.
- *
- * @param string $path The path to the file.
- *
- * @throws FileNotFoundException
- *
- * @return string|false The file contents or false on failure.
- */
- public function read($path)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->read($path);
- }
-
- /**
- * Retrieves a read-stream for a path.
- *
- * @param string $path The path to the file.
- *
- * @throws FileNotFoundException
- *
- * @return resource|false The path resource or false on failure.
- */
- public function readStream($path)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->readStream($path);
- }
-
- /**
- * Get a file's metadata.
- *
- * @param string $path The path to the file.
- *
- * @throws FileNotFoundException
- *
- * @return array|false The file metadata or false on failure.
- */
- public function getMetadata($path)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->getMetadata($path);
- }
-
- /**
- * Get a file's size.
- *
- * @param string $path The path to the file.
- *
- * @throws FileNotFoundException
- *
- * @return int|false The file size or false on failure.
- */
- public function getSize($path)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->getSize($path);
- }
-
- /**
- * Get a file's mime-type.
- *
- * @param string $path The path to the file.
- *
- * @throws FileNotFoundException
- *
- * @return string|false The file mime-type or false on failure.
- */
- public function getMimetype($path)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->getMimetype($path);
- }
-
- /**
- * Get a file's timestamp.
- *
- * @param string $path The path to the file.
- *
- * @throws FileNotFoundException
- *
- * @return string|false The timestamp or false on failure.
- */
- public function getTimestamp($path)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->getTimestamp($path);
- }
-
- /**
- * Get a file's visibility.
- *
- * @param string $path The path to the file.
- *
- * @throws FileNotFoundException
- *
- * @return string|false The visibility (public|private) or false on failure.
- */
- public function getVisibility($path)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->getVisibility($path);
- }
-
- /**
- * Write a new file.
- *
- * @param string $path The path of the new file.
- * @param string $contents The file contents.
- * @param array $config An optional configuration array.
- *
- * @throws FileExistsException
- *
- * @return bool True on success, false on failure.
- */
- public function write($path, $contents, array $config = [])
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->write($path, $contents, $config);
- }
-
- /**
- * Write a new file using a stream.
- *
- * @param string $path The path of the new file.
- * @param resource $resource The file handle.
- * @param array $config An optional configuration array.
- *
- * @throws InvalidArgumentException If $resource is not a file handle.
- * @throws FileExistsException
- *
- * @return bool True on success, false on failure.
- */
- public function writeStream($path, $resource, array $config = [])
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->writeStream($path, $resource, $config);
- }
-
- /**
- * Update an existing file.
- *
- * @param string $path The path of the existing file.
- * @param string $contents The file contents.
- * @param array $config An optional configuration array.
- *
- * @throws FileNotFoundException
- *
- * @return bool True on success, false on failure.
- */
- public function update($path, $contents, array $config = [])
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->update($path, $contents, $config);
- }
-
- /**
- * Update an existing file using a stream.
- *
- * @param string $path The path of the existing file.
- * @param resource $resource The file handle.
- * @param array $config An optional configuration array.
- *
- * @throws InvalidArgumentException If $resource is not a file handle.
- * @throws FileNotFoundException
- *
- * @return bool True on success, false on failure.
- */
- public function updateStream($path, $resource, array $config = [])
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->updateStream($path, $resource, $config);
- }
-
- /**
- * Rename a file.
- *
- * @param string $path Path to the existing file.
- * @param string $newpath The new path of the file.
- *
- * @throws FileExistsException Thrown if $newpath exists.
- * @throws FileNotFoundException Thrown if $path does not exist.
- *
- * @return bool True on success, false on failure.
- */
- public function rename($path, $newpath)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->rename($path, $newpath);
- }
-
- /**
- * Delete a file.
- *
- * @param string $path
- *
- * @throws FileNotFoundException
- *
- * @return bool True on success, false on failure.
- */
- public function delete($path)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->delete($path);
- }
-
- /**
- * Delete a directory.
- *
- * @param string $dirname
- *
- * @throws RootViolationException Thrown if $dirname is empty.
- *
- * @return bool True on success, false on failure.
- */
- public function deleteDir($dirname)
- {
- list($prefix, $dirname) = $this->getPrefixAndPath($dirname);
-
- return $this->getFilesystem($prefix)->deleteDir($dirname);
- }
-
- /**
- * Create a directory.
- *
- * @param string $dirname The name of the new directory.
- * @param array $config An optional configuration array.
- *
- * @return bool True on success, false on failure.
- */
- public function createDir($dirname, array $config = [])
- {
- list($prefix, $dirname) = $this->getPrefixAndPath($dirname);
-
- return $this->getFilesystem($prefix)->createDir($dirname);
- }
-
- /**
- * Set the visibility for a file.
- *
- * @param string $path The path to the file.
- * @param string $visibility One of 'public' or 'private'.
- *
- * @throws FileNotFoundException
- *
- * @return bool True on success, false on failure.
- */
- public function setVisibility($path, $visibility)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->setVisibility($path, $visibility);
- }
-
- /**
- * Create a file or update if exists.
- *
- * @param string $path The path to the file.
- * @param string $contents The file contents.
- * @param array $config An optional configuration array.
- *
- * @return bool True on success, false on failure.
- */
- public function put($path, $contents, array $config = [])
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->put($path, $contents, $config);
- }
-
- /**
- * Create a file or update if exists.
- *
- * @param string $path The path to the file.
- * @param resource $resource The file handle.
- * @param array $config An optional configuration array.
- *
- * @throws InvalidArgumentException Thrown if $resource is not a resource.
- *
- * @return bool True on success, false on failure.
- */
- public function putStream($path, $resource, array $config = [])
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->putStream($path, $resource, $config);
- }
-
- /**
- * Read and delete a file.
- *
- * @param string $path The path to the file.
- *
- * @throws FileNotFoundException
- *
- * @return string|false The file contents, or false on failure.
- */
- public function readAndDelete($path)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->readAndDelete($path);
- }
-
- /**
- * Get a file/directory handler.
- *
- * @deprecated
- *
- * @param string $path The path to the file.
- * @param Handler $handler An optional existing handler to populate.
- *
- * @return Handler Either a file or directory handler.
- */
- public function get($path, Handler $handler = null)
- {
- list($prefix, $path) = $this->getPrefixAndPath($path);
-
- return $this->getFilesystem($prefix)->get($path);
- }
-}
diff --git a/vendor/league/flysystem/src/NotSupportedException.php b/vendor/league/flysystem/src/NotSupportedException.php
deleted file mode 100644
index e0a989b22..000000000
--- a/vendor/league/flysystem/src/NotSupportedException.php
+++ /dev/null
@@ -1,37 +0,0 @@
-getPathname());
- }
-
- /**
- * Create a new exception for a link.
- *
- * @param string $systemType
- *
- * @return static
- */
- public static function forFtpSystemType($systemType)
- {
- $message = "The FTP system type '$systemType' is currently not supported.";
-
- return new static($message);
- }
-}
diff --git a/vendor/league/flysystem/src/Plugin/AbstractPlugin.php b/vendor/league/flysystem/src/Plugin/AbstractPlugin.php
deleted file mode 100644
index 0d5678976..000000000
--- a/vendor/league/flysystem/src/Plugin/AbstractPlugin.php
+++ /dev/null
@@ -1,24 +0,0 @@
-filesystem = $filesystem;
- }
-}
diff --git a/vendor/league/flysystem/src/Plugin/EmptyDir.php b/vendor/league/flysystem/src/Plugin/EmptyDir.php
deleted file mode 100644
index b5ae7f582..000000000
--- a/vendor/league/flysystem/src/Plugin/EmptyDir.php
+++ /dev/null
@@ -1,34 +0,0 @@
-filesystem->listContents($dirname, false);
-
- foreach ($listing as $item) {
- if ($item['type'] === 'dir') {
- $this->filesystem->deleteDir($item['path']);
- } else {
- $this->filesystem->delete($item['path']);
- }
- }
- }
-}
diff --git a/vendor/league/flysystem/src/Plugin/ForcedCopy.php b/vendor/league/flysystem/src/Plugin/ForcedCopy.php
deleted file mode 100644
index a41e9f3ae..000000000
--- a/vendor/league/flysystem/src/Plugin/ForcedCopy.php
+++ /dev/null
@@ -1,44 +0,0 @@
-filesystem->delete($newpath);
- } catch (FileNotFoundException $e) {
- // The destination path does not exist. That's ok.
- $deleted = true;
- }
-
- if ($deleted) {
- return $this->filesystem->copy($path, $newpath);
- }
-
- return false;
- }
-}
diff --git a/vendor/league/flysystem/src/Plugin/ForcedRename.php b/vendor/league/flysystem/src/Plugin/ForcedRename.php
deleted file mode 100644
index 3f51cd607..000000000
--- a/vendor/league/flysystem/src/Plugin/ForcedRename.php
+++ /dev/null
@@ -1,44 +0,0 @@
-filesystem->delete($newpath);
- } catch (FileNotFoundException $e) {
- // The destination path does not exist. That's ok.
- $deleted = true;
- }
-
- if ($deleted) {
- return $this->filesystem->rename($path, $newpath);
- }
-
- return false;
- }
-}
diff --git a/vendor/league/flysystem/src/Plugin/GetWithMetadata.php b/vendor/league/flysystem/src/Plugin/GetWithMetadata.php
deleted file mode 100644
index 2f13d2fd2..000000000
--- a/vendor/league/flysystem/src/Plugin/GetWithMetadata.php
+++ /dev/null
@@ -1,51 +0,0 @@
-filesystem->getMetadata($path);
-
- if ( ! $object) {
- return false;
- }
-
- $keys = array_diff($metadata, array_keys($object));
-
- foreach ($keys as $key) {
- if ( ! method_exists($this->filesystem, $method = 'get' . ucfirst($key))) {
- throw new InvalidArgumentException('Could not fetch metadata: ' . $key);
- }
-
- $object[$key] = $this->filesystem->{$method}($path);
- }
-
- return $object;
- }
-}
diff --git a/vendor/league/flysystem/src/Plugin/ListFiles.php b/vendor/league/flysystem/src/Plugin/ListFiles.php
deleted file mode 100644
index 9669fe7e7..000000000
--- a/vendor/league/flysystem/src/Plugin/ListFiles.php
+++ /dev/null
@@ -1,35 +0,0 @@
-filesystem->listContents($directory, $recursive);
-
- $filter = function ($object) {
- return $object['type'] === 'file';
- };
-
- return array_values(array_filter($contents, $filter));
- }
-}
diff --git a/vendor/league/flysystem/src/Plugin/ListPaths.php b/vendor/league/flysystem/src/Plugin/ListPaths.php
deleted file mode 100644
index 0889d1f8d..000000000
--- a/vendor/league/flysystem/src/Plugin/ListPaths.php
+++ /dev/null
@@ -1,36 +0,0 @@
-filesystem->listContents($directory, $recursive);
-
- foreach ($contents as $object) {
- $result[] = $object['path'];
- }
-
- return $result;
- }
-}
diff --git a/vendor/league/flysystem/src/Plugin/ListWith.php b/vendor/league/flysystem/src/Plugin/ListWith.php
deleted file mode 100644
index d64debeca..000000000
--- a/vendor/league/flysystem/src/Plugin/ListWith.php
+++ /dev/null
@@ -1,60 +0,0 @@
-filesystem->listContents($directory, $recursive);
-
- foreach ($contents as $index => $object) {
- if ($object['type'] === 'file') {
- $missingKeys = array_diff($keys, array_keys($object));
- $contents[$index] = array_reduce($missingKeys, [$this, 'getMetadataByName'], $object);
- }
- }
-
- return $contents;
- }
-
- /**
- * Get a meta-data value by key name.
- *
- * @param array $object
- * @param string $key
- *
- * @return array
- */
- protected function getMetadataByName(array $object, $key)
- {
- $method = 'get' . ucfirst($key);
-
- if ( ! method_exists($this->filesystem, $method)) {
- throw new \InvalidArgumentException('Could not get meta-data for key: ' . $key);
- }
-
- $object[$key] = $this->filesystem->{$method}($object['path']);
-
- return $object;
- }
-}
diff --git a/vendor/league/flysystem/src/Plugin/PluggableTrait.php b/vendor/league/flysystem/src/Plugin/PluggableTrait.php
deleted file mode 100644
index 922edfe52..000000000
--- a/vendor/league/flysystem/src/Plugin/PluggableTrait.php
+++ /dev/null
@@ -1,97 +0,0 @@
-plugins[$plugin->getMethod()] = $plugin;
-
- return $this;
- }
-
- /**
- * Find a specific plugin.
- *
- * @param string $method
- *
- * @throws PluginNotFoundException
- *
- * @return PluginInterface
- */
- protected function findPlugin($method)
- {
- if ( ! isset($this->plugins[$method])) {
- throw new PluginNotFoundException('Plugin not found for method: ' . $method);
- }
-
- return $this->plugins[$method];
- }
-
- /**
- * Invoke a plugin by method name.
- *
- * @param string $method
- * @param array $arguments
- * @param FilesystemInterface $filesystem
- *
- * @throws PluginNotFoundException
- *
- * @return mixed
- */
- protected function invokePlugin($method, array $arguments, FilesystemInterface $filesystem)
- {
- $plugin = $this->findPlugin($method);
- $plugin->setFilesystem($filesystem);
- $callback = [$plugin, 'handle'];
-
- return call_user_func_array($callback, $arguments);
- }
-
- /**
- * Plugins pass-through.
- *
- * @param string $method
- * @param array $arguments
- *
- * @throws BadMethodCallException
- *
- * @return mixed
- */
- public function __call($method, array $arguments)
- {
- try {
- return $this->invokePlugin($method, $arguments, $this);
- } catch (PluginNotFoundException $e) {
- throw new BadMethodCallException(
- 'Call to undefined method '
- . get_class($this)
- . '::' . $method
- );
- }
- }
-}
diff --git a/vendor/league/flysystem/src/Plugin/PluginNotFoundException.php b/vendor/league/flysystem/src/Plugin/PluginNotFoundException.php
deleted file mode 100644
index fd1d7e7e3..000000000
--- a/vendor/league/flysystem/src/Plugin/PluginNotFoundException.php
+++ /dev/null
@@ -1,10 +0,0 @@
-hash = spl_object_hash($this);
- static::$safeStorage[$this->hash] = [];
- }
-
- public function storeSafely($key, $value)
- {
- static::$safeStorage[$this->hash][$key] = $value;
- }
-
- public function retrieveSafely($key)
- {
- if (array_key_exists($key, static::$safeStorage[$this->hash])) {
- return static::$safeStorage[$this->hash][$key];
- }
- }
-
- public function __destruct()
- {
- unset(static::$safeStorage[$this->hash]);
- }
-}
diff --git a/vendor/league/flysystem/src/UnreadableFileException.php b/vendor/league/flysystem/src/UnreadableFileException.php
deleted file mode 100644
index e66803383..000000000
--- a/vendor/league/flysystem/src/UnreadableFileException.php
+++ /dev/null
@@ -1,18 +0,0 @@
-getRealPath()
- )
- );
- }
-}
diff --git a/vendor/league/flysystem/src/Util.php b/vendor/league/flysystem/src/Util.php
deleted file mode 100644
index 1a2db718d..000000000
--- a/vendor/league/flysystem/src/Util.php
+++ /dev/null
@@ -1,354 +0,0 @@
- ''];
- }
-
- /**
- * Normalize a dirname return value.
- *
- * @param string $dirname
- *
- * @return string normalized dirname
- */
- public static function normalizeDirname($dirname)
- {
- return $dirname === '.' ? '' : $dirname;
- }
-
- /**
- * Get a normalized dirname from a path.
- *
- * @param string $path
- *
- * @return string dirname
- */
- public static function dirname($path)
- {
- return static::normalizeDirname(dirname($path));
- }
-
- /**
- * Map result arrays.
- *
- * @param array $object
- * @param array $map
- *
- * @return array mapped result
- */
- public static function map(array $object, array $map)
- {
- $result = [];
-
- foreach ($map as $from => $to) {
- if ( ! isset($object[$from])) {
- continue;
- }
-
- $result[$to] = $object[$from];
- }
-
- return $result;
- }
-
- /**
- * Normalize path.
- *
- * @param string $path
- *
- * @throws LogicException
- *
- * @return string
- */
- public static function normalizePath($path)
- {
- return static::normalizeRelativePath($path);
- }
-
- /**
- * Normalize relative directories in a path.
- *
- * @param string $path
- *
- * @throws LogicException
- *
- * @return string
- */
- public static function normalizeRelativePath($path)
- {
- $path = str_replace('\\', '/', $path);
- $path = static::removeFunkyWhiteSpace($path);
- $parts = [];
-
- foreach (explode('/', $path) as $part) {
- switch ($part) {
- case '':
- case '.':
- break;
-
- case '..':
- if (empty($parts)) {
- throw new LogicException(
- 'Path is outside of the defined root, path: [' . $path . ']'
- );
- }
- array_pop($parts);
- break;
-
- default:
- $parts[] = $part;
- break;
- }
- }
-
- $path = implode('/', $parts);
-
- return $path;
- }
-
- /**
- * Rejects unprintable characters and invalid unicode characters.
- *
- * @param string $path
- *
- * @return string $path
- */
- protected static function removeFunkyWhiteSpace($path)
- {
- if (preg_match('#\p{C}+#u', $path)) {
- throw CorruptedPathDetected::forPath($path);
- }
-
- return $path;
- }
-
- /**
- * Normalize prefix.
- *
- * @param string $prefix
- * @param string $separator
- *
- * @return string normalized path
- */
- public static function normalizePrefix($prefix, $separator)
- {
- return rtrim($prefix, $separator) . $separator;
- }
-
- /**
- * Get content size.
- *
- * @param string $contents
- *
- * @return int content size
- */
- public static function contentSize($contents)
- {
- return defined('MB_OVERLOAD_STRING') ? mb_strlen($contents, '8bit') : strlen($contents);
- }
-
- /**
- * Guess MIME Type based on the path of the file and it's content.
- *
- * @param string $path
- * @param string|resource $content
- *
- * @return string|null MIME Type or NULL if no extension detected
- */
- public static function guessMimeType($path, $content)
- {
- $mimeType = MimeType::detectByContent($content);
-
- if ( ! (empty($mimeType) || in_array($mimeType, ['application/x-empty', 'text/plain', 'text/x-asm']))) {
- return $mimeType;
- }
-
- return MimeType::detectByFilename($path);
- }
-
- /**
- * Emulate directories.
- *
- * @param array $listing
- *
- * @return array listing with emulated directories
- */
- public static function emulateDirectories(array $listing)
- {
- $directories = [];
- $listedDirectories = [];
-
- foreach ($listing as $object) {
- [$directories, $listedDirectories] = static::emulateObjectDirectories($object, $directories, $listedDirectories);
- }
-
- $directories = array_diff(array_unique($directories), array_unique($listedDirectories));
-
- foreach ($directories as $directory) {
- $listing[] = static::pathinfo($directory) + ['type' => 'dir'];
- }
-
- return $listing;
- }
-
- /**
- * Ensure a Config instance.
- *
- * @param null|array|Config $config
- *
- * @return Config config instance
- *
- * @throw LogicException
- */
- public static function ensureConfig($config)
- {
- if ($config === null) {
- return new Config();
- }
-
- if ($config instanceof Config) {
- return $config;
- }
-
- if (is_array($config)) {
- return new Config($config);
- }
-
- throw new LogicException('A config should either be an array or a Flysystem\Config object.');
- }
-
- /**
- * Rewind a stream.
- *
- * @param resource $resource
- */
- public static function rewindStream($resource)
- {
- if (ftell($resource) !== 0 && static::isSeekableStream($resource)) {
- rewind($resource);
- }
- }
-
- public static function isSeekableStream($resource)
- {
- $metadata = stream_get_meta_data($resource);
-
- return $metadata['seekable'];
- }
-
- /**
- * Get the size of a stream.
- *
- * @param resource $resource
- *
- * @return int|null stream size
- */
- public static function getStreamSize($resource)
- {
- $stat = fstat($resource);
-
- if ( ! is_array($stat) || ! isset($stat['size'])) {
- return null;
- }
-
- return $stat['size'];
- }
-
- /**
- * Emulate the directories of a single object.
- *
- * @param array $object
- * @param array $directories
- * @param array $listedDirectories
- *
- * @return array
- */
- protected static function emulateObjectDirectories(array $object, array $directories, array $listedDirectories)
- {
- if ($object['type'] === 'dir') {
- $listedDirectories[] = $object['path'];
- }
-
- if ( ! isset($object['dirname']) || trim($object['dirname']) === '') {
- return [$directories, $listedDirectories];
- }
-
- $parent = $object['dirname'];
-
- while (isset($parent) && trim($parent) !== '' && ! in_array($parent, $directories)) {
- $directories[] = $parent;
- $parent = static::dirname($parent);
- }
-
- if (isset($object['type']) && $object['type'] === 'dir') {
- $listedDirectories[] = $object['path'];
-
- return [$directories, $listedDirectories];
- }
-
- return [$directories, $listedDirectories];
- }
-
- /**
- * Returns the trailing name component of the path.
- *
- * @param string $path
- *
- * @return string
- */
- private static function basename($path)
- {
- $separators = DIRECTORY_SEPARATOR === '/' ? '/' : '\/';
-
- $path = rtrim($path, $separators);
-
- $basename = preg_replace('#.*?([^' . preg_quote($separators, '#') . ']+$)#', '$1', $path);
-
- if (DIRECTORY_SEPARATOR === '/') {
- return $basename;
- }
- // @codeCoverageIgnoreStart
- // Extra Windows path munging. This is tested via AppVeyor, but code
- // coverage is not reported.
-
- // Handle relative paths with drive letters. c:file.txt.
- while (preg_match('#^[a-zA-Z]{1}:[^\\\/]#', $basename)) {
- $basename = substr($basename, 2);
- }
-
- // Remove colon for standalone drive letter names.
- if (preg_match('#^[a-zA-Z]{1}:$#', $basename)) {
- $basename = rtrim($basename, ':');
- }
-
- return $basename;
- // @codeCoverageIgnoreEnd
- }
-}
diff --git a/vendor/league/flysystem/src/Util/ContentListingFormatter.php b/vendor/league/flysystem/src/Util/ContentListingFormatter.php
deleted file mode 100644
index ae0d3b91d..000000000
--- a/vendor/league/flysystem/src/Util/ContentListingFormatter.php
+++ /dev/null
@@ -1,122 +0,0 @@
-directory = rtrim($directory, '/');
- $this->recursive = $recursive;
- $this->caseSensitive = $caseSensitive;
- }
-
- /**
- * Format contents listing.
- *
- * @param array $listing
- *
- * @return array
- */
- public function formatListing(array $listing)
- {
- $listing = array_filter(array_map([$this, 'addPathInfo'], $listing), [$this, 'isEntryOutOfScope']);
-
- return $this->sortListing(array_values($listing));
- }
-
- private function addPathInfo(array $entry)
- {
- return $entry + Util::pathinfo($entry['path']);
- }
-
- /**
- * Determine if the entry is out of scope.
- *
- * @param array $entry
- *
- * @return bool
- */
- private function isEntryOutOfScope(array $entry)
- {
- if (empty($entry['path']) && $entry['path'] !== '0') {
- return false;
- }
-
- if ($this->recursive) {
- return $this->residesInDirectory($entry);
- }
-
- return $this->isDirectChild($entry);
- }
-
- /**
- * Check if the entry resides within the parent directory.
- *
- * @param array $entry
- *
- * @return bool
- */
- private function residesInDirectory(array $entry)
- {
- if ($this->directory === '') {
- return true;
- }
-
- return $this->caseSensitive
- ? strpos($entry['path'], $this->directory . '/') === 0
- : stripos($entry['path'], $this->directory . '/') === 0;
- }
-
- /**
- * Check if the entry is a direct child of the directory.
- *
- * @param array $entry
- *
- * @return bool
- */
- private function isDirectChild(array $entry)
- {
- return $this->caseSensitive
- ? $entry['dirname'] === $this->directory
- : strcasecmp($this->directory, $entry['dirname']) === 0;
- }
-
- /**
- * @param array $listing
- *
- * @return array
- */
- private function sortListing(array $listing)
- {
- usort($listing, function ($a, $b) {
- return strcasecmp($a['path'], $b['path']);
- });
-
- return $listing;
- }
-}
diff --git a/vendor/league/flysystem/src/Util/MimeType.php b/vendor/league/flysystem/src/Util/MimeType.php
deleted file mode 100644
index 35cba3fb8..000000000
--- a/vendor/league/flysystem/src/Util/MimeType.php
+++ /dev/null
@@ -1,80 +0,0 @@
-detectMimeTypeFromBuffer($content);
- }
-
- return 'text/plain';
- }
-
- /**
- * Detects MIME Type based on file extension.
- *
- * @param string $extension
- *
- * @return string MIME Type
- */
- public static function detectByFileExtension($extension)
- {
- return static::detector()->detectMimeTypeFromPath('artificial.' . $extension) ?: 'text/plain';
- }
-
- /**
- * @param string $filename
- *
- * @return string MIME Type
- */
- public static function detectByFilename($filename)
- {
- return static::detector()->detectMimeTypeFromPath($filename) ?: 'text/plain';
- }
-
- /**
- * @return array Map of file extension to MIME Type
- */
- public static function getExtensionToMimeTypeMap()
- {
- return static::$extensionToMimeTypeMap;
- }
-}
diff --git a/vendor/league/flysystem/src/Util/StreamHasher.php b/vendor/league/flysystem/src/Util/StreamHasher.php
deleted file mode 100644
index 938ec5db7..000000000
--- a/vendor/league/flysystem/src/Util/StreamHasher.php
+++ /dev/null
@@ -1,36 +0,0 @@
-algo = $algo;
- }
-
- /**
- * @param resource $resource
- *
- * @return string
- */
- public function hash($resource)
- {
- rewind($resource);
- $context = hash_init($this->algo);
- hash_update_stream($context, $resource);
- fclose($resource);
-
- return hash_final($context);
- }
-}
diff --git a/vendor/league/mime-type-detection/CHANGELOG.md b/vendor/league/mime-type-detection/CHANGELOG.md
deleted file mode 100644
index 2264f7ad8..000000000
--- a/vendor/league/mime-type-detection/CHANGELOG.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Changelog
-
-## 1.10.0 - 2022-04-11
-
-### Fixed
-
-- Added Flysystem v1 inconclusive mime-types and made it configurable as a constructor parameter.
-
-## 1.9.0 - 2021-11-21
-
-### Updated
-
-- Updated lookup
-
-## 1.8.0 - 2021-09-25
-
-### Added
-
-- Added the decorator `OverridingExtensionToMimeTypeMap` which allows you to override values.
-
-## 1.7.0 - 2021-01-18
-
-### Added
-
-- Added a `bufferSampleSize` parameter to the `FinfoMimeTypeDetector` class that allows you to send a reduced content sample which costs less memory.
-
-## 1.6.0 - 2021-01-18
-
-### Changes
-
-- Updated generated mime-type map
diff --git a/vendor/league/mime-type-detection/LICENSE b/vendor/league/mime-type-detection/LICENSE
deleted file mode 100644
index 1f0165218..000000000
--- a/vendor/league/mime-type-detection/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2013-2022 Frank de Jonge
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/vendor/league/mime-type-detection/composer.json b/vendor/league/mime-type-detection/composer.json
deleted file mode 100644
index 80ca1af81..000000000
--- a/vendor/league/mime-type-detection/composer.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "league/mime-type-detection",
- "description": "Mime-type detection for Flysystem",
- "license": "MIT",
- "authors": [
- {
- "name": "Frank de Jonge",
- "email": "info@frankdejonge.nl"
- }
- ],
- "scripts": {
- "test": "vendor/bin/phpunit",
- "phpstan": "vendor/bin/phpstan analyse -l 6 src"
- },
- "require": {
- "php": "^7.2 || ^8.0",
- "ext-fileinfo": "*"
- },
- "require-dev": {
- "phpunit/phpunit": "^8.5.8 || ^9.3",
- "phpstan/phpstan": "^0.12.68",
- "friendsofphp/php-cs-fixer": "^3.2"
- },
- "autoload": {
- "psr-4": {
- "League\\MimeTypeDetection\\": "src"
- }
- },
- "config": {
- "platform": {
- "php": "7.2.0"
- }
- }
-}
diff --git a/vendor/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php b/vendor/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php
deleted file mode 100644
index fc0424161..000000000
--- a/vendor/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php
+++ /dev/null
@@ -1,13 +0,0 @@
-extensions = $extensions ?: new GeneratedExtensionToMimeTypeMap();
- }
-
- public function detectMimeType(string $path, $contents): ?string
- {
- return $this->detectMimeTypeFromPath($path);
- }
-
- public function detectMimeTypeFromPath(string $path): ?string
- {
- $extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
-
- return $this->extensions->lookupMimeType($extension);
- }
-
- public function detectMimeTypeFromFile(string $path): ?string
- {
- return $this->detectMimeTypeFromPath($path);
- }
-
- public function detectMimeTypeFromBuffer(string $contents): ?string
- {
- return null;
- }
-}
diff --git a/vendor/league/mime-type-detection/src/ExtensionToMimeTypeMap.php b/vendor/league/mime-type-detection/src/ExtensionToMimeTypeMap.php
deleted file mode 100644
index 1dad7bc1a..000000000
--- a/vendor/league/mime-type-detection/src/ExtensionToMimeTypeMap.php
+++ /dev/null
@@ -1,10 +0,0 @@
-
- */
- private $inconclusiveMimetypes;
-
- public function __construct(
- string $magicFile = '',
- ExtensionToMimeTypeMap $extensionMap = null,
- ?int $bufferSampleSize = null,
- array $inconclusiveMimetypes = self::INCONCLUSIVE_MIME_TYPES
- ) {
- $this->finfo = new finfo(FILEINFO_MIME_TYPE, $magicFile);
- $this->extensionMap = $extensionMap ?: new GeneratedExtensionToMimeTypeMap();
- $this->bufferSampleSize = $bufferSampleSize;
- $this->inconclusiveMimetypes = $inconclusiveMimetypes;
- }
-
- public function detectMimeType(string $path, $contents): ?string
- {
- $mimeType = is_string($contents)
- ? (@$this->finfo->buffer($this->takeSample($contents)) ?: null)
- : null;
-
- if ($mimeType !== null && ! in_array($mimeType, $this->inconclusiveMimetypes)) {
- return $mimeType;
- }
-
- return $this->detectMimeTypeFromPath($path);
- }
-
- public function detectMimeTypeFromPath(string $path): ?string
- {
- $extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
-
- return $this->extensionMap->lookupMimeType($extension);
- }
-
- public function detectMimeTypeFromFile(string $path): ?string
- {
- return @$this->finfo->file($path) ?: null;
- }
-
- public function detectMimeTypeFromBuffer(string $contents): ?string
- {
- return @$this->finfo->buffer($this->takeSample($contents)) ?: null;
- }
-
- private function takeSample(string $contents): string
- {
- if ($this->bufferSampleSize === null) {
- return $contents;
- }
-
- return (string) substr($contents, 0, $this->bufferSampleSize);
- }
-}
diff --git a/vendor/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php b/vendor/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php
deleted file mode 100644
index f092388dd..000000000
--- a/vendor/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php
+++ /dev/null
@@ -1,1227 +0,0 @@
- 'application/vnd.1000minds.decision-model+xml',
- '3dml' => 'text/vnd.in3d.3dml',
- '3ds' => 'image/x-3ds',
- '3g2' => 'video/3gpp2',
- '3gp' => 'video/3gp',
- '3gpp' => 'video/3gpp',
- '3mf' => 'model/3mf',
- '7z' => 'application/x-7z-compressed',
- '7zip' => 'application/x-7z-compressed',
- '123' => 'application/vnd.lotus-1-2-3',
- 'aab' => 'application/x-authorware-bin',
- 'aac' => 'audio/x-acc',
- 'aam' => 'application/x-authorware-map',
- 'aas' => 'application/x-authorware-seg',
- 'abw' => 'application/x-abiword',
- 'ac' => 'application/vnd.nokia.n-gage.ac+xml',
- 'ac3' => 'audio/ac3',
- 'acc' => 'application/vnd.americandynamics.acc',
- 'ace' => 'application/x-ace-compressed',
- 'acu' => 'application/vnd.acucobol',
- 'acutc' => 'application/vnd.acucorp',
- 'adp' => 'audio/adpcm',
- 'aep' => 'application/vnd.audiograph',
- 'afm' => 'application/x-font-type1',
- 'afp' => 'application/vnd.ibm.modcap',
- 'age' => 'application/vnd.age',
- 'ahead' => 'application/vnd.ahead.space',
- 'ai' => 'application/pdf',
- 'aif' => 'audio/x-aiff',
- 'aifc' => 'audio/x-aiff',
- 'aiff' => 'audio/x-aiff',
- 'air' => 'application/vnd.adobe.air-application-installer-package+zip',
- 'ait' => 'application/vnd.dvb.ait',
- 'ami' => 'application/vnd.amiga.ami',
- 'amr' => 'audio/amr',
- 'apk' => 'application/vnd.android.package-archive',
- 'apng' => 'image/apng',
- 'appcache' => 'text/cache-manifest',
- 'application' => 'application/x-ms-application',
- 'apr' => 'application/vnd.lotus-approach',
- 'arc' => 'application/x-freearc',
- 'arj' => 'application/x-arj',
- 'asc' => 'application/pgp-signature',
- 'asf' => 'video/x-ms-asf',
- 'asm' => 'text/x-asm',
- 'aso' => 'application/vnd.accpac.simply.aso',
- 'asx' => 'video/x-ms-asf',
- 'atc' => 'application/vnd.acucorp',
- 'atom' => 'application/atom+xml',
- 'atomcat' => 'application/atomcat+xml',
- 'atomdeleted' => 'application/atomdeleted+xml',
- 'atomsvc' => 'application/atomsvc+xml',
- 'atx' => 'application/vnd.antix.game-component',
- 'au' => 'audio/x-au',
- 'avci' => 'image/avci',
- 'avcs' => 'image/avcs',
- 'avi' => 'video/x-msvideo',
- 'avif' => 'image/avif',
- 'aw' => 'application/applixware',
- 'azf' => 'application/vnd.airzip.filesecure.azf',
- 'azs' => 'application/vnd.airzip.filesecure.azs',
- 'azv' => 'image/vnd.airzip.accelerator.azv',
- 'azw' => 'application/vnd.amazon.ebook',
- 'b16' => 'image/vnd.pco.b16',
- 'bat' => 'application/x-msdownload',
- 'bcpio' => 'application/x-bcpio',
- 'bdf' => 'application/x-font-bdf',
- 'bdm' => 'application/vnd.syncml.dm+wbxml',
- 'bdoc' => 'application/x-bdoc',
- 'bed' => 'application/vnd.realvnc.bed',
- 'bh2' => 'application/vnd.fujitsu.oasysprs',
- 'bin' => 'application/octet-stream',
- 'blb' => 'application/x-blorb',
- 'blorb' => 'application/x-blorb',
- 'bmi' => 'application/vnd.bmi',
- 'bmml' => 'application/vnd.balsamiq.bmml+xml',
- 'bmp' => 'image/bmp',
- 'book' => 'application/vnd.framemaker',
- 'box' => 'application/vnd.previewsystems.box',
- 'boz' => 'application/x-bzip2',
- 'bpk' => 'application/octet-stream',
- 'bpmn' => 'application/octet-stream',
- 'bsp' => 'model/vnd.valve.source.compiled-map',
- 'btif' => 'image/prs.btif',
- 'buffer' => 'application/octet-stream',
- 'bz' => 'application/x-bzip',
- 'bz2' => 'application/x-bzip2',
- 'c' => 'text/x-c',
- 'c4d' => 'application/vnd.clonk.c4group',
- 'c4f' => 'application/vnd.clonk.c4group',
- 'c4g' => 'application/vnd.clonk.c4group',
- 'c4p' => 'application/vnd.clonk.c4group',
- 'c4u' => 'application/vnd.clonk.c4group',
- 'c11amc' => 'application/vnd.cluetrust.cartomobile-config',
- 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg',
- 'cab' => 'application/vnd.ms-cab-compressed',
- 'caf' => 'audio/x-caf',
- 'cap' => 'application/vnd.tcpdump.pcap',
- 'car' => 'application/vnd.curl.car',
- 'cat' => 'application/vnd.ms-pki.seccat',
- 'cb7' => 'application/x-cbr',
- 'cba' => 'application/x-cbr',
- 'cbr' => 'application/x-cbr',
- 'cbt' => 'application/x-cbr',
- 'cbz' => 'application/x-cbr',
- 'cc' => 'text/x-c',
- 'cco' => 'application/x-cocoa',
- 'cct' => 'application/x-director',
- 'ccxml' => 'application/ccxml+xml',
- 'cdbcmsg' => 'application/vnd.contact.cmsg',
- 'cdf' => 'application/x-netcdf',
- 'cdfx' => 'application/cdfx+xml',
- 'cdkey' => 'application/vnd.mediastation.cdkey',
- 'cdmia' => 'application/cdmi-capability',
- 'cdmic' => 'application/cdmi-container',
- 'cdmid' => 'application/cdmi-domain',
- 'cdmio' => 'application/cdmi-object',
- 'cdmiq' => 'application/cdmi-queue',
- 'cdr' => 'application/cdr',
- 'cdx' => 'chemical/x-cdx',
- 'cdxml' => 'application/vnd.chemdraw+xml',
- 'cdy' => 'application/vnd.cinderella',
- 'cer' => 'application/pkix-cert',
- 'cfs' => 'application/x-cfs-compressed',
- 'cgm' => 'image/cgm',
- 'chat' => 'application/x-chat',
- 'chm' => 'application/vnd.ms-htmlhelp',
- 'chrt' => 'application/vnd.kde.kchart',
- 'cif' => 'chemical/x-cif',
- 'cii' => 'application/vnd.anser-web-certificate-issue-initiation',
- 'cil' => 'application/vnd.ms-artgalry',
- 'cjs' => 'application/node',
- 'cla' => 'application/vnd.claymore',
- 'class' => 'application/octet-stream',
- 'clkk' => 'application/vnd.crick.clicker.keyboard',
- 'clkp' => 'application/vnd.crick.clicker.palette',
- 'clkt' => 'application/vnd.crick.clicker.template',
- 'clkw' => 'application/vnd.crick.clicker.wordbank',
- 'clkx' => 'application/vnd.crick.clicker',
- 'clp' => 'application/x-msclip',
- 'cmc' => 'application/vnd.cosmocaller',
- 'cmdf' => 'chemical/x-cmdf',
- 'cml' => 'chemical/x-cml',
- 'cmp' => 'application/vnd.yellowriver-custom-menu',
- 'cmx' => 'image/x-cmx',
- 'cod' => 'application/vnd.rim.cod',
- 'coffee' => 'text/coffeescript',
- 'com' => 'application/x-msdownload',
- 'conf' => 'text/plain',
- 'cpio' => 'application/x-cpio',
- 'cpl' => 'application/cpl+xml',
- 'cpp' => 'text/x-c',
- 'cpt' => 'application/mac-compactpro',
- 'crd' => 'application/x-mscardfile',
- 'crl' => 'application/pkix-crl',
- 'crt' => 'application/x-x509-ca-cert',
- 'crx' => 'application/x-chrome-extension',
- 'cryptonote' => 'application/vnd.rig.cryptonote',
- 'csh' => 'application/x-csh',
- 'csl' => 'application/vnd.citationstyles.style+xml',
- 'csml' => 'chemical/x-csml',
- 'csp' => 'application/vnd.commonspace',
- 'csr' => 'application/octet-stream',
- 'css' => 'text/css',
- 'cst' => 'application/x-director',
- 'csv' => 'text/csv',
- 'cu' => 'application/cu-seeme',
- 'curl' => 'text/vnd.curl',
- 'cww' => 'application/prs.cww',
- 'cxt' => 'application/x-director',
- 'cxx' => 'text/x-c',
- 'dae' => 'model/vnd.collada+xml',
- 'daf' => 'application/vnd.mobius.daf',
- 'dart' => 'application/vnd.dart',
- 'dataless' => 'application/vnd.fdsn.seed',
- 'davmount' => 'application/davmount+xml',
- 'dbf' => 'application/vnd.dbf',
- 'dbk' => 'application/docbook+xml',
- 'dcr' => 'application/x-director',
- 'dcurl' => 'text/vnd.curl.dcurl',
- 'dd2' => 'application/vnd.oma.dd2+xml',
- 'ddd' => 'application/vnd.fujixerox.ddd',
- 'ddf' => 'application/vnd.syncml.dmddf+xml',
- 'dds' => 'image/vnd.ms-dds',
- 'deb' => 'application/x-debian-package',
- 'def' => 'text/plain',
- 'deploy' => 'application/octet-stream',
- 'der' => 'application/x-x509-ca-cert',
- 'dfac' => 'application/vnd.dreamfactory',
- 'dgc' => 'application/x-dgc-compressed',
- 'dic' => 'text/x-c',
- 'dir' => 'application/x-director',
- 'dis' => 'application/vnd.mobius.dis',
- 'disposition-notification' => 'message/disposition-notification',
- 'dist' => 'application/octet-stream',
- 'distz' => 'application/octet-stream',
- 'djv' => 'image/vnd.djvu',
- 'djvu' => 'image/vnd.djvu',
- 'dll' => 'application/octet-stream',
- 'dmg' => 'application/x-apple-diskimage',
- 'dmn' => 'application/octet-stream',
- 'dmp' => 'application/vnd.tcpdump.pcap',
- 'dms' => 'application/octet-stream',
- 'dna' => 'application/vnd.dna',
- 'doc' => 'application/msword',
- 'docm' => 'application/vnd.ms-word.template.macroEnabled.12',
- 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
- 'dot' => 'application/msword',
- 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
- 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
- 'dp' => 'application/vnd.osgi.dp',
- 'dpg' => 'application/vnd.dpgraph',
- 'dra' => 'audio/vnd.dra',
- 'drle' => 'image/dicom-rle',
- 'dsc' => 'text/prs.lines.tag',
- 'dssc' => 'application/dssc+der',
- 'dtb' => 'application/x-dtbook+xml',
- 'dtd' => 'application/xml-dtd',
- 'dts' => 'audio/vnd.dts',
- 'dtshd' => 'audio/vnd.dts.hd',
- 'dump' => 'application/octet-stream',
- 'dvb' => 'video/vnd.dvb.file',
- 'dvi' => 'application/x-dvi',
- 'dwd' => 'application/atsc-dwd+xml',
- 'dwf' => 'model/vnd.dwf',
- 'dwg' => 'image/vnd.dwg',
- 'dxf' => 'image/vnd.dxf',
- 'dxp' => 'application/vnd.spotfire.dxp',
- 'dxr' => 'application/x-director',
- 'ear' => 'application/java-archive',
- 'ecelp4800' => 'audio/vnd.nuera.ecelp4800',
- 'ecelp7470' => 'audio/vnd.nuera.ecelp7470',
- 'ecelp9600' => 'audio/vnd.nuera.ecelp9600',
- 'ecma' => 'application/ecmascript',
- 'edm' => 'application/vnd.novadigm.edm',
- 'edx' => 'application/vnd.novadigm.edx',
- 'efif' => 'application/vnd.picsel',
- 'ei6' => 'application/vnd.pg.osasli',
- 'elc' => 'application/octet-stream',
- 'emf' => 'image/emf',
- 'eml' => 'message/rfc822',
- 'emma' => 'application/emma+xml',
- 'emotionml' => 'application/emotionml+xml',
- 'emz' => 'application/x-msmetafile',
- 'eol' => 'audio/vnd.digital-winds',
- 'eot' => 'application/vnd.ms-fontobject',
- 'eps' => 'application/postscript',
- 'epub' => 'application/epub+zip',
- 'es' => 'application/ecmascript',
- 'es3' => 'application/vnd.eszigno3+xml',
- 'esa' => 'application/vnd.osgi.subsystem',
- 'esf' => 'application/vnd.epson.esf',
- 'et3' => 'application/vnd.eszigno3+xml',
- 'etx' => 'text/x-setext',
- 'eva' => 'application/x-eva',
- 'evy' => 'application/x-envoy',
- 'exe' => 'application/octet-stream',
- 'exi' => 'application/exi',
- 'exp' => 'application/express',
- 'exr' => 'image/aces',
- 'ext' => 'application/vnd.novadigm.ext',
- 'ez' => 'application/andrew-inset',
- 'ez2' => 'application/vnd.ezpix-album',
- 'ez3' => 'application/vnd.ezpix-package',
- 'f' => 'text/x-fortran',
- 'f4v' => 'video/mp4',
- 'f77' => 'text/x-fortran',
- 'f90' => 'text/x-fortran',
- 'fbs' => 'image/vnd.fastbidsheet',
- 'fcdt' => 'application/vnd.adobe.formscentral.fcdt',
- 'fcs' => 'application/vnd.isac.fcs',
- 'fdf' => 'application/vnd.fdf',
- 'fdt' => 'application/fdt+xml',
- 'fe_launch' => 'application/vnd.denovo.fcselayout-link',
- 'fg5' => 'application/vnd.fujitsu.oasysgp',
- 'fgd' => 'application/x-director',
- 'fh' => 'image/x-freehand',
- 'fh4' => 'image/x-freehand',
- 'fh5' => 'image/x-freehand',
- 'fh7' => 'image/x-freehand',
- 'fhc' => 'image/x-freehand',
- 'fig' => 'application/x-xfig',
- 'fits' => 'image/fits',
- 'flac' => 'audio/x-flac',
- 'fli' => 'video/x-fli',
- 'flo' => 'application/vnd.micrografx.flo',
- 'flv' => 'video/x-flv',
- 'flw' => 'application/vnd.kde.kivio',
- 'flx' => 'text/vnd.fmi.flexstor',
- 'fly' => 'text/vnd.fly',
- 'fm' => 'application/vnd.framemaker',
- 'fnc' => 'application/vnd.frogans.fnc',
- 'fo' => 'application/vnd.software602.filler.form+xml',
- 'for' => 'text/x-fortran',
- 'fpx' => 'image/vnd.fpx',
- 'frame' => 'application/vnd.framemaker',
- 'fsc' => 'application/vnd.fsc.weblaunch',
- 'fst' => 'image/vnd.fst',
- 'ftc' => 'application/vnd.fluxtime.clip',
- 'fti' => 'application/vnd.anser-web-funds-transfer-initiation',
- 'fvt' => 'video/vnd.fvt',
- 'fxp' => 'application/vnd.adobe.fxp',
- 'fxpl' => 'application/vnd.adobe.fxp',
- 'fzs' => 'application/vnd.fuzzysheet',
- 'g2w' => 'application/vnd.geoplan',
- 'g3' => 'image/g3fax',
- 'g3w' => 'application/vnd.geospace',
- 'gac' => 'application/vnd.groove-account',
- 'gam' => 'application/x-tads',
- 'gbr' => 'application/rpki-ghostbusters',
- 'gca' => 'application/x-gca-compressed',
- 'gdl' => 'model/vnd.gdl',
- 'gdoc' => 'application/vnd.google-apps.document',
- 'ged' => 'text/vnd.familysearch.gedcom',
- 'geo' => 'application/vnd.dynageo',
- 'geojson' => 'application/geo+json',
- 'gex' => 'application/vnd.geometry-explorer',
- 'ggb' => 'application/vnd.geogebra.file',
- 'ggt' => 'application/vnd.geogebra.tool',
- 'ghf' => 'application/vnd.groove-help',
- 'gif' => 'image/gif',
- 'gim' => 'application/vnd.groove-identity-message',
- 'glb' => 'model/gltf-binary',
- 'gltf' => 'model/gltf+json',
- 'gml' => 'application/gml+xml',
- 'gmx' => 'application/vnd.gmx',
- 'gnumeric' => 'application/x-gnumeric',
- 'gpg' => 'application/gpg-keys',
- 'gph' => 'application/vnd.flographit',
- 'gpx' => 'application/gpx+xml',
- 'gqf' => 'application/vnd.grafeq',
- 'gqs' => 'application/vnd.grafeq',
- 'gram' => 'application/srgs',
- 'gramps' => 'application/x-gramps-xml',
- 'gre' => 'application/vnd.geometry-explorer',
- 'grv' => 'application/vnd.groove-injector',
- 'grxml' => 'application/srgs+xml',
- 'gsf' => 'application/x-font-ghostscript',
- 'gsheet' => 'application/vnd.google-apps.spreadsheet',
- 'gslides' => 'application/vnd.google-apps.presentation',
- 'gtar' => 'application/x-gtar',
- 'gtm' => 'application/vnd.groove-tool-message',
- 'gtw' => 'model/vnd.gtw',
- 'gv' => 'text/vnd.graphviz',
- 'gxf' => 'application/gxf',
- 'gxt' => 'application/vnd.geonext',
- 'gz' => 'application/gzip',
- 'gzip' => 'application/gzip',
- 'h' => 'text/x-c',
- 'h261' => 'video/h261',
- 'h263' => 'video/h263',
- 'h264' => 'video/h264',
- 'hal' => 'application/vnd.hal+xml',
- 'hbci' => 'application/vnd.hbci',
- 'hbs' => 'text/x-handlebars-template',
- 'hdd' => 'application/x-virtualbox-hdd',
- 'hdf' => 'application/x-hdf',
- 'heic' => 'image/heic',
- 'heics' => 'image/heic-sequence',
- 'heif' => 'image/heif',
- 'heifs' => 'image/heif-sequence',
- 'hej2' => 'image/hej2k',
- 'held' => 'application/atsc-held+xml',
- 'hh' => 'text/x-c',
- 'hjson' => 'application/hjson',
- 'hlp' => 'application/winhlp',
- 'hpgl' => 'application/vnd.hp-hpgl',
- 'hpid' => 'application/vnd.hp-hpid',
- 'hps' => 'application/vnd.hp-hps',
- 'hqx' => 'application/mac-binhex40',
- 'hsj2' => 'image/hsj2',
- 'htc' => 'text/x-component',
- 'htke' => 'application/vnd.kenameaapp',
- 'htm' => 'text/html',
- 'html' => 'text/html',
- 'hvd' => 'application/vnd.yamaha.hv-dic',
- 'hvp' => 'application/vnd.yamaha.hv-voice',
- 'hvs' => 'application/vnd.yamaha.hv-script',
- 'i2g' => 'application/vnd.intergeo',
- 'icc' => 'application/vnd.iccprofile',
- 'ice' => 'x-conference/x-cooltalk',
- 'icm' => 'application/vnd.iccprofile',
- 'ico' => 'image/x-icon',
- 'ics' => 'text/calendar',
- 'ief' => 'image/ief',
- 'ifb' => 'text/calendar',
- 'ifm' => 'application/vnd.shana.informed.formdata',
- 'iges' => 'model/iges',
- 'igl' => 'application/vnd.igloader',
- 'igm' => 'application/vnd.insors.igm',
- 'igs' => 'model/iges',
- 'igx' => 'application/vnd.micrografx.igx',
- 'iif' => 'application/vnd.shana.informed.interchange',
- 'img' => 'application/octet-stream',
- 'imp' => 'application/vnd.accpac.simply.imp',
- 'ims' => 'application/vnd.ms-ims',
- 'in' => 'text/plain',
- 'ini' => 'text/plain',
- 'ink' => 'application/inkml+xml',
- 'inkml' => 'application/inkml+xml',
- 'install' => 'application/x-install-instructions',
- 'iota' => 'application/vnd.astraea-software.iota',
- 'ipfix' => 'application/ipfix',
- 'ipk' => 'application/vnd.shana.informed.package',
- 'irm' => 'application/vnd.ibm.rights-management',
- 'irp' => 'application/vnd.irepository.package+xml',
- 'iso' => 'application/x-iso9660-image',
- 'itp' => 'application/vnd.shana.informed.formtemplate',
- 'its' => 'application/its+xml',
- 'ivp' => 'application/vnd.immervision-ivp',
- 'ivu' => 'application/vnd.immervision-ivu',
- 'jad' => 'text/vnd.sun.j2me.app-descriptor',
- 'jade' => 'text/jade',
- 'jam' => 'application/vnd.jam',
- 'jar' => 'application/java-archive',
- 'jardiff' => 'application/x-java-archive-diff',
- 'java' => 'text/x-java-source',
- 'jhc' => 'image/jphc',
- 'jisp' => 'application/vnd.jisp',
- 'jls' => 'image/jls',
- 'jlt' => 'application/vnd.hp-jlyt',
- 'jng' => 'image/x-jng',
- 'jnlp' => 'application/x-java-jnlp-file',
- 'joda' => 'application/vnd.joost.joda-archive',
- 'jp2' => 'image/jp2',
- 'jpe' => 'image/jpeg',
- 'jpeg' => 'image/jpeg',
- 'jpf' => 'image/jpx',
- 'jpg' => 'image/jpeg',
- 'jpg2' => 'image/jp2',
- 'jpgm' => 'video/jpm',
- 'jpgv' => 'video/jpeg',
- 'jph' => 'image/jph',
- 'jpm' => 'video/jpm',
- 'jpx' => 'image/jpx',
- 'js' => 'application/javascript',
- 'json' => 'application/json',
- 'json5' => 'application/json5',
- 'jsonld' => 'application/ld+json',
- 'jsonml' => 'application/jsonml+json',
- 'jsx' => 'text/jsx',
- 'jxr' => 'image/jxr',
- 'jxra' => 'image/jxra',
- 'jxrs' => 'image/jxrs',
- 'jxs' => 'image/jxs',
- 'jxsc' => 'image/jxsc',
- 'jxsi' => 'image/jxsi',
- 'jxss' => 'image/jxss',
- 'kar' => 'audio/midi',
- 'karbon' => 'application/vnd.kde.karbon',
- 'kdb' => 'application/octet-stream',
- 'kdbx' => 'application/x-keepass2',
- 'key' => 'application/x-iwork-keynote-sffkey',
- 'kfo' => 'application/vnd.kde.kformula',
- 'kia' => 'application/vnd.kidspiration',
- 'kml' => 'application/vnd.google-earth.kml+xml',
- 'kmz' => 'application/vnd.google-earth.kmz',
- 'kne' => 'application/vnd.kinar',
- 'knp' => 'application/vnd.kinar',
- 'kon' => 'application/vnd.kde.kontour',
- 'kpr' => 'application/vnd.kde.kpresenter',
- 'kpt' => 'application/vnd.kde.kpresenter',
- 'kpxx' => 'application/vnd.ds-keypoint',
- 'ksp' => 'application/vnd.kde.kspread',
- 'ktr' => 'application/vnd.kahootz',
- 'ktx' => 'image/ktx',
- 'ktx2' => 'image/ktx2',
- 'ktz' => 'application/vnd.kahootz',
- 'kwd' => 'application/vnd.kde.kword',
- 'kwt' => 'application/vnd.kde.kword',
- 'lasxml' => 'application/vnd.las.las+xml',
- 'latex' => 'application/x-latex',
- 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop',
- 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml',
- 'les' => 'application/vnd.hhe.lesson-player',
- 'less' => 'text/less',
- 'lgr' => 'application/lgr+xml',
- 'lha' => 'application/octet-stream',
- 'link66' => 'application/vnd.route66.link66+xml',
- 'list' => 'text/plain',
- 'list3820' => 'application/vnd.ibm.modcap',
- 'listafp' => 'application/vnd.ibm.modcap',
- 'litcoffee' => 'text/coffeescript',
- 'lnk' => 'application/x-ms-shortcut',
- 'log' => 'text/plain',
- 'lostxml' => 'application/lost+xml',
- 'lrf' => 'application/octet-stream',
- 'lrm' => 'application/vnd.ms-lrm',
- 'ltf' => 'application/vnd.frogans.ltf',
- 'lua' => 'text/x-lua',
- 'luac' => 'application/x-lua-bytecode',
- 'lvp' => 'audio/vnd.lucent.voice',
- 'lwp' => 'application/vnd.lotus-wordpro',
- 'lzh' => 'application/octet-stream',
- 'm1v' => 'video/mpeg',
- 'm2a' => 'audio/mpeg',
- 'm2v' => 'video/mpeg',
- 'm3a' => 'audio/mpeg',
- 'm3u' => 'text/plain',
- 'm3u8' => 'application/vnd.apple.mpegurl',
- 'm4a' => 'audio/x-m4a',
- 'm4p' => 'application/mp4',
- 'm4s' => 'video/iso.segment',
- 'm4u' => 'application/vnd.mpegurl',
- 'm4v' => 'video/x-m4v',
- 'm13' => 'application/x-msmediaview',
- 'm14' => 'application/x-msmediaview',
- 'm21' => 'application/mp21',
- 'ma' => 'application/mathematica',
- 'mads' => 'application/mads+xml',
- 'maei' => 'application/mmt-aei+xml',
- 'mag' => 'application/vnd.ecowin.chart',
- 'maker' => 'application/vnd.framemaker',
- 'man' => 'text/troff',
- 'manifest' => 'text/cache-manifest',
- 'map' => 'application/json',
- 'mar' => 'application/octet-stream',
- 'markdown' => 'text/markdown',
- 'mathml' => 'application/mathml+xml',
- 'mb' => 'application/mathematica',
- 'mbk' => 'application/vnd.mobius.mbk',
- 'mbox' => 'application/mbox',
- 'mc1' => 'application/vnd.medcalcdata',
- 'mcd' => 'application/vnd.mcd',
- 'mcurl' => 'text/vnd.curl.mcurl',
- 'md' => 'text/markdown',
- 'mdb' => 'application/x-msaccess',
- 'mdi' => 'image/vnd.ms-modi',
- 'mdx' => 'text/mdx',
- 'me' => 'text/troff',
- 'mesh' => 'model/mesh',
- 'meta4' => 'application/metalink4+xml',
- 'metalink' => 'application/metalink+xml',
- 'mets' => 'application/mets+xml',
- 'mfm' => 'application/vnd.mfmp',
- 'mft' => 'application/rpki-manifest',
- 'mgp' => 'application/vnd.osgeo.mapguide.package',
- 'mgz' => 'application/vnd.proteus.magazine',
- 'mid' => 'audio/midi',
- 'midi' => 'audio/midi',
- 'mie' => 'application/x-mie',
- 'mif' => 'application/vnd.mif',
- 'mime' => 'message/rfc822',
- 'mj2' => 'video/mj2',
- 'mjp2' => 'video/mj2',
- 'mjs' => 'application/javascript',
- 'mk3d' => 'video/x-matroska',
- 'mka' => 'audio/x-matroska',
- 'mkd' => 'text/x-markdown',
- 'mks' => 'video/x-matroska',
- 'mkv' => 'video/x-matroska',
- 'mlp' => 'application/vnd.dolby.mlp',
- 'mmd' => 'application/vnd.chipnuts.karaoke-mmd',
- 'mmf' => 'application/vnd.smaf',
- 'mml' => 'text/mathml',
- 'mmr' => 'image/vnd.fujixerox.edmics-mmr',
- 'mng' => 'video/x-mng',
- 'mny' => 'application/x-msmoney',
- 'mobi' => 'application/x-mobipocket-ebook',
- 'mods' => 'application/mods+xml',
- 'mov' => 'video/quicktime',
- 'movie' => 'video/x-sgi-movie',
- 'mp2' => 'audio/mpeg',
- 'mp2a' => 'audio/mpeg',
- 'mp3' => 'audio/mpeg',
- 'mp4' => 'video/mp4',
- 'mp4a' => 'audio/mp4',
- 'mp4s' => 'application/mp4',
- 'mp4v' => 'video/mp4',
- 'mp21' => 'application/mp21',
- 'mpc' => 'application/vnd.mophun.certificate',
- 'mpd' => 'application/dash+xml',
- 'mpe' => 'video/mpeg',
- 'mpeg' => 'video/mpeg',
- 'mpf' => 'application/media-policy-dataset+xml',
- 'mpg' => 'video/mpeg',
- 'mpg4' => 'video/mp4',
- 'mpga' => 'audio/mpeg',
- 'mpkg' => 'application/vnd.apple.installer+xml',
- 'mpm' => 'application/vnd.blueice.multipass',
- 'mpn' => 'application/vnd.mophun.application',
- 'mpp' => 'application/vnd.ms-project',
- 'mpt' => 'application/vnd.ms-project',
- 'mpy' => 'application/vnd.ibm.minipay',
- 'mqy' => 'application/vnd.mobius.mqy',
- 'mrc' => 'application/marc',
- 'mrcx' => 'application/marcxml+xml',
- 'ms' => 'text/troff',
- 'mscml' => 'application/mediaservercontrol+xml',
- 'mseed' => 'application/vnd.fdsn.mseed',
- 'mseq' => 'application/vnd.mseq',
- 'msf' => 'application/vnd.epson.msf',
- 'msg' => 'application/vnd.ms-outlook',
- 'msh' => 'model/mesh',
- 'msi' => 'application/x-msdownload',
- 'msl' => 'application/vnd.mobius.msl',
- 'msm' => 'application/octet-stream',
- 'msp' => 'application/octet-stream',
- 'msty' => 'application/vnd.muvee.style',
- 'mtl' => 'model/mtl',
- 'mts' => 'model/vnd.mts',
- 'mus' => 'application/vnd.musician',
- 'musd' => 'application/mmt-usd+xml',
- 'musicxml' => 'application/vnd.recordare.musicxml+xml',
- 'mvb' => 'application/x-msmediaview',
- 'mvt' => 'application/vnd.mapbox-vector-tile',
- 'mwf' => 'application/vnd.mfer',
- 'mxf' => 'application/mxf',
- 'mxl' => 'application/vnd.recordare.musicxml',
- 'mxmf' => 'audio/mobile-xmf',
- 'mxml' => 'application/xv+xml',
- 'mxs' => 'application/vnd.triscape.mxs',
- 'mxu' => 'video/vnd.mpegurl',
- 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install',
- 'n3' => 'text/n3',
- 'nb' => 'application/mathematica',
- 'nbp' => 'application/vnd.wolfram.player',
- 'nc' => 'application/x-netcdf',
- 'ncx' => 'application/x-dtbncx+xml',
- 'nfo' => 'text/x-nfo',
- 'ngdat' => 'application/vnd.nokia.n-gage.data',
- 'nitf' => 'application/vnd.nitf',
- 'nlu' => 'application/vnd.neurolanguage.nlu',
- 'nml' => 'application/vnd.enliven',
- 'nnd' => 'application/vnd.noblenet-directory',
- 'nns' => 'application/vnd.noblenet-sealer',
- 'nnw' => 'application/vnd.noblenet-web',
- 'npx' => 'image/vnd.net-fpx',
- 'nq' => 'application/n-quads',
- 'nsc' => 'application/x-conference',
- 'nsf' => 'application/vnd.lotus-notes',
- 'nt' => 'application/n-triples',
- 'ntf' => 'application/vnd.nitf',
- 'numbers' => 'application/x-iwork-numbers-sffnumbers',
- 'nzb' => 'application/x-nzb',
- 'oa2' => 'application/vnd.fujitsu.oasys2',
- 'oa3' => 'application/vnd.fujitsu.oasys3',
- 'oas' => 'application/vnd.fujitsu.oasys',
- 'obd' => 'application/x-msbinder',
- 'obgx' => 'application/vnd.openblox.game+xml',
- 'obj' => 'model/obj',
- 'oda' => 'application/oda',
- 'odb' => 'application/vnd.oasis.opendocument.database',
- 'odc' => 'application/vnd.oasis.opendocument.chart',
- 'odf' => 'application/vnd.oasis.opendocument.formula',
- 'odft' => 'application/vnd.oasis.opendocument.formula-template',
- 'odg' => 'application/vnd.oasis.opendocument.graphics',
- 'odi' => 'application/vnd.oasis.opendocument.image',
- 'odm' => 'application/vnd.oasis.opendocument.text-master',
- 'odp' => 'application/vnd.oasis.opendocument.presentation',
- 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
- 'odt' => 'application/vnd.oasis.opendocument.text',
- 'oga' => 'audio/ogg',
- 'ogex' => 'model/vnd.opengex',
- 'ogg' => 'audio/ogg',
- 'ogv' => 'video/ogg',
- 'ogx' => 'application/ogg',
- 'omdoc' => 'application/omdoc+xml',
- 'onepkg' => 'application/onenote',
- 'onetmp' => 'application/onenote',
- 'onetoc' => 'application/onenote',
- 'onetoc2' => 'application/onenote',
- 'opf' => 'application/oebps-package+xml',
- 'opml' => 'text/x-opml',
- 'oprc' => 'application/vnd.palm',
- 'opus' => 'audio/ogg',
- 'org' => 'text/x-org',
- 'osf' => 'application/vnd.yamaha.openscoreformat',
- 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml',
- 'osm' => 'application/vnd.openstreetmap.data+xml',
- 'otc' => 'application/vnd.oasis.opendocument.chart-template',
- 'otf' => 'font/otf',
- 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
- 'oth' => 'application/vnd.oasis.opendocument.text-web',
- 'oti' => 'application/vnd.oasis.opendocument.image-template',
- 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
- 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
- 'ott' => 'application/vnd.oasis.opendocument.text-template',
- 'ova' => 'application/x-virtualbox-ova',
- 'ovf' => 'application/x-virtualbox-ovf',
- 'owl' => 'application/rdf+xml',
- 'oxps' => 'application/oxps',
- 'oxt' => 'application/vnd.openofficeorg.extension',
- 'p' => 'text/x-pascal',
- 'p7a' => 'application/x-pkcs7-signature',
- 'p7b' => 'application/x-pkcs7-certificates',
- 'p7c' => 'application/pkcs7-mime',
- 'p7m' => 'application/pkcs7-mime',
- 'p7r' => 'application/x-pkcs7-certreqresp',
- 'p7s' => 'application/pkcs7-signature',
- 'p8' => 'application/pkcs8',
- 'p10' => 'application/x-pkcs10',
- 'p12' => 'application/x-pkcs12',
- 'pac' => 'application/x-ns-proxy-autoconfig',
- 'pages' => 'application/x-iwork-pages-sffpages',
- 'pas' => 'text/x-pascal',
- 'paw' => 'application/vnd.pawaafile',
- 'pbd' => 'application/vnd.powerbuilder6',
- 'pbm' => 'image/x-portable-bitmap',
- 'pcap' => 'application/vnd.tcpdump.pcap',
- 'pcf' => 'application/x-font-pcf',
- 'pcl' => 'application/vnd.hp-pcl',
- 'pclxl' => 'application/vnd.hp-pclxl',
- 'pct' => 'image/x-pict',
- 'pcurl' => 'application/vnd.curl.pcurl',
- 'pcx' => 'image/x-pcx',
- 'pdb' => 'application/x-pilot',
- 'pde' => 'text/x-processing',
- 'pdf' => 'application/pdf',
- 'pem' => 'application/x-x509-user-cert',
- 'pfa' => 'application/x-font-type1',
- 'pfb' => 'application/x-font-type1',
- 'pfm' => 'application/x-font-type1',
- 'pfr' => 'application/font-tdpfr',
- 'pfx' => 'application/x-pkcs12',
- 'pgm' => 'image/x-portable-graymap',
- 'pgn' => 'application/x-chess-pgn',
- 'pgp' => 'application/pgp',
- 'phar' => 'application/octet-stream',
- 'php' => 'application/x-httpd-php',
- 'php3' => 'application/x-httpd-php',
- 'php4' => 'application/x-httpd-php',
- 'phps' => 'application/x-httpd-php-source',
- 'phtml' => 'application/x-httpd-php',
- 'pic' => 'image/x-pict',
- 'pkg' => 'application/octet-stream',
- 'pki' => 'application/pkixcmp',
- 'pkipath' => 'application/pkix-pkipath',
- 'pkpass' => 'application/vnd.apple.pkpass',
- 'pl' => 'application/x-perl',
- 'plb' => 'application/vnd.3gpp.pic-bw-large',
- 'plc' => 'application/vnd.mobius.plc',
- 'plf' => 'application/vnd.pocketlearn',
- 'pls' => 'application/pls+xml',
- 'pm' => 'application/x-perl',
- 'pml' => 'application/vnd.ctc-posml',
- 'png' => 'image/png',
- 'pnm' => 'image/x-portable-anymap',
- 'portpkg' => 'application/vnd.macports.portpkg',
- 'pot' => 'application/vnd.ms-powerpoint',
- 'potm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
- 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
- 'ppa' => 'application/vnd.ms-powerpoint',
- 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
- 'ppd' => 'application/vnd.cups-ppd',
- 'ppm' => 'image/x-portable-pixmap',
- 'pps' => 'application/vnd.ms-powerpoint',
- 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
- 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
- 'ppt' => 'application/powerpoint',
- 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
- 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
- 'pqa' => 'application/vnd.palm',
- 'prc' => 'model/prc',
- 'pre' => 'application/vnd.lotus-freelance',
- 'prf' => 'application/pics-rules',
- 'provx' => 'application/provenance+xml',
- 'ps' => 'application/postscript',
- 'psb' => 'application/vnd.3gpp.pic-bw-small',
- 'psd' => 'application/x-photoshop',
- 'psf' => 'application/x-font-linux-psf',
- 'pskcxml' => 'application/pskc+xml',
- 'pti' => 'image/prs.pti',
- 'ptid' => 'application/vnd.pvi.ptid1',
- 'pub' => 'application/x-mspublisher',
- 'pvb' => 'application/vnd.3gpp.pic-bw-var',
- 'pwn' => 'application/vnd.3m.post-it-notes',
- 'pya' => 'audio/vnd.ms-playready.media.pya',
- 'pyv' => 'video/vnd.ms-playready.media.pyv',
- 'qam' => 'application/vnd.epson.quickanime',
- 'qbo' => 'application/vnd.intu.qbo',
- 'qfx' => 'application/vnd.intu.qfx',
- 'qps' => 'application/vnd.publishare-delta-tree',
- 'qt' => 'video/quicktime',
- 'qwd' => 'application/vnd.quark.quarkxpress',
- 'qwt' => 'application/vnd.quark.quarkxpress',
- 'qxb' => 'application/vnd.quark.quarkxpress',
- 'qxd' => 'application/vnd.quark.quarkxpress',
- 'qxl' => 'application/vnd.quark.quarkxpress',
- 'qxt' => 'application/vnd.quark.quarkxpress',
- 'ra' => 'audio/x-realaudio',
- 'ram' => 'audio/x-pn-realaudio',
- 'raml' => 'application/raml+yaml',
- 'rapd' => 'application/route-apd+xml',
- 'rar' => 'application/x-rar',
- 'ras' => 'image/x-cmu-raster',
- 'rcprofile' => 'application/vnd.ipunplugged.rcprofile',
- 'rdf' => 'application/rdf+xml',
- 'rdz' => 'application/vnd.data-vision.rdz',
- 'relo' => 'application/p2p-overlay+xml',
- 'rep' => 'application/vnd.businessobjects',
- 'res' => 'application/x-dtbresource+xml',
- 'rgb' => 'image/x-rgb',
- 'rif' => 'application/reginfo+xml',
- 'rip' => 'audio/vnd.rip',
- 'ris' => 'application/x-research-info-systems',
- 'rl' => 'application/resource-lists+xml',
- 'rlc' => 'image/vnd.fujixerox.edmics-rlc',
- 'rld' => 'application/resource-lists-diff+xml',
- 'rm' => 'audio/x-pn-realaudio',
- 'rmi' => 'audio/midi',
- 'rmp' => 'audio/x-pn-realaudio-plugin',
- 'rms' => 'application/vnd.jcp.javame.midlet-rms',
- 'rmvb' => 'application/vnd.rn-realmedia-vbr',
- 'rnc' => 'application/relax-ng-compact-syntax',
- 'rng' => 'application/xml',
- 'roa' => 'application/rpki-roa',
- 'roff' => 'text/troff',
- 'rp9' => 'application/vnd.cloanto.rp9',
- 'rpm' => 'audio/x-pn-realaudio-plugin',
- 'rpss' => 'application/vnd.nokia.radio-presets',
- 'rpst' => 'application/vnd.nokia.radio-preset',
- 'rq' => 'application/sparql-query',
- 'rs' => 'application/rls-services+xml',
- 'rsa' => 'application/x-pkcs7',
- 'rsat' => 'application/atsc-rsat+xml',
- 'rsd' => 'application/rsd+xml',
- 'rsheet' => 'application/urc-ressheet+xml',
- 'rss' => 'application/rss+xml',
- 'rtf' => 'text/rtf',
- 'rtx' => 'text/richtext',
- 'run' => 'application/x-makeself',
- 'rusd' => 'application/route-usd+xml',
- 'rv' => 'video/vnd.rn-realvideo',
- 's' => 'text/x-asm',
- 's3m' => 'audio/s3m',
- 'saf' => 'application/vnd.yamaha.smaf-audio',
- 'sass' => 'text/x-sass',
- 'sbml' => 'application/sbml+xml',
- 'sc' => 'application/vnd.ibm.secure-container',
- 'scd' => 'application/x-msschedule',
- 'scm' => 'application/vnd.lotus-screencam',
- 'scq' => 'application/scvp-cv-request',
- 'scs' => 'application/scvp-cv-response',
- 'scss' => 'text/x-scss',
- 'scurl' => 'text/vnd.curl.scurl',
- 'sda' => 'application/vnd.stardivision.draw',
- 'sdc' => 'application/vnd.stardivision.calc',
- 'sdd' => 'application/vnd.stardivision.impress',
- 'sdkd' => 'application/vnd.solent.sdkm+xml',
- 'sdkm' => 'application/vnd.solent.sdkm+xml',
- 'sdp' => 'application/sdp',
- 'sdw' => 'application/vnd.stardivision.writer',
- 'sea' => 'application/octet-stream',
- 'see' => 'application/vnd.seemail',
- 'seed' => 'application/vnd.fdsn.seed',
- 'sema' => 'application/vnd.sema',
- 'semd' => 'application/vnd.semd',
- 'semf' => 'application/vnd.semf',
- 'senmlx' => 'application/senml+xml',
- 'sensmlx' => 'application/sensml+xml',
- 'ser' => 'application/java-serialized-object',
- 'setpay' => 'application/set-payment-initiation',
- 'setreg' => 'application/set-registration-initiation',
- 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data',
- 'sfs' => 'application/vnd.spotfire.sfs',
- 'sfv' => 'text/x-sfv',
- 'sgi' => 'image/sgi',
- 'sgl' => 'application/vnd.stardivision.writer-global',
- 'sgm' => 'text/sgml',
- 'sgml' => 'text/sgml',
- 'sh' => 'application/x-sh',
- 'shar' => 'application/x-shar',
- 'shex' => 'text/shex',
- 'shf' => 'application/shf+xml',
- 'shtml' => 'text/html',
- 'sid' => 'image/x-mrsid-image',
- 'sieve' => 'application/sieve',
- 'sig' => 'application/pgp-signature',
- 'sil' => 'audio/silk',
- 'silo' => 'model/mesh',
- 'sis' => 'application/vnd.symbian.install',
- 'sisx' => 'application/vnd.symbian.install',
- 'sit' => 'application/x-stuffit',
- 'sitx' => 'application/x-stuffitx',
- 'siv' => 'application/sieve',
- 'skd' => 'application/vnd.koan',
- 'skm' => 'application/vnd.koan',
- 'skp' => 'application/vnd.koan',
- 'skt' => 'application/vnd.koan',
- 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12',
- 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
- 'slim' => 'text/slim',
- 'slm' => 'text/slim',
- 'sls' => 'application/route-s-tsid+xml',
- 'slt' => 'application/vnd.epson.salt',
- 'sm' => 'application/vnd.stepmania.stepchart',
- 'smf' => 'application/vnd.stardivision.math',
- 'smi' => 'application/smil',
- 'smil' => 'application/smil',
- 'smv' => 'video/x-smv',
- 'smzip' => 'application/vnd.stepmania.package',
- 'snd' => 'audio/basic',
- 'snf' => 'application/x-font-snf',
- 'so' => 'application/octet-stream',
- 'spc' => 'application/x-pkcs7-certificates',
- 'spdx' => 'text/spdx',
- 'spf' => 'application/vnd.yamaha.smaf-phrase',
- 'spl' => 'application/x-futuresplash',
- 'spot' => 'text/vnd.in3d.spot',
- 'spp' => 'application/scvp-vp-response',
- 'spq' => 'application/scvp-vp-request',
- 'spx' => 'audio/ogg',
- 'sql' => 'application/x-sql',
- 'src' => 'application/x-wais-source',
- 'srt' => 'application/x-subrip',
- 'sru' => 'application/sru+xml',
- 'srx' => 'application/sparql-results+xml',
- 'ssdl' => 'application/ssdl+xml',
- 'sse' => 'application/vnd.kodak-descriptor',
- 'ssf' => 'application/vnd.epson.ssf',
- 'ssml' => 'application/ssml+xml',
- 'sst' => 'application/octet-stream',
- 'st' => 'application/vnd.sailingtracker.track',
- 'stc' => 'application/vnd.sun.xml.calc.template',
- 'std' => 'application/vnd.sun.xml.draw.template',
- 'stf' => 'application/vnd.wt.stf',
- 'sti' => 'application/vnd.sun.xml.impress.template',
- 'stk' => 'application/hyperstudio',
- 'stl' => 'model/stl',
- 'stpx' => 'model/step+xml',
- 'stpxz' => 'model/step-xml+zip',
- 'stpz' => 'model/step+zip',
- 'str' => 'application/vnd.pg.format',
- 'stw' => 'application/vnd.sun.xml.writer.template',
- 'styl' => 'text/stylus',
- 'stylus' => 'text/stylus',
- 'sub' => 'text/vnd.dvb.subtitle',
- 'sus' => 'application/vnd.sus-calendar',
- 'susp' => 'application/vnd.sus-calendar',
- 'sv4cpio' => 'application/x-sv4cpio',
- 'sv4crc' => 'application/x-sv4crc',
- 'svc' => 'application/vnd.dvb.service',
- 'svd' => 'application/vnd.svd',
- 'svg' => 'image/svg+xml',
- 'svgz' => 'image/svg+xml',
- 'swa' => 'application/x-director',
- 'swf' => 'application/x-shockwave-flash',
- 'swi' => 'application/vnd.aristanetworks.swi',
- 'swidtag' => 'application/swid+xml',
- 'sxc' => 'application/vnd.sun.xml.calc',
- 'sxd' => 'application/vnd.sun.xml.draw',
- 'sxg' => 'application/vnd.sun.xml.writer.global',
- 'sxi' => 'application/vnd.sun.xml.impress',
- 'sxm' => 'application/vnd.sun.xml.math',
- 'sxw' => 'application/vnd.sun.xml.writer',
- 't' => 'text/troff',
- 't3' => 'application/x-t3vm-image',
- 't38' => 'image/t38',
- 'taglet' => 'application/vnd.mynfc',
- 'tao' => 'application/vnd.tao.intent-module-archive',
- 'tap' => 'image/vnd.tencent.tap',
- 'tar' => 'application/x-tar',
- 'tcap' => 'application/vnd.3gpp2.tcap',
- 'tcl' => 'application/x-tcl',
- 'td' => 'application/urc-targetdesc+xml',
- 'teacher' => 'application/vnd.smart.teacher',
- 'tei' => 'application/tei+xml',
- 'teicorpus' => 'application/tei+xml',
- 'tex' => 'application/x-tex',
- 'texi' => 'application/x-texinfo',
- 'texinfo' => 'application/x-texinfo',
- 'text' => 'text/plain',
- 'tfi' => 'application/thraud+xml',
- 'tfm' => 'application/x-tex-tfm',
- 'tfx' => 'image/tiff-fx',
- 'tga' => 'image/x-tga',
- 'tgz' => 'application/x-tar',
- 'thmx' => 'application/vnd.ms-officetheme',
- 'tif' => 'image/tiff',
- 'tiff' => 'image/tiff',
- 'tk' => 'application/x-tcl',
- 'tmo' => 'application/vnd.tmobile-livetv',
- 'toml' => 'application/toml',
- 'torrent' => 'application/x-bittorrent',
- 'tpl' => 'application/vnd.groove-tool-template',
- 'tpt' => 'application/vnd.trid.tpt',
- 'tr' => 'text/troff',
- 'tra' => 'application/vnd.trueapp',
- 'trig' => 'application/trig',
- 'trm' => 'application/x-msterminal',
- 'ts' => 'video/mp2t',
- 'tsd' => 'application/timestamped-data',
- 'tsv' => 'text/tab-separated-values',
- 'ttc' => 'font/collection',
- 'ttf' => 'font/ttf',
- 'ttl' => 'text/turtle',
- 'ttml' => 'application/ttml+xml',
- 'twd' => 'application/vnd.simtech-mindmapper',
- 'twds' => 'application/vnd.simtech-mindmapper',
- 'txd' => 'application/vnd.genomatix.tuxedo',
- 'txf' => 'application/vnd.mobius.txf',
- 'txt' => 'text/plain',
- 'u3d' => 'model/u3d',
- 'u8dsn' => 'message/global-delivery-status',
- 'u8hdr' => 'message/global-headers',
- 'u8mdn' => 'message/global-disposition-notification',
- 'u8msg' => 'message/global',
- 'u32' => 'application/x-authorware-bin',
- 'ubj' => 'application/ubjson',
- 'udeb' => 'application/x-debian-package',
- 'ufd' => 'application/vnd.ufdl',
- 'ufdl' => 'application/vnd.ufdl',
- 'ulx' => 'application/x-glulx',
- 'umj' => 'application/vnd.umajin',
- 'unityweb' => 'application/vnd.unity',
- 'uoml' => 'application/vnd.uoml+xml',
- 'uri' => 'text/uri-list',
- 'uris' => 'text/uri-list',
- 'urls' => 'text/uri-list',
- 'usdz' => 'model/vnd.usdz+zip',
- 'ustar' => 'application/x-ustar',
- 'utz' => 'application/vnd.uiq.theme',
- 'uu' => 'text/x-uuencode',
- 'uva' => 'audio/vnd.dece.audio',
- 'uvd' => 'application/vnd.dece.data',
- 'uvf' => 'application/vnd.dece.data',
- 'uvg' => 'image/vnd.dece.graphic',
- 'uvh' => 'video/vnd.dece.hd',
- 'uvi' => 'image/vnd.dece.graphic',
- 'uvm' => 'video/vnd.dece.mobile',
- 'uvp' => 'video/vnd.dece.pd',
- 'uvs' => 'video/vnd.dece.sd',
- 'uvt' => 'application/vnd.dece.ttml+xml',
- 'uvu' => 'video/vnd.uvvu.mp4',
- 'uvv' => 'video/vnd.dece.video',
- 'uvva' => 'audio/vnd.dece.audio',
- 'uvvd' => 'application/vnd.dece.data',
- 'uvvf' => 'application/vnd.dece.data',
- 'uvvg' => 'image/vnd.dece.graphic',
- 'uvvh' => 'video/vnd.dece.hd',
- 'uvvi' => 'image/vnd.dece.graphic',
- 'uvvm' => 'video/vnd.dece.mobile',
- 'uvvp' => 'video/vnd.dece.pd',
- 'uvvs' => 'video/vnd.dece.sd',
- 'uvvt' => 'application/vnd.dece.ttml+xml',
- 'uvvu' => 'video/vnd.uvvu.mp4',
- 'uvvv' => 'video/vnd.dece.video',
- 'uvvx' => 'application/vnd.dece.unspecified',
- 'uvvz' => 'application/vnd.dece.zip',
- 'uvx' => 'application/vnd.dece.unspecified',
- 'uvz' => 'application/vnd.dece.zip',
- 'vbox' => 'application/x-virtualbox-vbox',
- 'vbox-extpack' => 'application/x-virtualbox-vbox-extpack',
- 'vcard' => 'text/vcard',
- 'vcd' => 'application/x-cdlink',
- 'vcf' => 'text/x-vcard',
- 'vcg' => 'application/vnd.groove-vcard',
- 'vcs' => 'text/x-vcalendar',
- 'vcx' => 'application/vnd.vcx',
- 'vdi' => 'application/x-virtualbox-vdi',
- 'vds' => 'model/vnd.sap.vds',
- 'vhd' => 'application/x-virtualbox-vhd',
- 'vis' => 'application/vnd.visionary',
- 'viv' => 'video/vnd.vivo',
- 'vlc' => 'application/videolan',
- 'vmdk' => 'application/x-virtualbox-vmdk',
- 'vob' => 'video/x-ms-vob',
- 'vor' => 'application/vnd.stardivision.writer',
- 'vox' => 'application/x-authorware-bin',
- 'vrml' => 'model/vrml',
- 'vsd' => 'application/vnd.visio',
- 'vsf' => 'application/vnd.vsf',
- 'vss' => 'application/vnd.visio',
- 'vst' => 'application/vnd.visio',
- 'vsw' => 'application/vnd.visio',
- 'vtf' => 'image/vnd.valve.source.texture',
- 'vtt' => 'text/vtt',
- 'vtu' => 'model/vnd.vtu',
- 'vxml' => 'application/voicexml+xml',
- 'w3d' => 'application/x-director',
- 'wad' => 'application/x-doom',
- 'wadl' => 'application/vnd.sun.wadl+xml',
- 'war' => 'application/java-archive',
- 'wasm' => 'application/wasm',
- 'wav' => 'audio/x-wav',
- 'wax' => 'audio/x-ms-wax',
- 'wbmp' => 'image/vnd.wap.wbmp',
- 'wbs' => 'application/vnd.criticaltools.wbs+xml',
- 'wbxml' => 'application/wbxml',
- 'wcm' => 'application/vnd.ms-works',
- 'wdb' => 'application/vnd.ms-works',
- 'wdp' => 'image/vnd.ms-photo',
- 'weba' => 'audio/webm',
- 'webapp' => 'application/x-web-app-manifest+json',
- 'webm' => 'video/webm',
- 'webmanifest' => 'application/manifest+json',
- 'webp' => 'image/webp',
- 'wg' => 'application/vnd.pmi.widget',
- 'wgt' => 'application/widget',
- 'wif' => 'application/watcherinfo+xml',
- 'wks' => 'application/vnd.ms-works',
- 'wm' => 'video/x-ms-wm',
- 'wma' => 'audio/x-ms-wma',
- 'wmd' => 'application/x-ms-wmd',
- 'wmf' => 'image/wmf',
- 'wml' => 'text/vnd.wap.wml',
- 'wmlc' => 'application/wmlc',
- 'wmls' => 'text/vnd.wap.wmlscript',
- 'wmlsc' => 'application/vnd.wap.wmlscriptc',
- 'wmv' => 'video/x-ms-wmv',
- 'wmx' => 'video/x-ms-wmx',
- 'wmz' => 'application/x-msmetafile',
- 'woff' => 'font/woff',
- 'woff2' => 'font/woff2',
- 'word' => 'application/msword',
- 'wpd' => 'application/vnd.wordperfect',
- 'wpl' => 'application/vnd.ms-wpl',
- 'wps' => 'application/vnd.ms-works',
- 'wqd' => 'application/vnd.wqd',
- 'wri' => 'application/x-mswrite',
- 'wrl' => 'model/vrml',
- 'wsc' => 'message/vnd.wfa.wsc',
- 'wsdl' => 'application/wsdl+xml',
- 'wspolicy' => 'application/wspolicy+xml',
- 'wtb' => 'application/vnd.webturbo',
- 'wvx' => 'video/x-ms-wvx',
- 'x3d' => 'model/x3d+xml',
- 'x3db' => 'model/x3d+fastinfoset',
- 'x3dbz' => 'model/x3d+binary',
- 'x3dv' => 'model/x3d-vrml',
- 'x3dvz' => 'model/x3d+vrml',
- 'x3dz' => 'model/x3d+xml',
- 'x32' => 'application/x-authorware-bin',
- 'x_b' => 'model/vnd.parasolid.transmit.binary',
- 'x_t' => 'model/vnd.parasolid.transmit.text',
- 'xaml' => 'application/xaml+xml',
- 'xap' => 'application/x-silverlight-app',
- 'xar' => 'application/vnd.xara',
- 'xav' => 'application/xcap-att+xml',
- 'xbap' => 'application/x-ms-xbap',
- 'xbd' => 'application/vnd.fujixerox.docuworks.binder',
- 'xbm' => 'image/x-xbitmap',
- 'xca' => 'application/xcap-caps+xml',
- 'xcs' => 'application/calendar+xml',
- 'xdf' => 'application/xcap-diff+xml',
- 'xdm' => 'application/vnd.syncml.dm+xml',
- 'xdp' => 'application/vnd.adobe.xdp+xml',
- 'xdssc' => 'application/dssc+xml',
- 'xdw' => 'application/vnd.fujixerox.docuworks',
- 'xel' => 'application/xcap-el+xml',
- 'xenc' => 'application/xenc+xml',
- 'xer' => 'application/patch-ops-error+xml',
- 'xfdf' => 'application/vnd.adobe.xfdf',
- 'xfdl' => 'application/vnd.xfdl',
- 'xht' => 'application/xhtml+xml',
- 'xhtml' => 'application/xhtml+xml',
- 'xhvml' => 'application/xv+xml',
- 'xif' => 'image/vnd.xiff',
- 'xl' => 'application/excel',
- 'xla' => 'application/vnd.ms-excel',
- 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
- 'xlc' => 'application/vnd.ms-excel',
- 'xlf' => 'application/xliff+xml',
- 'xlm' => 'application/vnd.ms-excel',
- 'xls' => 'application/vnd.ms-excel',
- 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
- 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
- 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
- 'xlt' => 'application/vnd.ms-excel',
- 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
- 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
- 'xlw' => 'application/vnd.ms-excel',
- 'xm' => 'audio/xm',
- 'xml' => 'application/xml',
- 'xns' => 'application/xcap-ns+xml',
- 'xo' => 'application/vnd.olpc-sugar',
- 'xop' => 'application/xop+xml',
- 'xpi' => 'application/x-xpinstall',
- 'xpl' => 'application/xproc+xml',
- 'xpm' => 'image/x-xpixmap',
- 'xpr' => 'application/vnd.is-xpr',
- 'xps' => 'application/vnd.ms-xpsdocument',
- 'xpw' => 'application/vnd.intercon.formnet',
- 'xpx' => 'application/vnd.intercon.formnet',
- 'xsd' => 'application/xml',
- 'xsl' => 'application/xml',
- 'xslt' => 'application/xslt+xml',
- 'xsm' => 'application/vnd.syncml+xml',
- 'xspf' => 'application/xspf+xml',
- 'xul' => 'application/vnd.mozilla.xul+xml',
- 'xvm' => 'application/xv+xml',
- 'xvml' => 'application/xv+xml',
- 'xwd' => 'image/x-xwindowdump',
- 'xyz' => 'chemical/x-xyz',
- 'xz' => 'application/x-xz',
- 'yaml' => 'text/yaml',
- 'yang' => 'application/yang',
- 'yin' => 'application/yin+xml',
- 'yml' => 'text/yaml',
- 'ymp' => 'text/x-suse-ymp',
- 'z' => 'application/x-compress',
- 'z1' => 'application/x-zmachine',
- 'z2' => 'application/x-zmachine',
- 'z3' => 'application/x-zmachine',
- 'z4' => 'application/x-zmachine',
- 'z5' => 'application/x-zmachine',
- 'z6' => 'application/x-zmachine',
- 'z7' => 'application/x-zmachine',
- 'z8' => 'application/x-zmachine',
- 'zaz' => 'application/vnd.zzazz.deck+xml',
- 'zip' => 'application/zip',
- 'zir' => 'application/vnd.zul',
- 'zirz' => 'application/vnd.zul',
- 'zmm' => 'application/vnd.handheld-entertainment+xml',
- 'zsh' => 'text/x-scriptzsh',
- ];
-
- public function lookupMimeType(string $extension): ?string
- {
- return self::MIME_TYPES_FOR_EXTENSIONS[$extension] ?? null;
- }
-}
diff --git a/vendor/league/mime-type-detection/src/MimeTypeDetector.php b/vendor/league/mime-type-detection/src/MimeTypeDetector.php
deleted file mode 100644
index 5d799d2a8..000000000
--- a/vendor/league/mime-type-detection/src/MimeTypeDetector.php
+++ /dev/null
@@ -1,19 +0,0 @@
- $overrides
- */
- public function __construct(ExtensionToMimeTypeMap $innerMap, array $overrides)
- {
- $this->innerMap = $innerMap;
- $this->overrides = $overrides;
- }
-
- public function lookupMimeType(string $extension): ?string
- {
- return $this->overrides[$extension] ?? $this->innerMap->lookupMimeType($extension);
- }
-}
diff --git a/vendor/psr/container/.gitignore b/vendor/psr/container/.gitignore
deleted file mode 100644
index b2395aa05..000000000
--- a/vendor/psr/container/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-composer.lock
-composer.phar
-/vendor/
diff --git a/vendor/psr/container/LICENSE b/vendor/psr/container/LICENSE
deleted file mode 100644
index 2877a4894..000000000
--- a/vendor/psr/container/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013-2016 container-interop
-Copyright (c) 2016 PHP Framework Interoperability Group
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/psr/container/README.md b/vendor/psr/container/README.md
deleted file mode 100644
index 1b9d9e570..000000000
--- a/vendor/psr/container/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Container interface
-==============
-
-This repository holds all interfaces related to [PSR-11 (Container Interface)][psr-url].
-
-Note that this is not a Container implementation of its own. It is merely abstractions that describe the components of a Dependency Injection Container.
-
-The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist.
-
-[psr-url]: https://www.php-fig.org/psr/psr-11/
-[package-url]: https://packagist.org/packages/psr/container
-[implementation-url]: https://packagist.org/providers/psr/container-implementation
-
diff --git a/vendor/psr/container/composer.json b/vendor/psr/container/composer.json
deleted file mode 100644
index baf6cd1a0..000000000
--- a/vendor/psr/container/composer.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "name": "psr/container",
- "type": "library",
- "description": "Common Container Interface (PHP FIG PSR-11)",
- "keywords": ["psr", "psr-11", "container", "container-interop", "container-interface"],
- "homepage": "https://github.com/php-fig/container",
- "license": "MIT",
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "require": {
- "php": ">=7.4.0"
- },
- "autoload": {
- "psr-4": {
- "Psr\\Container\\": "src/"
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- }
-}
diff --git a/vendor/psr/container/src/ContainerExceptionInterface.php b/vendor/psr/container/src/ContainerExceptionInterface.php
deleted file mode 100644
index 0f213f2fe..000000000
--- a/vendor/psr/container/src/ContainerExceptionInterface.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Command\CompleteCommand;
-use Symfony\Component\Console\Command\DumpCompletionCommand;
-use Symfony\Component\Console\Command\HelpCommand;
-use Symfony\Component\Console\Command\LazyCommand;
-use Symfony\Component\Console\Command\ListCommand;
-use Symfony\Component\Console\Command\SignalableCommandInterface;
-use Symfony\Component\Console\CommandLoader\CommandLoaderInterface;
-use Symfony\Component\Console\Completion\CompletionInput;
-use Symfony\Component\Console\Completion\CompletionSuggestions;
-use Symfony\Component\Console\Event\ConsoleCommandEvent;
-use Symfony\Component\Console\Event\ConsoleErrorEvent;
-use Symfony\Component\Console\Event\ConsoleSignalEvent;
-use Symfony\Component\Console\Event\ConsoleTerminateEvent;
-use Symfony\Component\Console\Exception\CommandNotFoundException;
-use Symfony\Component\Console\Exception\ExceptionInterface;
-use Symfony\Component\Console\Exception\LogicException;
-use Symfony\Component\Console\Exception\NamespaceNotFoundException;
-use Symfony\Component\Console\Exception\RuntimeException;
-use Symfony\Component\Console\Formatter\OutputFormatter;
-use Symfony\Component\Console\Helper\DebugFormatterHelper;
-use Symfony\Component\Console\Helper\FormatterHelper;
-use Symfony\Component\Console\Helper\Helper;
-use Symfony\Component\Console\Helper\HelperSet;
-use Symfony\Component\Console\Helper\ProcessHelper;
-use Symfony\Component\Console\Helper\QuestionHelper;
-use Symfony\Component\Console\Input\ArgvInput;
-use Symfony\Component\Console\Input\ArrayInput;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputAwareInterface;
-use Symfony\Component\Console\Input\InputDefinition;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Output\ConsoleOutput;
-use Symfony\Component\Console\Output\ConsoleOutputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\SignalRegistry\SignalRegistry;
-use Symfony\Component\Console\Style\SymfonyStyle;
-use Symfony\Component\ErrorHandler\ErrorHandler;
-use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
-use Symfony\Contracts\Service\ResetInterface;
-
-/**
- * An Application is the container for a collection of commands.
- *
- * It is the main entry point of a Console application.
- *
- * This class is optimized for a standard CLI environment.
- *
- * Usage:
- *
- * $app = new Application('myapp', '1.0 (stable)');
- * $app->add(new SimpleCommand());
- * $app->run();
- *
- * @author Fabien Potencier
- */
-class Application implements ResetInterface
-{
- private $commands = [];
- private $wantHelps = false;
- private $runningCommand;
- private $name;
- private $version;
- private $commandLoader;
- private $catchExceptions = true;
- private $autoExit = true;
- private $definition;
- private $helperSet;
- private $dispatcher;
- private $terminal;
- private $defaultCommand;
- private $singleCommand = false;
- private $initialized;
- private $signalRegistry;
- private $signalsToDispatchEvent = [];
-
- public function __construct(string $name = 'UNKNOWN', string $version = 'UNKNOWN')
- {
- $this->name = $name;
- $this->version = $version;
- $this->terminal = new Terminal();
- $this->defaultCommand = 'list';
- if (\defined('SIGINT') && SignalRegistry::isSupported()) {
- $this->signalRegistry = new SignalRegistry();
- $this->signalsToDispatchEvent = [\SIGINT, \SIGTERM, \SIGUSR1, \SIGUSR2];
- }
- }
-
- /**
- * @final
- */
- public function setDispatcher(EventDispatcherInterface $dispatcher)
- {
- $this->dispatcher = $dispatcher;
- }
-
- public function setCommandLoader(CommandLoaderInterface $commandLoader)
- {
- $this->commandLoader = $commandLoader;
- }
-
- public function getSignalRegistry(): SignalRegistry
- {
- if (!$this->signalRegistry) {
- throw new RuntimeException('Signals are not supported. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.');
- }
-
- return $this->signalRegistry;
- }
-
- public function setSignalsToDispatchEvent(int ...$signalsToDispatchEvent)
- {
- $this->signalsToDispatchEvent = $signalsToDispatchEvent;
- }
-
- /**
- * Runs the current application.
- *
- * @return int 0 if everything went fine, or an error code
- *
- * @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}.
- */
- public function run(InputInterface $input = null, OutputInterface $output = null)
- {
- if (\function_exists('putenv')) {
- @putenv('LINES='.$this->terminal->getHeight());
- @putenv('COLUMNS='.$this->terminal->getWidth());
- }
-
- if (null === $input) {
- $input = new ArgvInput();
- }
-
- if (null === $output) {
- $output = new ConsoleOutput();
- }
-
- $renderException = function (\Throwable $e) use ($output) {
- if ($output instanceof ConsoleOutputInterface) {
- $this->renderThrowable($e, $output->getErrorOutput());
- } else {
- $this->renderThrowable($e, $output);
- }
- };
- if ($phpHandler = set_exception_handler($renderException)) {
- restore_exception_handler();
- if (!\is_array($phpHandler) || !$phpHandler[0] instanceof ErrorHandler) {
- $errorHandler = true;
- } elseif ($errorHandler = $phpHandler[0]->setExceptionHandler($renderException)) {
- $phpHandler[0]->setExceptionHandler($errorHandler);
- }
- }
-
- $this->configureIO($input, $output);
-
- try {
- $exitCode = $this->doRun($input, $output);
- } catch (\Exception $e) {
- if (!$this->catchExceptions) {
- throw $e;
- }
-
- $renderException($e);
-
- $exitCode = $e->getCode();
- if (is_numeric($exitCode)) {
- $exitCode = (int) $exitCode;
- if ($exitCode <= 0) {
- $exitCode = 1;
- }
- } else {
- $exitCode = 1;
- }
- } finally {
- // if the exception handler changed, keep it
- // otherwise, unregister $renderException
- if (!$phpHandler) {
- if (set_exception_handler($renderException) === $renderException) {
- restore_exception_handler();
- }
- restore_exception_handler();
- } elseif (!$errorHandler) {
- $finalHandler = $phpHandler[0]->setExceptionHandler(null);
- if ($finalHandler !== $renderException) {
- $phpHandler[0]->setExceptionHandler($finalHandler);
- }
- }
- }
-
- if ($this->autoExit) {
- if ($exitCode > 255) {
- $exitCode = 255;
- }
-
- exit($exitCode);
- }
-
- return $exitCode;
- }
-
- /**
- * Runs the current application.
- *
- * @return int 0 if everything went fine, or an error code
- */
- public function doRun(InputInterface $input, OutputInterface $output)
- {
- if (true === $input->hasParameterOption(['--version', '-V'], true)) {
- $output->writeln($this->getLongVersion());
-
- return 0;
- }
-
- try {
- // Makes ArgvInput::getFirstArgument() able to distinguish an option from an argument.
- $input->bind($this->getDefinition());
- } catch (ExceptionInterface $e) {
- // Errors must be ignored, full binding/validation happens later when the command is known.
- }
-
- $name = $this->getCommandName($input);
- if (true === $input->hasParameterOption(['--help', '-h'], true)) {
- if (!$name) {
- $name = 'help';
- $input = new ArrayInput(['command_name' => $this->defaultCommand]);
- } else {
- $this->wantHelps = true;
- }
- }
-
- if (!$name) {
- $name = $this->defaultCommand;
- $definition = $this->getDefinition();
- $definition->setArguments(array_merge(
- $definition->getArguments(),
- [
- 'command' => new InputArgument('command', InputArgument::OPTIONAL, $definition->getArgument('command')->getDescription(), $name),
- ]
- ));
- }
-
- try {
- $this->runningCommand = null;
- // the command name MUST be the first element of the input
- $command = $this->find($name);
- } catch (\Throwable $e) {
- if (!($e instanceof CommandNotFoundException && !$e instanceof NamespaceNotFoundException) || 1 !== \count($alternatives = $e->getAlternatives()) || !$input->isInteractive()) {
- if (null !== $this->dispatcher) {
- $event = new ConsoleErrorEvent($input, $output, $e);
- $this->dispatcher->dispatch($event, ConsoleEvents::ERROR);
-
- if (0 === $event->getExitCode()) {
- return 0;
- }
-
- $e = $event->getError();
- }
-
- throw $e;
- }
-
- $alternative = $alternatives[0];
-
- $style = new SymfonyStyle($input, $output);
- $output->writeln('');
- $formattedBlock = (new FormatterHelper())->formatBlock(sprintf('Command "%s" is not defined.', $name), 'error', true);
- $output->writeln($formattedBlock);
- if (!$style->confirm(sprintf('Do you want to run "%s" instead? ', $alternative), false)) {
- if (null !== $this->dispatcher) {
- $event = new ConsoleErrorEvent($input, $output, $e);
- $this->dispatcher->dispatch($event, ConsoleEvents::ERROR);
-
- return $event->getExitCode();
- }
-
- return 1;
- }
-
- $command = $this->find($alternative);
- }
-
- if ($command instanceof LazyCommand) {
- $command = $command->getCommand();
- }
-
- $this->runningCommand = $command;
- $exitCode = $this->doRunCommand($command, $input, $output);
- $this->runningCommand = null;
-
- return $exitCode;
- }
-
- /**
- * {@inheritdoc}
- */
- public function reset()
- {
- }
-
- public function setHelperSet(HelperSet $helperSet)
- {
- $this->helperSet = $helperSet;
- }
-
- /**
- * Get the helper set associated with the command.
- *
- * @return HelperSet
- */
- public function getHelperSet()
- {
- if (!$this->helperSet) {
- $this->helperSet = $this->getDefaultHelperSet();
- }
-
- return $this->helperSet;
- }
-
- public function setDefinition(InputDefinition $definition)
- {
- $this->definition = $definition;
- }
-
- /**
- * Gets the InputDefinition related to this Application.
- *
- * @return InputDefinition
- */
- public function getDefinition()
- {
- if (!$this->definition) {
- $this->definition = $this->getDefaultInputDefinition();
- }
-
- if ($this->singleCommand) {
- $inputDefinition = $this->definition;
- $inputDefinition->setArguments();
-
- return $inputDefinition;
- }
-
- return $this->definition;
- }
-
- /**
- * Adds suggestions to $suggestions for the current completion input (e.g. option or argument).
- */
- public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
- {
- if (
- CompletionInput::TYPE_ARGUMENT_VALUE === $input->getCompletionType()
- && 'command' === $input->getCompletionName()
- ) {
- $commandNames = [];
- foreach ($this->all() as $name => $command) {
- // skip hidden commands and aliased commands as they already get added below
- if ($command->isHidden() || $command->getName() !== $name) {
- continue;
- }
- $commandNames[] = $command->getName();
- foreach ($command->getAliases() as $name) {
- $commandNames[] = $name;
- }
- }
- $suggestions->suggestValues(array_filter($commandNames));
-
- return;
- }
-
- if (CompletionInput::TYPE_OPTION_NAME === $input->getCompletionType()) {
- $suggestions->suggestOptions($this->getDefinition()->getOptions());
-
- return;
- }
- }
-
- /**
- * Gets the help message.
- *
- * @return string
- */
- public function getHelp()
- {
- return $this->getLongVersion();
- }
-
- /**
- * Gets whether to catch exceptions or not during commands execution.
- *
- * @return bool
- */
- public function areExceptionsCaught()
- {
- return $this->catchExceptions;
- }
-
- /**
- * Sets whether to catch exceptions or not during commands execution.
- */
- public function setCatchExceptions(bool $boolean)
- {
- $this->catchExceptions = $boolean;
- }
-
- /**
- * Gets whether to automatically exit after a command execution or not.
- *
- * @return bool
- */
- public function isAutoExitEnabled()
- {
- return $this->autoExit;
- }
-
- /**
- * Sets whether to automatically exit after a command execution or not.
- */
- public function setAutoExit(bool $boolean)
- {
- $this->autoExit = $boolean;
- }
-
- /**
- * Gets the name of the application.
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Sets the application name.
- **/
- public function setName(string $name)
- {
- $this->name = $name;
- }
-
- /**
- * Gets the application version.
- *
- * @return string
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * Sets the application version.
- */
- public function setVersion(string $version)
- {
- $this->version = $version;
- }
-
- /**
- * Returns the long version of the application.
- *
- * @return string
- */
- public function getLongVersion()
- {
- if ('UNKNOWN' !== $this->getName()) {
- if ('UNKNOWN' !== $this->getVersion()) {
- return sprintf('%s %s', $this->getName(), $this->getVersion());
- }
-
- return $this->getName();
- }
-
- return 'Console Tool';
- }
-
- /**
- * Registers a new command.
- *
- * @return Command
- */
- public function register(string $name)
- {
- return $this->add(new Command($name));
- }
-
- /**
- * Adds an array of command objects.
- *
- * If a Command is not enabled it will not be added.
- *
- * @param Command[] $commands An array of commands
- */
- public function addCommands(array $commands)
- {
- foreach ($commands as $command) {
- $this->add($command);
- }
- }
-
- /**
- * Adds a command object.
- *
- * If a command with the same name already exists, it will be overridden.
- * If the command is not enabled it will not be added.
- *
- * @return Command|null
- */
- public function add(Command $command)
- {
- $this->init();
-
- $command->setApplication($this);
-
- if (!$command->isEnabled()) {
- $command->setApplication(null);
-
- return null;
- }
-
- if (!$command instanceof LazyCommand) {
- // Will throw if the command is not correctly initialized.
- $command->getDefinition();
- }
-
- if (!$command->getName()) {
- throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_debug_type($command)));
- }
-
- $this->commands[$command->getName()] = $command;
-
- foreach ($command->getAliases() as $alias) {
- $this->commands[$alias] = $command;
- }
-
- return $command;
- }
-
- /**
- * Returns a registered command by name or alias.
- *
- * @return Command
- *
- * @throws CommandNotFoundException When given command name does not exist
- */
- public function get(string $name)
- {
- $this->init();
-
- if (!$this->has($name)) {
- throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name));
- }
-
- // When the command has a different name than the one used at the command loader level
- if (!isset($this->commands[$name])) {
- throw new CommandNotFoundException(sprintf('The "%s" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".', $name));
- }
-
- $command = $this->commands[$name];
-
- if ($this->wantHelps) {
- $this->wantHelps = false;
-
- $helpCommand = $this->get('help');
- $helpCommand->setCommand($command);
-
- return $helpCommand;
- }
-
- return $command;
- }
-
- /**
- * Returns true if the command exists, false otherwise.
- *
- * @return bool
- */
- public function has(string $name)
- {
- $this->init();
-
- return isset($this->commands[$name]) || ($this->commandLoader && $this->commandLoader->has($name) && $this->add($this->commandLoader->get($name)));
- }
-
- /**
- * Returns an array of all unique namespaces used by currently registered commands.
- *
- * It does not return the global namespace which always exists.
- *
- * @return string[]
- */
- public function getNamespaces()
- {
- $namespaces = [];
- foreach ($this->all() as $command) {
- if ($command->isHidden()) {
- continue;
- }
-
- $namespaces[] = $this->extractAllNamespaces($command->getName());
-
- foreach ($command->getAliases() as $alias) {
- $namespaces[] = $this->extractAllNamespaces($alias);
- }
- }
-
- return array_values(array_unique(array_filter(array_merge([], ...$namespaces))));
- }
-
- /**
- * Finds a registered namespace by a name or an abbreviation.
- *
- * @return string
- *
- * @throws NamespaceNotFoundException When namespace is incorrect or ambiguous
- */
- public function findNamespace(string $namespace)
- {
- $allNamespaces = $this->getNamespaces();
- $expr = implode('[^:]*:', array_map('preg_quote', explode(':', $namespace))).'[^:]*';
- $namespaces = preg_grep('{^'.$expr.'}', $allNamespaces);
-
- if (empty($namespaces)) {
- $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace);
-
- if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) {
- if (1 == \count($alternatives)) {
- $message .= "\n\nDid you mean this?\n ";
- } else {
- $message .= "\n\nDid you mean one of these?\n ";
- }
-
- $message .= implode("\n ", $alternatives);
- }
-
- throw new NamespaceNotFoundException($message, $alternatives);
- }
-
- $exact = \in_array($namespace, $namespaces, true);
- if (\count($namespaces) > 1 && !$exact) {
- throw new NamespaceNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
- }
-
- return $exact ? $namespace : reset($namespaces);
- }
-
- /**
- * Finds a command by name or alias.
- *
- * Contrary to get, this command tries to find the best
- * match if you give it an abbreviation of a name or alias.
- *
- * @return Command
- *
- * @throws CommandNotFoundException When command name is incorrect or ambiguous
- */
- public function find(string $name)
- {
- $this->init();
-
- $aliases = [];
-
- foreach ($this->commands as $command) {
- foreach ($command->getAliases() as $alias) {
- if (!$this->has($alias)) {
- $this->commands[$alias] = $command;
- }
- }
- }
-
- if ($this->has($name)) {
- return $this->get($name);
- }
-
- $allCommands = $this->commandLoader ? array_merge($this->commandLoader->getNames(), array_keys($this->commands)) : array_keys($this->commands);
- $expr = implode('[^:]*:', array_map('preg_quote', explode(':', $name))).'[^:]*';
- $commands = preg_grep('{^'.$expr.'}', $allCommands);
-
- if (empty($commands)) {
- $commands = preg_grep('{^'.$expr.'}i', $allCommands);
- }
-
- // if no commands matched or we just matched namespaces
- if (empty($commands) || \count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) {
- if (false !== $pos = strrpos($name, ':')) {
- // check if a namespace exists and contains commands
- $this->findNamespace(substr($name, 0, $pos));
- }
-
- $message = sprintf('Command "%s" is not defined.', $name);
-
- if ($alternatives = $this->findAlternatives($name, $allCommands)) {
- // remove hidden commands
- $alternatives = array_filter($alternatives, function ($name) {
- return !$this->get($name)->isHidden();
- });
-
- if (1 == \count($alternatives)) {
- $message .= "\n\nDid you mean this?\n ";
- } else {
- $message .= "\n\nDid you mean one of these?\n ";
- }
- $message .= implode("\n ", $alternatives);
- }
-
- throw new CommandNotFoundException($message, array_values($alternatives));
- }
-
- // filter out aliases for commands which are already on the list
- if (\count($commands) > 1) {
- $commandList = $this->commandLoader ? array_merge(array_flip($this->commandLoader->getNames()), $this->commands) : $this->commands;
- $commands = array_unique(array_filter($commands, function ($nameOrAlias) use (&$commandList, $commands, &$aliases) {
- if (!$commandList[$nameOrAlias] instanceof Command) {
- $commandList[$nameOrAlias] = $this->commandLoader->get($nameOrAlias);
- }
-
- $commandName = $commandList[$nameOrAlias]->getName();
-
- $aliases[$nameOrAlias] = $commandName;
-
- return $commandName === $nameOrAlias || !\in_array($commandName, $commands);
- }));
- }
-
- if (\count($commands) > 1) {
- $usableWidth = $this->terminal->getWidth() - 10;
- $abbrevs = array_values($commands);
- $maxLen = 0;
- foreach ($abbrevs as $abbrev) {
- $maxLen = max(Helper::width($abbrev), $maxLen);
- }
- $abbrevs = array_map(function ($cmd) use ($commandList, $usableWidth, $maxLen, &$commands) {
- if ($commandList[$cmd]->isHidden()) {
- unset($commands[array_search($cmd, $commands)]);
-
- return false;
- }
-
- $abbrev = str_pad($cmd, $maxLen, ' ').' '.$commandList[$cmd]->getDescription();
-
- return Helper::width($abbrev) > $usableWidth ? Helper::substr($abbrev, 0, $usableWidth - 3).'...' : $abbrev;
- }, array_values($commands));
-
- if (\count($commands) > 1) {
- $suggestions = $this->getAbbreviationSuggestions(array_filter($abbrevs));
-
- throw new CommandNotFoundException(sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $name, $suggestions), array_values($commands));
- }
- }
-
- $command = $this->get(reset($commands));
-
- if ($command->isHidden()) {
- throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name));
- }
-
- return $command;
- }
-
- /**
- * Gets the commands (registered in the given namespace if provided).
- *
- * The array keys are the full names and the values the command instances.
- *
- * @return Command[]
- */
- public function all(string $namespace = null)
- {
- $this->init();
-
- if (null === $namespace) {
- if (!$this->commandLoader) {
- return $this->commands;
- }
-
- $commands = $this->commands;
- foreach ($this->commandLoader->getNames() as $name) {
- if (!isset($commands[$name]) && $this->has($name)) {
- $commands[$name] = $this->get($name);
- }
- }
-
- return $commands;
- }
-
- $commands = [];
- foreach ($this->commands as $name => $command) {
- if ($namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1)) {
- $commands[$name] = $command;
- }
- }
-
- if ($this->commandLoader) {
- foreach ($this->commandLoader->getNames() as $name) {
- if (!isset($commands[$name]) && $namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1) && $this->has($name)) {
- $commands[$name] = $this->get($name);
- }
- }
- }
-
- return $commands;
- }
-
- /**
- * Returns an array of possible abbreviations given a set of names.
- *
- * @return string[][]
- */
- public static function getAbbreviations(array $names)
- {
- $abbrevs = [];
- foreach ($names as $name) {
- for ($len = \strlen($name); $len > 0; --$len) {
- $abbrev = substr($name, 0, $len);
- $abbrevs[$abbrev][] = $name;
- }
- }
-
- return $abbrevs;
- }
-
- public function renderThrowable(\Throwable $e, OutputInterface $output): void
- {
- $output->writeln('', OutputInterface::VERBOSITY_QUIET);
-
- $this->doRenderThrowable($e, $output);
-
- if (null !== $this->runningCommand) {
- $output->writeln(sprintf('%s', OutputFormatter::escape(sprintf($this->runningCommand->getSynopsis(), $this->getName()))), OutputInterface::VERBOSITY_QUIET);
- $output->writeln('', OutputInterface::VERBOSITY_QUIET);
- }
- }
-
- protected function doRenderThrowable(\Throwable $e, OutputInterface $output): void
- {
- do {
- $message = trim($e->getMessage());
- if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
- $class = get_debug_type($e);
- $title = sprintf(' [%s%s] ', $class, 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : '');
- $len = Helper::width($title);
- } else {
- $len = 0;
- }
-
- if (str_contains($message, "@anonymous\0")) {
- $message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) {
- return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0];
- }, $message);
- }
-
- $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : \PHP_INT_MAX;
- $lines = [];
- foreach ('' !== $message ? preg_split('/\r?\n/', $message) : [] as $line) {
- foreach ($this->splitStringByWidth($line, $width - 4) as $line) {
- // pre-format lines to get the right string length
- $lineLength = Helper::width($line) + 4;
- $lines[] = [$line, $lineLength];
-
- $len = max($lineLength, $len);
- }
- }
-
- $messages = [];
- if (!$e instanceof ExceptionInterface || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
- $messages[] = sprintf('%s', OutputFormatter::escape(sprintf('In %s line %s:', basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a')));
- }
- $messages[] = $emptyLine = sprintf('%s', str_repeat(' ', $len));
- if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
- $messages[] = sprintf('%s%s', $title, str_repeat(' ', max(0, $len - Helper::width($title))));
- }
- foreach ($lines as $line) {
- $messages[] = sprintf(' %s %s', OutputFormatter::escape($line[0]), str_repeat(' ', $len - $line[1]));
- }
- $messages[] = $emptyLine;
- $messages[] = '';
-
- $output->writeln($messages, OutputInterface::VERBOSITY_QUIET);
-
- if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
- $output->writeln('Exception trace:', OutputInterface::VERBOSITY_QUIET);
-
- // exception related properties
- $trace = $e->getTrace();
-
- array_unshift($trace, [
- 'function' => '',
- 'file' => $e->getFile() ?: 'n/a',
- 'line' => $e->getLine() ?: 'n/a',
- 'args' => [],
- ]);
-
- for ($i = 0, $count = \count($trace); $i < $count; ++$i) {
- $class = $trace[$i]['class'] ?? '';
- $type = $trace[$i]['type'] ?? '';
- $function = $trace[$i]['function'] ?? '';
- $file = $trace[$i]['file'] ?? 'n/a';
- $line = $trace[$i]['line'] ?? 'n/a';
-
- $output->writeln(sprintf(' %s%s at %s:%s', $class, $function ? $type.$function.'()' : '', $file, $line), OutputInterface::VERBOSITY_QUIET);
- }
-
- $output->writeln('', OutputInterface::VERBOSITY_QUIET);
- }
- } while ($e = $e->getPrevious());
- }
-
- /**
- * Configures the input and output instances based on the user arguments and options.
- */
- protected function configureIO(InputInterface $input, OutputInterface $output)
- {
- if (true === $input->hasParameterOption(['--ansi'], true)) {
- $output->setDecorated(true);
- } elseif (true === $input->hasParameterOption(['--no-ansi'], true)) {
- $output->setDecorated(false);
- }
-
- if (true === $input->hasParameterOption(['--no-interaction', '-n'], true)) {
- $input->setInteractive(false);
- }
-
- switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) {
- case -1:
- $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
- break;
- case 1:
- $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
- break;
- case 2:
- $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
- break;
- case 3:
- $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
- break;
- default:
- $shellVerbosity = 0;
- break;
- }
-
- if (true === $input->hasParameterOption(['--quiet', '-q'], true)) {
- $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
- $shellVerbosity = -1;
- } else {
- if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || 3 === $input->getParameterOption('--verbose', false, true)) {
- $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
- $shellVerbosity = 3;
- } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || 2 === $input->getParameterOption('--verbose', false, true)) {
- $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
- $shellVerbosity = 2;
- } elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) {
- $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
- $shellVerbosity = 1;
- }
- }
-
- if (-1 === $shellVerbosity) {
- $input->setInteractive(false);
- }
-
- if (\function_exists('putenv')) {
- @putenv('SHELL_VERBOSITY='.$shellVerbosity);
- }
- $_ENV['SHELL_VERBOSITY'] = $shellVerbosity;
- $_SERVER['SHELL_VERBOSITY'] = $shellVerbosity;
- }
-
- /**
- * Runs the current command.
- *
- * If an event dispatcher has been attached to the application,
- * events are also dispatched during the life-cycle of the command.
- *
- * @return int 0 if everything went fine, or an error code
- */
- protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output)
- {
- foreach ($command->getHelperSet() as $helper) {
- if ($helper instanceof InputAwareInterface) {
- $helper->setInput($input);
- }
- }
-
- if ($this->signalsToDispatchEvent) {
- $commandSignals = $command instanceof SignalableCommandInterface ? $command->getSubscribedSignals() : [];
-
- if ($commandSignals || null !== $this->dispatcher) {
- if (!$this->signalRegistry) {
- throw new RuntimeException('Unable to subscribe to signal events. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.');
- }
-
- if (Terminal::hasSttyAvailable()) {
- $sttyMode = shell_exec('stty -g');
-
- foreach ([\SIGINT, \SIGTERM] as $signal) {
- $this->signalRegistry->register($signal, static function () use ($sttyMode) {
- shell_exec('stty '.$sttyMode);
- });
- }
- }
- }
-
- if (null !== $this->dispatcher) {
- foreach ($this->signalsToDispatchEvent as $signal) {
- $event = new ConsoleSignalEvent($command, $input, $output, $signal);
-
- $this->signalRegistry->register($signal, function ($signal, $hasNext) use ($event) {
- $this->dispatcher->dispatch($event, ConsoleEvents::SIGNAL);
-
- // No more handlers, we try to simulate PHP default behavior
- if (!$hasNext) {
- if (!\in_array($signal, [\SIGUSR1, \SIGUSR2], true)) {
- exit(0);
- }
- }
- });
- }
- }
-
- foreach ($commandSignals as $signal) {
- $this->signalRegistry->register($signal, [$command, 'handleSignal']);
- }
- }
-
- if (null === $this->dispatcher) {
- return $command->run($input, $output);
- }
-
- // bind before the console.command event, so the listeners have access to input options/arguments
- try {
- $command->mergeApplicationDefinition();
- $input->bind($command->getDefinition());
- } catch (ExceptionInterface $e) {
- // ignore invalid options/arguments for now, to allow the event listeners to customize the InputDefinition
- }
-
- $event = new ConsoleCommandEvent($command, $input, $output);
- $e = null;
-
- try {
- $this->dispatcher->dispatch($event, ConsoleEvents::COMMAND);
-
- if ($event->commandShouldRun()) {
- $exitCode = $command->run($input, $output);
- } else {
- $exitCode = ConsoleCommandEvent::RETURN_CODE_DISABLED;
- }
- } catch (\Throwable $e) {
- $event = new ConsoleErrorEvent($input, $output, $e, $command);
- $this->dispatcher->dispatch($event, ConsoleEvents::ERROR);
- $e = $event->getError();
-
- if (0 === $exitCode = $event->getExitCode()) {
- $e = null;
- }
- }
-
- $event = new ConsoleTerminateEvent($command, $input, $output, $exitCode);
- $this->dispatcher->dispatch($event, ConsoleEvents::TERMINATE);
-
- if (null !== $e) {
- throw $e;
- }
-
- return $event->getExitCode();
- }
-
- /**
- * Gets the name of the command based on input.
- *
- * @return string|null
- */
- protected function getCommandName(InputInterface $input)
- {
- return $this->singleCommand ? $this->defaultCommand : $input->getFirstArgument();
- }
-
- /**
- * Gets the default input definition.
- *
- * @return InputDefinition
- */
- protected function getDefaultInputDefinition()
- {
- return new InputDefinition([
- new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
- new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display help for the given command. When no command is given display help for the '.$this->defaultCommand.' command'),
- new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'),
- new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'),
- new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'),
- new InputOption('--ansi', '', InputOption::VALUE_NEGATABLE, 'Force (or disable --no-ansi) ANSI output', null),
- new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'),
- ]);
- }
-
- /**
- * Gets the default commands that should always be available.
- *
- * @return Command[]
- */
- protected function getDefaultCommands()
- {
- return [new HelpCommand(), new ListCommand(), new CompleteCommand(), new DumpCompletionCommand()];
- }
-
- /**
- * Gets the default helper set with the helpers that should always be available.
- *
- * @return HelperSet
- */
- protected function getDefaultHelperSet()
- {
- return new HelperSet([
- new FormatterHelper(),
- new DebugFormatterHelper(),
- new ProcessHelper(),
- new QuestionHelper(),
- ]);
- }
-
- /**
- * Returns abbreviated suggestions in string format.
- */
- private function getAbbreviationSuggestions(array $abbrevs): string
- {
- return ' '.implode("\n ", $abbrevs);
- }
-
- /**
- * Returns the namespace part of the command name.
- *
- * This method is not part of public API and should not be used directly.
- *
- * @return string
- */
- public function extractNamespace(string $name, int $limit = null)
- {
- $parts = explode(':', $name, -1);
-
- return implode(':', null === $limit ? $parts : \array_slice($parts, 0, $limit));
- }
-
- /**
- * Finds alternative of $name among $collection,
- * if nothing is found in $collection, try in $abbrevs.
- *
- * @return string[]
- */
- private function findAlternatives(string $name, iterable $collection): array
- {
- $threshold = 1e3;
- $alternatives = [];
-
- $collectionParts = [];
- foreach ($collection as $item) {
- $collectionParts[$item] = explode(':', $item);
- }
-
- foreach (explode(':', $name) as $i => $subname) {
- foreach ($collectionParts as $collectionName => $parts) {
- $exists = isset($alternatives[$collectionName]);
- if (!isset($parts[$i]) && $exists) {
- $alternatives[$collectionName] += $threshold;
- continue;
- } elseif (!isset($parts[$i])) {
- continue;
- }
-
- $lev = levenshtein($subname, $parts[$i]);
- if ($lev <= \strlen($subname) / 3 || '' !== $subname && str_contains($parts[$i], $subname)) {
- $alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev;
- } elseif ($exists) {
- $alternatives[$collectionName] += $threshold;
- }
- }
- }
-
- foreach ($collection as $item) {
- $lev = levenshtein($name, $item);
- if ($lev <= \strlen($name) / 3 || str_contains($item, $name)) {
- $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev;
- }
- }
-
- $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; });
- ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE);
-
- return array_keys($alternatives);
- }
-
- /**
- * Sets the default Command name.
- *
- * @return $this
- */
- public function setDefaultCommand(string $commandName, bool $isSingleCommand = false)
- {
- $this->defaultCommand = explode('|', ltrim($commandName, '|'))[0];
-
- if ($isSingleCommand) {
- // Ensure the command exist
- $this->find($commandName);
-
- $this->singleCommand = true;
- }
-
- return $this;
- }
-
- /**
- * @internal
- */
- public function isSingleCommand(): bool
- {
- return $this->singleCommand;
- }
-
- private function splitStringByWidth(string $string, int $width): array
- {
- // str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly.
- // additionally, array_slice() is not enough as some character has doubled width.
- // we need a function to split string not by character count but by string width
- if (false === $encoding = mb_detect_encoding($string, null, true)) {
- return str_split($string, $width);
- }
-
- $utf8String = mb_convert_encoding($string, 'utf8', $encoding);
- $lines = [];
- $line = '';
-
- $offset = 0;
- while (preg_match('/.{1,10000}/u', $utf8String, $m, 0, $offset)) {
- $offset += \strlen($m[0]);
-
- foreach (preg_split('//u', $m[0]) as $char) {
- // test if $char could be appended to current line
- if (mb_strwidth($line.$char, 'utf8') <= $width) {
- $line .= $char;
- continue;
- }
- // if not, push current line to array and make new line
- $lines[] = str_pad($line, $width);
- $line = $char;
- }
- }
-
- $lines[] = \count($lines) ? str_pad($line, $width) : $line;
-
- mb_convert_variables($encoding, 'utf8', $lines);
-
- return $lines;
- }
-
- /**
- * Returns all namespaces of the command name.
- *
- * @return string[]
- */
- private function extractAllNamespaces(string $name): array
- {
- // -1 as third argument is needed to skip the command short name when exploding
- $parts = explode(':', $name, -1);
- $namespaces = [];
-
- foreach ($parts as $part) {
- if (\count($namespaces)) {
- $namespaces[] = end($namespaces).':'.$part;
- } else {
- $namespaces[] = $part;
- }
- }
-
- return $namespaces;
- }
-
- private function init()
- {
- if ($this->initialized) {
- return;
- }
- $this->initialized = true;
-
- foreach ($this->getDefaultCommands() as $command) {
- $this->add($command);
- }
- }
-}
diff --git a/vendor/symfony/console/Attribute/AsCommand.php b/vendor/symfony/console/Attribute/AsCommand.php
deleted file mode 100644
index b337f548f..000000000
--- a/vendor/symfony/console/Attribute/AsCommand.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Attribute;
-
-/**
- * Service tag to autoconfigure commands.
- */
-#[\Attribute(\Attribute::TARGET_CLASS)]
-class AsCommand
-{
- public function __construct(
- public string $name,
- public ?string $description = null,
- array $aliases = [],
- bool $hidden = false,
- ) {
- if (!$hidden && !$aliases) {
- return;
- }
-
- $name = explode('|', $name);
- $name = array_merge($name, $aliases);
-
- if ($hidden && '' !== $name[0]) {
- array_unshift($name, '');
- }
-
- $this->name = implode('|', $name);
- }
-}
diff --git a/vendor/symfony/console/CHANGELOG.md b/vendor/symfony/console/CHANGELOG.md
deleted file mode 100644
index 6662dd1eb..000000000
--- a/vendor/symfony/console/CHANGELOG.md
+++ /dev/null
@@ -1,217 +0,0 @@
-CHANGELOG
-=========
-
-5.4
----
-
- * Add `TesterTrait::assertCommandIsSuccessful()` to test command
- * Deprecate `HelperSet::setCommand()` and `getCommand()` without replacement
-
-5.3
----
-
- * Add `GithubActionReporter` to render annotations in a Github Action
- * Add `InputOption::VALUE_NEGATABLE` flag to handle `--foo`/`--no-foo` options
- * Add the `Command::$defaultDescription` static property and the `description` attribute
- on the `console.command` tag to allow the `list` command to instantiate commands lazily
- * Add option `--short` to the `list` command
- * Add support for bright colors
- * Add `#[AsCommand]` attribute for declaring commands on PHP 8
- * Add `Helper::width()` and `Helper::length()`
- * The `--ansi` and `--no-ansi` options now default to `null`.
-
-5.2.0
------
-
- * Added `SingleCommandApplication::setAutoExit()` to allow testing via `CommandTester`
- * added support for multiline responses to questions through `Question::setMultiline()`
- and `Question::isMultiline()`
- * Added `SignalRegistry` class to stack signals handlers
- * Added support for signals:
- * Added `Application::getSignalRegistry()` and `Application::setSignalsToDispatchEvent()` methods
- * Added `SignalableCommandInterface` interface
- * Added `TableCellStyle` class to customize table cell
- * Removed `php ` prefix invocation from help messages.
-
-5.1.0
------
-
- * `Command::setHidden()` is final since Symfony 5.1
- * Add `SingleCommandApplication`
- * Add `Cursor` class
-
-5.0.0
------
-
- * removed support for finding hidden commands using an abbreviation, use the full name instead
- * removed `TableStyle::setCrossingChar()` method in favor of `TableStyle::setDefaultCrossingChar()`
- * removed `TableStyle::setHorizontalBorderChar()` method in favor of `TableStyle::setDefaultCrossingChars()`
- * removed `TableStyle::getHorizontalBorderChar()` method in favor of `TableStyle::getBorderChars()`
- * removed `TableStyle::setVerticalBorderChar()` method in favor of `TableStyle::setVerticalBorderChars()`
- * removed `TableStyle::getVerticalBorderChar()` method in favor of `TableStyle::getBorderChars()`
- * removed support for returning `null` from `Command::execute()`, return `0` instead
- * `ProcessHelper::run()` accepts only `array|Symfony\Component\Process\Process` for its `command` argument
- * `Application::setDispatcher` accepts only `Symfony\Contracts\EventDispatcher\EventDispatcherInterface`
- for its `dispatcher` argument
- * renamed `Application::renderException()` and `Application::doRenderException()`
- to `renderThrowable()` and `doRenderThrowable()` respectively.
-
-4.4.0
------
-
- * deprecated finding hidden commands using an abbreviation, use the full name instead
- * added `Question::setTrimmable` default to true to allow the answer to be trimmed
- * added method `minSecondsBetweenRedraws()` and `maxSecondsBetweenRedraws()` on `ProgressBar`
- * `Application` implements `ResetInterface`
- * marked all dispatched event classes as `@final`
- * added support for displaying table horizontally
- * deprecated returning `null` from `Command::execute()`, return `0` instead
- * Deprecated the `Application::renderException()` and `Application::doRenderException()` methods,
- use `renderThrowable()` and `doRenderThrowable()` instead.
- * added support for the `NO_COLOR` env var (https://no-color.org/)
-
-4.3.0
------
-
- * added support for hyperlinks
- * added `ProgressBar::iterate()` method that simplify updating the progress bar when iterating
- * added `Question::setAutocompleterCallback()` to provide a callback function
- that dynamically generates suggestions as the user types
-
-4.2.0
------
-
- * allowed passing commands as `[$process, 'ENV_VAR' => 'value']` to
- `ProcessHelper::run()` to pass environment variables
- * deprecated passing a command as a string to `ProcessHelper::run()`,
- pass it the command as an array of its arguments instead
- * made the `ProcessHelper` class final
- * added `WrappableOutputFormatterInterface::formatAndWrap()` (implemented in `OutputFormatter`)
- * added `capture_stderr_separately` option to `CommandTester::execute()`
-
-4.1.0
------
-
- * added option to run suggested command if command is not found and only 1 alternative is available
- * added option to modify console output and print multiple modifiable sections
- * added support for iterable messages in output `write` and `writeln` methods
-
-4.0.0
------
-
- * `OutputFormatter` throws an exception when unknown options are used
- * removed `QuestionHelper::setInputStream()/getInputStream()`
- * removed `Application::getTerminalWidth()/getTerminalHeight()` and
- `Application::setTerminalDimensions()/getTerminalDimensions()`
- * removed `ConsoleExceptionEvent`
- * removed `ConsoleEvents::EXCEPTION`
-
-3.4.0
------
-
- * added `SHELL_VERBOSITY` env var to control verbosity
- * added `CommandLoaderInterface`, `FactoryCommandLoader` and PSR-11
- `ContainerCommandLoader` for commands lazy-loading
- * added a case-insensitive command name matching fallback
- * added static `Command::$defaultName/getDefaultName()`, allowing for
- commands to be registered at compile time in the application command loader.
- Setting the `$defaultName` property avoids the need for filling the `command`
- attribute on the `console.command` tag when using `AddConsoleCommandPass`.
-
-3.3.0
------
-
- * added `ExceptionListener`
- * added `AddConsoleCommandPass` (originally in FrameworkBundle)
- * [BC BREAK] `Input::getOption()` no longer returns the default value for options
- with value optional explicitly passed empty
- * added console.error event to catch exceptions thrown by other listeners
- * deprecated console.exception event in favor of console.error
- * added ability to handle `CommandNotFoundException` through the
- `console.error` event
- * deprecated default validation in `SymfonyQuestionHelper::ask`
-
-3.2.0
-------
-
- * added `setInputs()` method to CommandTester for ease testing of commands expecting inputs
- * added `setStream()` and `getStream()` methods to Input (implement StreamableInputInterface)
- * added StreamableInputInterface
- * added LockableTrait
-
-3.1.0
------
-
- * added truncate method to FormatterHelper
- * added setColumnWidth(s) method to Table
-
-2.8.3
------
-
- * remove readline support from the question helper as it caused issues
-
-2.8.0
------
-
- * use readline for user input in the question helper when available to allow
- the use of arrow keys
-
-2.6.0
------
-
- * added a Process helper
- * added a DebugFormatter helper
-
-2.5.0
------
-
- * deprecated the dialog helper (use the question helper instead)
- * deprecated TableHelper in favor of Table
- * deprecated ProgressHelper in favor of ProgressBar
- * added ConsoleLogger
- * added a question helper
- * added a way to set the process name of a command
- * added a way to set a default command instead of `ListCommand`
-
-2.4.0
------
-
- * added a way to force terminal dimensions
- * added a convenient method to detect verbosity level
- * [BC BREAK] made descriptors use output instead of returning a string
-
-2.3.0
------
-
- * added multiselect support to the select dialog helper
- * added Table Helper for tabular data rendering
- * added support for events in `Application`
- * added a way to normalize EOLs in `ApplicationTester::getDisplay()` and `CommandTester::getDisplay()`
- * added a way to set the progress bar progress via the `setCurrent` method
- * added support for multiple InputOption shortcuts, written as `'-a|-b|-c'`
- * added two additional verbosity levels, VERBOSITY_VERY_VERBOSE and VERBOSITY_DEBUG
-
-2.2.0
------
-
- * added support for colorization on Windows via ConEmu
- * add a method to Dialog Helper to ask for a question and hide the response
- * added support for interactive selections in console (DialogHelper::select())
- * added support for autocompletion as you type in Dialog Helper
-
-2.1.0
------
-
- * added ConsoleOutputInterface
- * added the possibility to disable a command (Command::isEnabled())
- * added suggestions when a command does not exist
- * added a --raw option to the list command
- * added support for STDERR in the console output class (errors are now sent
- to STDERR)
- * made the defaults (helper set, commands, input definition) in Application
- more easily customizable
- * added support for the shell even if readline is not available
- * added support for process isolation in Symfony shell via
- `--process-isolation` switch
- * added support for `--`, which disables options parsing after that point
- (tokens will be parsed as arguments)
diff --git a/vendor/symfony/console/CI/GithubActionReporter.php b/vendor/symfony/console/CI/GithubActionReporter.php
deleted file mode 100644
index a15c1ff18..000000000
--- a/vendor/symfony/console/CI/GithubActionReporter.php
+++ /dev/null
@@ -1,99 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\CI;
-
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * Utility class for Github actions.
- *
- * @author Maxime Steinhausser
- */
-class GithubActionReporter
-{
- private $output;
-
- /**
- * @see https://github.com/actions/toolkit/blob/5e5e1b7aacba68a53836a34db4a288c3c1c1585b/packages/core/src/command.ts#L80-L85
- */
- private const ESCAPED_DATA = [
- '%' => '%25',
- "\r" => '%0D',
- "\n" => '%0A',
- ];
-
- /**
- * @see https://github.com/actions/toolkit/blob/5e5e1b7aacba68a53836a34db4a288c3c1c1585b/packages/core/src/command.ts#L87-L94
- */
- private const ESCAPED_PROPERTIES = [
- '%' => '%25',
- "\r" => '%0D',
- "\n" => '%0A',
- ':' => '%3A',
- ',' => '%2C',
- ];
-
- public function __construct(OutputInterface $output)
- {
- $this->output = $output;
- }
-
- public static function isGithubActionEnvironment(): bool
- {
- return false !== getenv('GITHUB_ACTIONS');
- }
-
- /**
- * Output an error using the Github annotations format.
- *
- * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
- */
- public function error(string $message, string $file = null, int $line = null, int $col = null): void
- {
- $this->log('error', $message, $file, $line, $col);
- }
-
- /**
- * Output a warning using the Github annotations format.
- *
- * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message
- */
- public function warning(string $message, string $file = null, int $line = null, int $col = null): void
- {
- $this->log('warning', $message, $file, $line, $col);
- }
-
- /**
- * Output a debug log using the Github annotations format.
- *
- * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message
- */
- public function debug(string $message, string $file = null, int $line = null, int $col = null): void
- {
- $this->log('debug', $message, $file, $line, $col);
- }
-
- private function log(string $type, string $message, string $file = null, int $line = null, int $col = null): void
- {
- // Some values must be encoded.
- $message = strtr($message, self::ESCAPED_DATA);
-
- if (!$file) {
- // No file provided, output the message solely:
- $this->output->writeln(sprintf('::%s::%s', $type, $message));
-
- return;
- }
-
- $this->output->writeln(sprintf('::%s file=%s,line=%s,col=%s::%s', $type, strtr($file, self::ESCAPED_PROPERTIES), strtr($line ?? 1, self::ESCAPED_PROPERTIES), strtr($col ?? 0, self::ESCAPED_PROPERTIES), $message));
- }
-}
diff --git a/vendor/symfony/console/Color.php b/vendor/symfony/console/Color.php
deleted file mode 100644
index 22a4ce9ff..000000000
--- a/vendor/symfony/console/Color.php
+++ /dev/null
@@ -1,180 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-
-/**
- * @author Fabien Potencier
- */
-final class Color
-{
- private const COLORS = [
- 'black' => 0,
- 'red' => 1,
- 'green' => 2,
- 'yellow' => 3,
- 'blue' => 4,
- 'magenta' => 5,
- 'cyan' => 6,
- 'white' => 7,
- 'default' => 9,
- ];
-
- private const BRIGHT_COLORS = [
- 'gray' => 0,
- 'bright-red' => 1,
- 'bright-green' => 2,
- 'bright-yellow' => 3,
- 'bright-blue' => 4,
- 'bright-magenta' => 5,
- 'bright-cyan' => 6,
- 'bright-white' => 7,
- ];
-
- private const AVAILABLE_OPTIONS = [
- 'bold' => ['set' => 1, 'unset' => 22],
- 'underscore' => ['set' => 4, 'unset' => 24],
- 'blink' => ['set' => 5, 'unset' => 25],
- 'reverse' => ['set' => 7, 'unset' => 27],
- 'conceal' => ['set' => 8, 'unset' => 28],
- ];
-
- private $foreground;
- private $background;
- private $options = [];
-
- public function __construct(string $foreground = '', string $background = '', array $options = [])
- {
- $this->foreground = $this->parseColor($foreground);
- $this->background = $this->parseColor($background, true);
-
- foreach ($options as $option) {
- if (!isset(self::AVAILABLE_OPTIONS[$option])) {
- throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s).', $option, implode(', ', array_keys(self::AVAILABLE_OPTIONS))));
- }
-
- $this->options[$option] = self::AVAILABLE_OPTIONS[$option];
- }
- }
-
- public function apply(string $text): string
- {
- return $this->set().$text.$this->unset();
- }
-
- public function set(): string
- {
- $setCodes = [];
- if ('' !== $this->foreground) {
- $setCodes[] = $this->foreground;
- }
- if ('' !== $this->background) {
- $setCodes[] = $this->background;
- }
- foreach ($this->options as $option) {
- $setCodes[] = $option['set'];
- }
- if (0 === \count($setCodes)) {
- return '';
- }
-
- return sprintf("\033[%sm", implode(';', $setCodes));
- }
-
- public function unset(): string
- {
- $unsetCodes = [];
- if ('' !== $this->foreground) {
- $unsetCodes[] = 39;
- }
- if ('' !== $this->background) {
- $unsetCodes[] = 49;
- }
- foreach ($this->options as $option) {
- $unsetCodes[] = $option['unset'];
- }
- if (0 === \count($unsetCodes)) {
- return '';
- }
-
- return sprintf("\033[%sm", implode(';', $unsetCodes));
- }
-
- private function parseColor(string $color, bool $background = false): string
- {
- if ('' === $color) {
- return '';
- }
-
- if ('#' === $color[0]) {
- $color = substr($color, 1);
-
- if (3 === \strlen($color)) {
- $color = $color[0].$color[0].$color[1].$color[1].$color[2].$color[2];
- }
-
- if (6 !== \strlen($color)) {
- throw new InvalidArgumentException(sprintf('Invalid "%s" color.', $color));
- }
-
- return ($background ? '4' : '3').$this->convertHexColorToAnsi(hexdec($color));
- }
-
- if (isset(self::COLORS[$color])) {
- return ($background ? '4' : '3').self::COLORS[$color];
- }
-
- if (isset(self::BRIGHT_COLORS[$color])) {
- return ($background ? '10' : '9').self::BRIGHT_COLORS[$color];
- }
-
- throw new InvalidArgumentException(sprintf('Invalid "%s" color; expected one of (%s).', $color, implode(', ', array_merge(array_keys(self::COLORS), array_keys(self::BRIGHT_COLORS)))));
- }
-
- private function convertHexColorToAnsi(int $color): string
- {
- $r = ($color >> 16) & 255;
- $g = ($color >> 8) & 255;
- $b = $color & 255;
-
- // see https://github.com/termstandard/colors/ for more information about true color support
- if ('truecolor' !== getenv('COLORTERM')) {
- return (string) $this->degradeHexColorToAnsi($r, $g, $b);
- }
-
- return sprintf('8;2;%d;%d;%d', $r, $g, $b);
- }
-
- private function degradeHexColorToAnsi(int $r, int $g, int $b): int
- {
- if (0 === round($this->getSaturation($r, $g, $b) / 50)) {
- return 0;
- }
-
- return (round($b / 255) << 2) | (round($g / 255) << 1) | round($r / 255);
- }
-
- private function getSaturation(int $r, int $g, int $b): int
- {
- $r = $r / 255;
- $g = $g / 255;
- $b = $b / 255;
- $v = max($r, $g, $b);
-
- if (0 === $diff = $v - min($r, $g, $b)) {
- return 0;
- }
-
- return (int) $diff * 100 / $v;
- }
-}
diff --git a/vendor/symfony/console/Command/Command.php b/vendor/symfony/console/Command/Command.php
deleted file mode 100644
index cfa18361e..000000000
--- a/vendor/symfony/console/Command/Command.php
+++ /dev/null
@@ -1,710 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Command;
-
-use Symfony\Component\Console\Application;
-use Symfony\Component\Console\Attribute\AsCommand;
-use Symfony\Component\Console\Completion\CompletionInput;
-use Symfony\Component\Console\Completion\CompletionSuggestions;
-use Symfony\Component\Console\Exception\ExceptionInterface;
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\LogicException;
-use Symfony\Component\Console\Helper\HelperSet;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputDefinition;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * Base class for all commands.
- *
- * @author Fabien Potencier
- */
-class Command
-{
- // see https://tldp.org/LDP/abs/html/exitcodes.html
- public const SUCCESS = 0;
- public const FAILURE = 1;
- public const INVALID = 2;
-
- /**
- * @var string|null The default command name
- */
- protected static $defaultName;
-
- /**
- * @var string|null The default command description
- */
- protected static $defaultDescription;
-
- private $application;
- private $name;
- private $processTitle;
- private $aliases = [];
- private $definition;
- private $hidden = false;
- private $help = '';
- private $description = '';
- private $fullDefinition;
- private $ignoreValidationErrors = false;
- private $code;
- private $synopsis = [];
- private $usages = [];
- private $helperSet;
-
- /**
- * @return string|null
- */
- public static function getDefaultName()
- {
- $class = static::class;
-
- if (\PHP_VERSION_ID >= 80000 && $attribute = (new \ReflectionClass($class))->getAttributes(AsCommand::class)) {
- return $attribute[0]->newInstance()->name;
- }
-
- $r = new \ReflectionProperty($class, 'defaultName');
-
- return $class === $r->class ? static::$defaultName : null;
- }
-
- public static function getDefaultDescription(): ?string
- {
- $class = static::class;
-
- if (\PHP_VERSION_ID >= 80000 && $attribute = (new \ReflectionClass($class))->getAttributes(AsCommand::class)) {
- return $attribute[0]->newInstance()->description;
- }
-
- $r = new \ReflectionProperty($class, 'defaultDescription');
-
- return $class === $r->class ? static::$defaultDescription : null;
- }
-
- /**
- * @param string|null $name The name of the command; passing null means it must be set in configure()
- *
- * @throws LogicException When the command name is empty
- */
- public function __construct(string $name = null)
- {
- $this->definition = new InputDefinition();
-
- if (null === $name && null !== $name = static::getDefaultName()) {
- $aliases = explode('|', $name);
-
- if ('' === $name = array_shift($aliases)) {
- $this->setHidden(true);
- $name = array_shift($aliases);
- }
-
- $this->setAliases($aliases);
- }
-
- if (null !== $name) {
- $this->setName($name);
- }
-
- if ('' === $this->description) {
- $this->setDescription(static::getDefaultDescription() ?? '');
- }
-
- $this->configure();
- }
-
- /**
- * Ignores validation errors.
- *
- * This is mainly useful for the help command.
- */
- public function ignoreValidationErrors()
- {
- $this->ignoreValidationErrors = true;
- }
-
- public function setApplication(Application $application = null)
- {
- $this->application = $application;
- if ($application) {
- $this->setHelperSet($application->getHelperSet());
- } else {
- $this->helperSet = null;
- }
-
- $this->fullDefinition = null;
- }
-
- public function setHelperSet(HelperSet $helperSet)
- {
- $this->helperSet = $helperSet;
- }
-
- /**
- * Gets the helper set.
- *
- * @return HelperSet|null
- */
- public function getHelperSet()
- {
- return $this->helperSet;
- }
-
- /**
- * Gets the application instance for this command.
- *
- * @return Application|null
- */
- public function getApplication()
- {
- return $this->application;
- }
-
- /**
- * Checks whether the command is enabled or not in the current environment.
- *
- * Override this to check for x or y and return false if the command cannot
- * run properly under the current conditions.
- *
- * @return bool
- */
- public function isEnabled()
- {
- return true;
- }
-
- /**
- * Configures the current command.
- */
- protected function configure()
- {
- }
-
- /**
- * Executes the current command.
- *
- * This method is not abstract because you can use this class
- * as a concrete class. In this case, instead of defining the
- * execute() method, you set the code to execute by passing
- * a Closure to the setCode() method.
- *
- * @return int 0 if everything went fine, or an exit code
- *
- * @throws LogicException When this abstract method is not implemented
- *
- * @see setCode()
- */
- protected function execute(InputInterface $input, OutputInterface $output)
- {
- throw new LogicException('You must override the execute() method in the concrete command class.');
- }
-
- /**
- * Interacts with the user.
- *
- * This method is executed before the InputDefinition is validated.
- * This means that this is the only place where the command can
- * interactively ask for values of missing required arguments.
- */
- protected function interact(InputInterface $input, OutputInterface $output)
- {
- }
-
- /**
- * Initializes the command after the input has been bound and before the input
- * is validated.
- *
- * This is mainly useful when a lot of commands extends one main command
- * where some things need to be initialized based on the input arguments and options.
- *
- * @see InputInterface::bind()
- * @see InputInterface::validate()
- */
- protected function initialize(InputInterface $input, OutputInterface $output)
- {
- }
-
- /**
- * Runs the command.
- *
- * The code to execute is either defined directly with the
- * setCode() method or by overriding the execute() method
- * in a sub-class.
- *
- * @return int The command exit code
- *
- * @throws ExceptionInterface When input binding fails. Bypass this by calling {@link ignoreValidationErrors()}.
- *
- * @see setCode()
- * @see execute()
- */
- public function run(InputInterface $input, OutputInterface $output)
- {
- // add the application arguments and options
- $this->mergeApplicationDefinition();
-
- // bind the input against the command specific arguments/options
- try {
- $input->bind($this->getDefinition());
- } catch (ExceptionInterface $e) {
- if (!$this->ignoreValidationErrors) {
- throw $e;
- }
- }
-
- $this->initialize($input, $output);
-
- if (null !== $this->processTitle) {
- if (\function_exists('cli_set_process_title')) {
- if (!@cli_set_process_title($this->processTitle)) {
- if ('Darwin' === \PHP_OS) {
- $output->writeln('Running "cli_set_process_title" as an unprivileged user is not supported on MacOS.', OutputInterface::VERBOSITY_VERY_VERBOSE);
- } else {
- cli_set_process_title($this->processTitle);
- }
- }
- } elseif (\function_exists('setproctitle')) {
- setproctitle($this->processTitle);
- } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) {
- $output->writeln('Install the proctitle PECL to be able to change the process title.');
- }
- }
-
- if ($input->isInteractive()) {
- $this->interact($input, $output);
- }
-
- // The command name argument is often omitted when a command is executed directly with its run() method.
- // It would fail the validation if we didn't make sure the command argument is present,
- // since it's required by the application.
- if ($input->hasArgument('command') && null === $input->getArgument('command')) {
- $input->setArgument('command', $this->getName());
- }
-
- $input->validate();
-
- if ($this->code) {
- $statusCode = ($this->code)($input, $output);
- } else {
- $statusCode = $this->execute($input, $output);
-
- if (!\is_int($statusCode)) {
- throw new \TypeError(sprintf('Return value of "%s::execute()" must be of the type int, "%s" returned.', static::class, get_debug_type($statusCode)));
- }
- }
-
- return is_numeric($statusCode) ? (int) $statusCode : 0;
- }
-
- /**
- * Adds suggestions to $suggestions for the current completion input (e.g. option or argument).
- */
- public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
- {
- }
-
- /**
- * Sets the code to execute when running this command.
- *
- * If this method is used, it overrides the code defined
- * in the execute() method.
- *
- * @param callable $code A callable(InputInterface $input, OutputInterface $output)
- *
- * @return $this
- *
- * @throws InvalidArgumentException
- *
- * @see execute()
- */
- public function setCode(callable $code)
- {
- if ($code instanceof \Closure) {
- $r = new \ReflectionFunction($code);
- if (null === $r->getClosureThis()) {
- set_error_handler(static function () {});
- try {
- if ($c = \Closure::bind($code, $this)) {
- $code = $c;
- }
- } finally {
- restore_error_handler();
- }
- }
- }
-
- $this->code = $code;
-
- return $this;
- }
-
- /**
- * Merges the application definition with the command definition.
- *
- * This method is not part of public API and should not be used directly.
- *
- * @param bool $mergeArgs Whether to merge or not the Application definition arguments to Command definition arguments
- *
- * @internal
- */
- public function mergeApplicationDefinition(bool $mergeArgs = true)
- {
- if (null === $this->application) {
- return;
- }
-
- $this->fullDefinition = new InputDefinition();
- $this->fullDefinition->setOptions($this->definition->getOptions());
- $this->fullDefinition->addOptions($this->application->getDefinition()->getOptions());
-
- if ($mergeArgs) {
- $this->fullDefinition->setArguments($this->application->getDefinition()->getArguments());
- $this->fullDefinition->addArguments($this->definition->getArguments());
- } else {
- $this->fullDefinition->setArguments($this->definition->getArguments());
- }
- }
-
- /**
- * Sets an array of argument and option instances.
- *
- * @param array|InputDefinition $definition An array of argument and option instances or a definition instance
- *
- * @return $this
- */
- public function setDefinition($definition)
- {
- if ($definition instanceof InputDefinition) {
- $this->definition = $definition;
- } else {
- $this->definition->setDefinition($definition);
- }
-
- $this->fullDefinition = null;
-
- return $this;
- }
-
- /**
- * Gets the InputDefinition attached to this Command.
- *
- * @return InputDefinition
- */
- public function getDefinition()
- {
- return $this->fullDefinition ?? $this->getNativeDefinition();
- }
-
- /**
- * Gets the InputDefinition to be used to create representations of this Command.
- *
- * Can be overridden to provide the original command representation when it would otherwise
- * be changed by merging with the application InputDefinition.
- *
- * This method is not part of public API and should not be used directly.
- *
- * @return InputDefinition
- */
- public function getNativeDefinition()
- {
- if (null === $this->definition) {
- throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class));
- }
-
- return $this->definition;
- }
-
- /**
- * Adds an argument.
- *
- * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
- * @param mixed $default The default value (for InputArgument::OPTIONAL mode only)
- *
- * @return $this
- *
- * @throws InvalidArgumentException When argument mode is not valid
- */
- public function addArgument(string $name, int $mode = null, string $description = '', $default = null)
- {
- $this->definition->addArgument(new InputArgument($name, $mode, $description, $default));
- if (null !== $this->fullDefinition) {
- $this->fullDefinition->addArgument(new InputArgument($name, $mode, $description, $default));
- }
-
- return $this;
- }
-
- /**
- * Adds an option.
- *
- * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
- * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants
- * @param mixed $default The default value (must be null for InputOption::VALUE_NONE)
- *
- * @return $this
- *
- * @throws InvalidArgumentException If option mode is invalid or incompatible
- */
- public function addOption(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null)
- {
- $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default));
- if (null !== $this->fullDefinition) {
- $this->fullDefinition->addOption(new InputOption($name, $shortcut, $mode, $description, $default));
- }
-
- return $this;
- }
-
- /**
- * Sets the name of the command.
- *
- * This method can set both the namespace and the name if
- * you separate them by a colon (:)
- *
- * $command->setName('foo:bar');
- *
- * @return $this
- *
- * @throws InvalidArgumentException When the name is invalid
- */
- public function setName(string $name)
- {
- $this->validateName($name);
-
- $this->name = $name;
-
- return $this;
- }
-
- /**
- * Sets the process title of the command.
- *
- * This feature should be used only when creating a long process command,
- * like a daemon.
- *
- * @return $this
- */
- public function setProcessTitle(string $title)
- {
- $this->processTitle = $title;
-
- return $this;
- }
-
- /**
- * Returns the command name.
- *
- * @return string|null
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * @param bool $hidden Whether or not the command should be hidden from the list of commands
- * The default value will be true in Symfony 6.0
- *
- * @return $this
- *
- * @final since Symfony 5.1
- */
- public function setHidden(bool $hidden /* = true */)
- {
- $this->hidden = $hidden;
-
- return $this;
- }
-
- /**
- * @return bool whether the command should be publicly shown or not
- */
- public function isHidden()
- {
- return $this->hidden;
- }
-
- /**
- * Sets the description for the command.
- *
- * @return $this
- */
- public function setDescription(string $description)
- {
- $this->description = $description;
-
- return $this;
- }
-
- /**
- * Returns the description for the command.
- *
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
-
- /**
- * Sets the help for the command.
- *
- * @return $this
- */
- public function setHelp(string $help)
- {
- $this->help = $help;
-
- return $this;
- }
-
- /**
- * Returns the help for the command.
- *
- * @return string
- */
- public function getHelp()
- {
- return $this->help;
- }
-
- /**
- * Returns the processed help for the command replacing the %command.name% and
- * %command.full_name% patterns with the real values dynamically.
- *
- * @return string
- */
- public function getProcessedHelp()
- {
- $name = $this->name;
- $isSingleCommand = $this->application && $this->application->isSingleCommand();
-
- $placeholders = [
- '%command.name%',
- '%command.full_name%',
- ];
- $replacements = [
- $name,
- $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name,
- ];
-
- return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription());
- }
-
- /**
- * Sets the aliases for the command.
- *
- * @param string[] $aliases An array of aliases for the command
- *
- * @return $this
- *
- * @throws InvalidArgumentException When an alias is invalid
- */
- public function setAliases(iterable $aliases)
- {
- $list = [];
-
- foreach ($aliases as $alias) {
- $this->validateName($alias);
- $list[] = $alias;
- }
-
- $this->aliases = \is_array($aliases) ? $aliases : $list;
-
- return $this;
- }
-
- /**
- * Returns the aliases for the command.
- *
- * @return array
- */
- public function getAliases()
- {
- return $this->aliases;
- }
-
- /**
- * Returns the synopsis for the command.
- *
- * @param bool $short Whether to show the short version of the synopsis (with options folded) or not
- *
- * @return string
- */
- public function getSynopsis(bool $short = false)
- {
- $key = $short ? 'short' : 'long';
-
- if (!isset($this->synopsis[$key])) {
- $this->synopsis[$key] = trim(sprintf('%s %s', $this->name, $this->definition->getSynopsis($short)));
- }
-
- return $this->synopsis[$key];
- }
-
- /**
- * Add a command usage example, it'll be prefixed with the command name.
- *
- * @return $this
- */
- public function addUsage(string $usage)
- {
- if (!str_starts_with($usage, $this->name)) {
- $usage = sprintf('%s %s', $this->name, $usage);
- }
-
- $this->usages[] = $usage;
-
- return $this;
- }
-
- /**
- * Returns alternative usages of the command.
- *
- * @return array
- */
- public function getUsages()
- {
- return $this->usages;
- }
-
- /**
- * Gets a helper instance by name.
- *
- * @return mixed
- *
- * @throws LogicException if no HelperSet is defined
- * @throws InvalidArgumentException if the helper is not defined
- */
- public function getHelper(string $name)
- {
- if (null === $this->helperSet) {
- throw new LogicException(sprintf('Cannot retrieve helper "%s" because there is no HelperSet defined. Did you forget to add your command to the application or to set the application on the command using the setApplication() method? You can also set the HelperSet directly using the setHelperSet() method.', $name));
- }
-
- return $this->helperSet->get($name);
- }
-
- /**
- * Validates a command name.
- *
- * It must be non-empty and parts can optionally be separated by ":".
- *
- * @throws InvalidArgumentException When the name is invalid
- */
- private function validateName(string $name)
- {
- if (!preg_match('/^[^\:]++(\:[^\:]++)*$/', $name)) {
- throw new InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name));
- }
- }
-}
diff --git a/vendor/symfony/console/Command/CompleteCommand.php b/vendor/symfony/console/Command/CompleteCommand.php
deleted file mode 100644
index 0e35143c3..000000000
--- a/vendor/symfony/console/Command/CompleteCommand.php
+++ /dev/null
@@ -1,205 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Command;
-
-use Symfony\Component\Console\Completion\CompletionInput;
-use Symfony\Component\Console\Completion\CompletionSuggestions;
-use Symfony\Component\Console\Completion\Output\BashCompletionOutput;
-use Symfony\Component\Console\Completion\Output\CompletionOutputInterface;
-use Symfony\Component\Console\Exception\CommandNotFoundException;
-use Symfony\Component\Console\Exception\ExceptionInterface;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * Responsible for providing the values to the shell completion.
- *
- * @author Wouter de Jong
- */
-final class CompleteCommand extends Command
-{
- protected static $defaultName = '|_complete';
- protected static $defaultDescription = 'Internal command to provide shell completion suggestions';
-
- private $completionOutputs;
-
- private $isDebug = false;
-
- /**
- * @param array> $completionOutputs A list of additional completion outputs, with shell name as key and FQCN as value
- */
- public function __construct(array $completionOutputs = [])
- {
- // must be set before the parent constructor, as the property value is used in configure()
- $this->completionOutputs = $completionOutputs + ['bash' => BashCompletionOutput::class];
-
- parent::__construct();
- }
-
- protected function configure(): void
- {
- $this
- ->addOption('shell', 's', InputOption::VALUE_REQUIRED, 'The shell type ("'.implode('", "', array_keys($this->completionOutputs)).'")')
- ->addOption('input', 'i', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'An array of input tokens (e.g. COMP_WORDS or argv)')
- ->addOption('current', 'c', InputOption::VALUE_REQUIRED, 'The index of the "input" array that the cursor is in (e.g. COMP_CWORD)')
- ->addOption('symfony', 'S', InputOption::VALUE_REQUIRED, 'The version of the completion script')
- ;
- }
-
- protected function initialize(InputInterface $input, OutputInterface $output)
- {
- $this->isDebug = filter_var(getenv('SYMFONY_COMPLETION_DEBUG'), \FILTER_VALIDATE_BOOLEAN);
- }
-
- protected function execute(InputInterface $input, OutputInterface $output): int
- {
- try {
- // uncomment when a bugfix or BC break has been introduced in the shell completion scripts
- // $version = $input->getOption('symfony');
- // if ($version && version_compare($version, 'x.y', '>=')) {
- // $message = sprintf('Completion script version is not supported ("%s" given, ">=x.y" required).', $version);
- // $this->log($message);
-
- // $output->writeln($message.' Install the Symfony completion script again by using the "completion" command.');
-
- // return 126;
- // }
-
- $shell = $input->getOption('shell');
- if (!$shell) {
- throw new \RuntimeException('The "--shell" option must be set.');
- }
-
- if (!$completionOutput = $this->completionOutputs[$shell] ?? false) {
- throw new \RuntimeException(sprintf('Shell completion is not supported for your shell: "%s" (supported: "%s").', $shell, implode('", "', array_keys($this->completionOutputs))));
- }
-
- $completionInput = $this->createCompletionInput($input);
- $suggestions = new CompletionSuggestions();
-
- $this->log([
- '',
- ''.date('Y-m-d H:i:s').'>',
- 'Input:> ("|" indicates the cursor position)>',
- ' '.(string) $completionInput,
- 'Command:>',
- ' '.(string) implode(' ', $_SERVER['argv']),
- 'Messages:>',
- ]);
-
- $command = $this->findCommand($completionInput, $output);
- if (null === $command) {
- $this->log(' No command found, completing using the Application class.');
-
- $this->getApplication()->complete($completionInput, $suggestions);
- } elseif (
- $completionInput->mustSuggestArgumentValuesFor('command')
- && $command->getName() !== $completionInput->getCompletionValue()
- && !\in_array($completionInput->getCompletionValue(), $command->getAliases(), true)
- ) {
- $this->log(' No command found, completing using the Application class.');
-
- // expand shortcut names ("cache:cl") into their full name ("cache:clear")
- $suggestions->suggestValues(array_filter(array_merge([$command->getName()], $command->getAliases())));
- } else {
- $command->mergeApplicationDefinition();
- $completionInput->bind($command->getDefinition());
-
- if (CompletionInput::TYPE_OPTION_NAME === $completionInput->getCompletionType()) {
- $this->log(' Completing option names for the '.\get_class($command instanceof LazyCommand ? $command->getCommand() : $command).'> command.');
-
- $suggestions->suggestOptions($command->getDefinition()->getOptions());
- } else {
- $this->log([
- ' Completing using the '.\get_class($command instanceof LazyCommand ? $command->getCommand() : $command).'> class.',
- ' Completing '.$completionInput->getCompletionType().'> for '.$completionInput->getCompletionName().'>',
- ]);
- if (null !== $compval = $completionInput->getCompletionValue()) {
- $this->log(' Current value: '.$compval.'>');
- }
-
- $command->complete($completionInput, $suggestions);
- }
- }
-
- /** @var CompletionOutputInterface $completionOutput */
- $completionOutput = new $completionOutput();
-
- $this->log('Suggestions:>');
- if ($options = $suggestions->getOptionSuggestions()) {
- $this->log(' --'.implode(' --', array_map(function ($o) { return $o->getName(); }, $options)));
- } elseif ($values = $suggestions->getValueSuggestions()) {
- $this->log(' '.implode(' ', $values));
- } else {
- $this->log(' No suggestions were provided>');
- }
-
- $completionOutput->write($suggestions, $output);
- } catch (\Throwable $e) {
- $this->log([
- 'Error!',
- (string) $e,
- ]);
-
- if ($output->isDebug()) {
- throw $e;
- }
-
- return 2;
- }
-
- return 0;
- }
-
- private function createCompletionInput(InputInterface $input): CompletionInput
- {
- $currentIndex = $input->getOption('current');
- if (!$currentIndex || !ctype_digit($currentIndex)) {
- throw new \RuntimeException('The "--current" option must be set and it must be an integer.');
- }
-
- $completionInput = CompletionInput::fromTokens($input->getOption('input'), (int) $currentIndex);
-
- try {
- $completionInput->bind($this->getApplication()->getDefinition());
- } catch (ExceptionInterface $e) {
- }
-
- return $completionInput;
- }
-
- private function findCommand(CompletionInput $completionInput, OutputInterface $output): ?Command
- {
- try {
- $inputName = $completionInput->getFirstArgument();
- if (null === $inputName) {
- return null;
- }
-
- return $this->getApplication()->find($inputName);
- } catch (CommandNotFoundException $e) {
- }
-
- return null;
- }
-
- private function log($messages): void
- {
- if (!$this->isDebug) {
- return;
- }
-
- $commandName = basename($_SERVER['argv'][0]);
- file_put_contents(sys_get_temp_dir().'/sf_'.$commandName.'.log', implode(\PHP_EOL, (array) $messages).\PHP_EOL, \FILE_APPEND);
- }
-}
diff --git a/vendor/symfony/console/Command/DumpCompletionCommand.php b/vendor/symfony/console/Command/DumpCompletionCommand.php
deleted file mode 100644
index eaf22be1a..000000000
--- a/vendor/symfony/console/Command/DumpCompletionCommand.php
+++ /dev/null
@@ -1,145 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Command;
-
-use Symfony\Component\Console\Completion\CompletionInput;
-use Symfony\Component\Console\Completion\CompletionSuggestions;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Output\ConsoleOutputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Process\Process;
-
-/**
- * Dumps the completion script for the current shell.
- *
- * @author Wouter de Jong
- */
-final class DumpCompletionCommand extends Command
-{
- protected static $defaultName = 'completion';
- protected static $defaultDescription = 'Dump the shell completion script';
-
- public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
- {
- if ($input->mustSuggestArgumentValuesFor('shell')) {
- $suggestions->suggestValues($this->getSupportedShells());
- }
- }
-
- protected function configure()
- {
- $fullCommand = $_SERVER['PHP_SELF'];
- $commandName = basename($fullCommand);
- $fullCommand = @realpath($fullCommand) ?: $fullCommand;
-
- $this
- ->setHelp(<<%command.name%> command dumps the shell completion script required
-to use shell autocompletion (currently only bash completion is supported).
-
-Static installation
-------------------->
-
-Dump the script to a global completion file and restart your shell:
-
- %command.full_name% bash | sudo tee /etc/bash_completion.d/{$commandName}>
-
-Or dump the script to a local file and source it:
-
- %command.full_name% bash > completion.sh>
-
- # source the file whenever you use the project>
- source completion.sh>
-
- # or add this line at the end of your "~/.bashrc" file:>
- source /path/to/completion.sh>
-
-Dynamic installation
--------------------->
-
-Add this to the end of your shell configuration file (e.g. "~/.bashrc">):
-
- eval "$({$fullCommand} completion bash)">
-EOH
- )
- ->addArgument('shell', InputArgument::OPTIONAL, 'The shell type (e.g. "bash"), the value of the "$SHELL" env var will be used if this is not given')
- ->addOption('debug', null, InputOption::VALUE_NONE, 'Tail the completion debug log')
- ;
- }
-
- protected function execute(InputInterface $input, OutputInterface $output): int
- {
- $commandName = basename($_SERVER['argv'][0]);
-
- if ($input->getOption('debug')) {
- $this->tailDebugLog($commandName, $output);
-
- return 0;
- }
-
- $shell = $input->getArgument('shell') ?? self::guessShell();
- $completionFile = __DIR__.'/../Resources/completion.'.$shell;
- if (!file_exists($completionFile)) {
- $supportedShells = $this->getSupportedShells();
-
- if ($output instanceof ConsoleOutputInterface) {
- $output = $output->getErrorOutput();
- }
- if ($shell) {
- $output->writeln(sprintf('Detected shell "%s", which is not supported by Symfony shell completion (supported shells: "%s").>', $shell, implode('", "', $supportedShells)));
- } else {
- $output->writeln(sprintf('Shell not detected, Symfony shell completion only supports "%s").>', implode('", "', $supportedShells)));
- }
-
- return 2;
- }
-
- $output->write(str_replace(['{{ COMMAND_NAME }}', '{{ VERSION }}'], [$commandName, $this->getApplication()->getVersion()], file_get_contents($completionFile)));
-
- return 0;
- }
-
- private static function guessShell(): string
- {
- return basename($_SERVER['SHELL'] ?? '');
- }
-
- private function tailDebugLog(string $commandName, OutputInterface $output): void
- {
- $debugFile = sys_get_temp_dir().'/sf_'.$commandName.'.log';
- if (!file_exists($debugFile)) {
- touch($debugFile);
- }
- $process = new Process(['tail', '-f', $debugFile], null, null, null, 0);
- $process->run(function (string $type, string $line) use ($output): void {
- $output->write($line);
- });
- }
-
- /**
- * @return string[]
- */
- private function getSupportedShells(): array
- {
- $shells = [];
-
- foreach (new \DirectoryIterator(__DIR__.'/../Resources/') as $file) {
- if (str_starts_with($file->getBasename(), 'completion.') && $file->isFile()) {
- $shells[] = $file->getExtension();
- }
- }
-
- return $shells;
- }
-}
diff --git a/vendor/symfony/console/Command/HelpCommand.php b/vendor/symfony/console/Command/HelpCommand.php
deleted file mode 100644
index c66ef463e..000000000
--- a/vendor/symfony/console/Command/HelpCommand.php
+++ /dev/null
@@ -1,101 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Command;
-
-use Symfony\Component\Console\Completion\CompletionInput;
-use Symfony\Component\Console\Completion\CompletionSuggestions;
-use Symfony\Component\Console\Descriptor\ApplicationDescription;
-use Symfony\Component\Console\Helper\DescriptorHelper;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * HelpCommand displays the help for a given command.
- *
- * @author Fabien Potencier
- */
-class HelpCommand extends Command
-{
- private $command;
-
- /**
- * {@inheritdoc}
- */
- protected function configure()
- {
- $this->ignoreValidationErrors();
-
- $this
- ->setName('help')
- ->setDefinition([
- new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'),
- new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'),
- new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'),
- ])
- ->setDescription('Display help for a command')
- ->setHelp(<<<'EOF'
-The %command.name% command displays help for a given command:
-
- %command.full_name% list
-
-You can also output the help in other formats by using the --format option:
-
- %command.full_name% --format=xml list
-
-To display the list of available commands, please use the list command.
-EOF
- )
- ;
- }
-
- public function setCommand(Command $command)
- {
- $this->command = $command;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function execute(InputInterface $input, OutputInterface $output)
- {
- if (null === $this->command) {
- $this->command = $this->getApplication()->find($input->getArgument('command_name'));
- }
-
- $helper = new DescriptorHelper();
- $helper->describe($output, $this->command, [
- 'format' => $input->getOption('format'),
- 'raw_text' => $input->getOption('raw'),
- ]);
-
- $this->command = null;
-
- return 0;
- }
-
- public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
- {
- if ($input->mustSuggestArgumentValuesFor('command_name')) {
- $descriptor = new ApplicationDescription($this->getApplication());
- $suggestions->suggestValues(array_keys($descriptor->getCommands()));
-
- return;
- }
-
- if ($input->mustSuggestOptionValuesFor('format')) {
- $helper = new DescriptorHelper();
- $suggestions->suggestValues($helper->getFormats());
- }
- }
-}
diff --git a/vendor/symfony/console/Command/LazyCommand.php b/vendor/symfony/console/Command/LazyCommand.php
deleted file mode 100644
index e576ad03f..000000000
--- a/vendor/symfony/console/Command/LazyCommand.php
+++ /dev/null
@@ -1,218 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Command;
-
-use Symfony\Component\Console\Application;
-use Symfony\Component\Console\Completion\CompletionInput;
-use Symfony\Component\Console\Completion\CompletionSuggestions;
-use Symfony\Component\Console\Helper\HelperSet;
-use Symfony\Component\Console\Input\InputDefinition;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * @author Nicolas Grekas
- */
-final class LazyCommand extends Command
-{
- private $command;
- private $isEnabled;
-
- public function __construct(string $name, array $aliases, string $description, bool $isHidden, \Closure $commandFactory, ?bool $isEnabled = true)
- {
- $this->setName($name)
- ->setAliases($aliases)
- ->setHidden($isHidden)
- ->setDescription($description);
-
- $this->command = $commandFactory;
- $this->isEnabled = $isEnabled;
- }
-
- public function ignoreValidationErrors(): void
- {
- $this->getCommand()->ignoreValidationErrors();
- }
-
- public function setApplication(Application $application = null): void
- {
- if ($this->command instanceof parent) {
- $this->command->setApplication($application);
- }
-
- parent::setApplication($application);
- }
-
- public function setHelperSet(HelperSet $helperSet): void
- {
- if ($this->command instanceof parent) {
- $this->command->setHelperSet($helperSet);
- }
-
- parent::setHelperSet($helperSet);
- }
-
- public function isEnabled(): bool
- {
- return $this->isEnabled ?? $this->getCommand()->isEnabled();
- }
-
- public function run(InputInterface $input, OutputInterface $output): int
- {
- return $this->getCommand()->run($input, $output);
- }
-
- public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
- {
- $this->getCommand()->complete($input, $suggestions);
- }
-
- /**
- * @return $this
- */
- public function setCode(callable $code): self
- {
- $this->getCommand()->setCode($code);
-
- return $this;
- }
-
- /**
- * @internal
- */
- public function mergeApplicationDefinition(bool $mergeArgs = true): void
- {
- $this->getCommand()->mergeApplicationDefinition($mergeArgs);
- }
-
- /**
- * @return $this
- */
- public function setDefinition($definition): self
- {
- $this->getCommand()->setDefinition($definition);
-
- return $this;
- }
-
- public function getDefinition(): InputDefinition
- {
- return $this->getCommand()->getDefinition();
- }
-
- public function getNativeDefinition(): InputDefinition
- {
- return $this->getCommand()->getNativeDefinition();
- }
-
- /**
- * @return $this
- */
- public function addArgument(string $name, int $mode = null, string $description = '', $default = null): self
- {
- $this->getCommand()->addArgument($name, $mode, $description, $default);
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function addOption(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null): self
- {
- $this->getCommand()->addOption($name, $shortcut, $mode, $description, $default);
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function setProcessTitle(string $title): self
- {
- $this->getCommand()->setProcessTitle($title);
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function setHelp(string $help): self
- {
- $this->getCommand()->setHelp($help);
-
- return $this;
- }
-
- public function getHelp(): string
- {
- return $this->getCommand()->getHelp();
- }
-
- public function getProcessedHelp(): string
- {
- return $this->getCommand()->getProcessedHelp();
- }
-
- public function getSynopsis(bool $short = false): string
- {
- return $this->getCommand()->getSynopsis($short);
- }
-
- /**
- * @return $this
- */
- public function addUsage(string $usage): self
- {
- $this->getCommand()->addUsage($usage);
-
- return $this;
- }
-
- public function getUsages(): array
- {
- return $this->getCommand()->getUsages();
- }
-
- /**
- * @return mixed
- */
- public function getHelper(string $name)
- {
- return $this->getCommand()->getHelper($name);
- }
-
- public function getCommand(): parent
- {
- if (!$this->command instanceof \Closure) {
- return $this->command;
- }
-
- $command = $this->command = ($this->command)();
- $command->setApplication($this->getApplication());
-
- if (null !== $this->getHelperSet()) {
- $command->setHelperSet($this->getHelperSet());
- }
-
- $command->setName($this->getName())
- ->setAliases($this->getAliases())
- ->setHidden($this->isHidden())
- ->setDescription($this->getDescription());
-
- // Will throw if the command is not correctly initialized.
- $command->getDefinition();
-
- return $command;
- }
-}
diff --git a/vendor/symfony/console/Command/ListCommand.php b/vendor/symfony/console/Command/ListCommand.php
deleted file mode 100644
index f04a4ef67..000000000
--- a/vendor/symfony/console/Command/ListCommand.php
+++ /dev/null
@@ -1,95 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Command;
-
-use Symfony\Component\Console\Completion\CompletionInput;
-use Symfony\Component\Console\Completion\CompletionSuggestions;
-use Symfony\Component\Console\Descriptor\ApplicationDescription;
-use Symfony\Component\Console\Helper\DescriptorHelper;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * ListCommand displays the list of all available commands for the application.
- *
- * @author Fabien Potencier
- */
-class ListCommand extends Command
-{
- /**
- * {@inheritdoc}
- */
- protected function configure()
- {
- $this
- ->setName('list')
- ->setDefinition([
- new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'),
- new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'),
- new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'),
- new InputOption('short', null, InputOption::VALUE_NONE, 'To skip describing commands\' arguments'),
- ])
- ->setDescription('List commands')
- ->setHelp(<<<'EOF'
-The %command.name% command lists all commands:
-
- %command.full_name%
-
-You can also display the commands for a specific namespace:
-
- %command.full_name% test
-
-You can also output the information in other formats by using the --format option:
-
- %command.full_name% --format=xml
-
-It's also possible to get raw list of commands (useful for embedding command runner):
-
- %command.full_name% --raw
-EOF
- )
- ;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function execute(InputInterface $input, OutputInterface $output)
- {
- $helper = new DescriptorHelper();
- $helper->describe($output, $this->getApplication(), [
- 'format' => $input->getOption('format'),
- 'raw_text' => $input->getOption('raw'),
- 'namespace' => $input->getArgument('namespace'),
- 'short' => $input->getOption('short'),
- ]);
-
- return 0;
- }
-
- public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
- {
- if ($input->mustSuggestArgumentValuesFor('namespace')) {
- $descriptor = new ApplicationDescription($this->getApplication());
- $suggestions->suggestValues(array_keys($descriptor->getNamespaces()));
-
- return;
- }
-
- if ($input->mustSuggestOptionValuesFor('format')) {
- $helper = new DescriptorHelper();
- $suggestions->suggestValues($helper->getFormats());
- }
- }
-}
diff --git a/vendor/symfony/console/Command/LockableTrait.php b/vendor/symfony/console/Command/LockableTrait.php
deleted file mode 100644
index b1856dca7..000000000
--- a/vendor/symfony/console/Command/LockableTrait.php
+++ /dev/null
@@ -1,69 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Command;
-
-use Symfony\Component\Console\Exception\LogicException;
-use Symfony\Component\Lock\LockFactory;
-use Symfony\Component\Lock\LockInterface;
-use Symfony\Component\Lock\Store\FlockStore;
-use Symfony\Component\Lock\Store\SemaphoreStore;
-
-/**
- * Basic lock feature for commands.
- *
- * @author Geoffrey Brier
- */
-trait LockableTrait
-{
- /** @var LockInterface|null */
- private $lock;
-
- /**
- * Locks a command.
- */
- private function lock(string $name = null, bool $blocking = false): bool
- {
- if (!class_exists(SemaphoreStore::class)) {
- throw new LogicException('To enable the locking feature you must install the symfony/lock component.');
- }
-
- if (null !== $this->lock) {
- throw new LogicException('A lock is already in place.');
- }
-
- if (SemaphoreStore::isSupported()) {
- $store = new SemaphoreStore();
- } else {
- $store = new FlockStore();
- }
-
- $this->lock = (new LockFactory($store))->createLock($name ?: $this->getName());
- if (!$this->lock->acquire($blocking)) {
- $this->lock = null;
-
- return false;
- }
-
- return true;
- }
-
- /**
- * Releases the command lock if there is one.
- */
- private function release()
- {
- if ($this->lock) {
- $this->lock->release();
- $this->lock = null;
- }
- }
-}
diff --git a/vendor/symfony/console/Command/SignalableCommandInterface.php b/vendor/symfony/console/Command/SignalableCommandInterface.php
deleted file mode 100644
index d439728b6..000000000
--- a/vendor/symfony/console/Command/SignalableCommandInterface.php
+++ /dev/null
@@ -1,30 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Command;
-
-/**
- * Interface for command reacting to signal.
- *
- * @author Grégoire Pineau
- */
-interface SignalableCommandInterface
-{
- /**
- * Returns the list of signals to subscribe.
- */
- public function getSubscribedSignals(): array;
-
- /**
- * The method will be called when the application is signaled.
- */
- public function handleSignal(int $signal): void;
-}
diff --git a/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php b/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php
deleted file mode 100644
index 0adaf886f..000000000
--- a/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\CommandLoader;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Exception\CommandNotFoundException;
-
-/**
- * @author Robin Chalas
- */
-interface CommandLoaderInterface
-{
- /**
- * Loads a command.
- *
- * @return Command
- *
- * @throws CommandNotFoundException
- */
- public function get(string $name);
-
- /**
- * Checks if a command exists.
- *
- * @return bool
- */
- public function has(string $name);
-
- /**
- * @return string[]
- */
- public function getNames();
-}
diff --git a/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php b/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php
deleted file mode 100644
index ddccb3d45..000000000
--- a/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php
+++ /dev/null
@@ -1,63 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\CommandLoader;
-
-use Psr\Container\ContainerInterface;
-use Symfony\Component\Console\Exception\CommandNotFoundException;
-
-/**
- * Loads commands from a PSR-11 container.
- *
- * @author Robin Chalas
- */
-class ContainerCommandLoader implements CommandLoaderInterface
-{
- private $container;
- private $commandMap;
-
- /**
- * @param array $commandMap An array with command names as keys and service ids as values
- */
- public function __construct(ContainerInterface $container, array $commandMap)
- {
- $this->container = $container;
- $this->commandMap = $commandMap;
- }
-
- /**
- * {@inheritdoc}
- */
- public function get(string $name)
- {
- if (!$this->has($name)) {
- throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
- }
-
- return $this->container->get($this->commandMap[$name]);
- }
-
- /**
- * {@inheritdoc}
- */
- public function has(string $name)
- {
- return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getNames()
- {
- return array_keys($this->commandMap);
- }
-}
diff --git a/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php b/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php
deleted file mode 100644
index 7e2db3464..000000000
--- a/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php
+++ /dev/null
@@ -1,62 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\CommandLoader;
-
-use Symfony\Component\Console\Exception\CommandNotFoundException;
-
-/**
- * A simple command loader using factories to instantiate commands lazily.
- *
- * @author Maxime Steinhausser
- */
-class FactoryCommandLoader implements CommandLoaderInterface
-{
- private $factories;
-
- /**
- * @param callable[] $factories Indexed by command names
- */
- public function __construct(array $factories)
- {
- $this->factories = $factories;
- }
-
- /**
- * {@inheritdoc}
- */
- public function has(string $name)
- {
- return isset($this->factories[$name]);
- }
-
- /**
- * {@inheritdoc}
- */
- public function get(string $name)
- {
- if (!isset($this->factories[$name])) {
- throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
- }
-
- $factory = $this->factories[$name];
-
- return $factory();
- }
-
- /**
- * {@inheritdoc}
- */
- public function getNames()
- {
- return array_keys($this->factories);
- }
-}
diff --git a/vendor/symfony/console/Completion/CompletionInput.php b/vendor/symfony/console/Completion/CompletionInput.php
deleted file mode 100644
index 368b94507..000000000
--- a/vendor/symfony/console/Completion/CompletionInput.php
+++ /dev/null
@@ -1,249 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Completion;
-
-use Symfony\Component\Console\Exception\RuntimeException;
-use Symfony\Component\Console\Input\ArgvInput;
-use Symfony\Component\Console\Input\InputDefinition;
-use Symfony\Component\Console\Input\InputOption;
-
-/**
- * An input specialized for shell completion.
- *
- * This input allows unfinished option names or values and exposes what kind of
- * completion is expected.
- *
- * @author Wouter de Jong
- */
-final class CompletionInput extends ArgvInput
-{
- public const TYPE_ARGUMENT_VALUE = 'argument_value';
- public const TYPE_OPTION_VALUE = 'option_value';
- public const TYPE_OPTION_NAME = 'option_name';
- public const TYPE_NONE = 'none';
-
- private $tokens;
- private $currentIndex;
- private $completionType;
- private $completionName = null;
- private $completionValue = '';
-
- /**
- * Converts a terminal string into tokens.
- *
- * This is required for shell completions without COMP_WORDS support.
- */
- public static function fromString(string $inputStr, int $currentIndex): self
- {
- preg_match_all('/(?<=^|\s)([\'"]?)(.+?)(?tokens = $tokens;
- $input->currentIndex = $currentIndex;
-
- return $input;
- }
-
- /**
- * {@inheritdoc}
- */
- public function bind(InputDefinition $definition): void
- {
- parent::bind($definition);
-
- $relevantToken = $this->getRelevantToken();
- if ('-' === $relevantToken[0]) {
- // the current token is an input option: complete either option name or option value
- [$optionToken, $optionValue] = explode('=', $relevantToken, 2) + ['', ''];
-
- $option = $this->getOptionFromToken($optionToken);
- if (null === $option && !$this->isCursorFree()) {
- $this->completionType = self::TYPE_OPTION_NAME;
- $this->completionValue = $relevantToken;
-
- return;
- }
-
- if (null !== $option && $option->acceptValue()) {
- $this->completionType = self::TYPE_OPTION_VALUE;
- $this->completionName = $option->getName();
- $this->completionValue = $optionValue ?: (!str_starts_with($optionToken, '--') ? substr($optionToken, 2) : '');
-
- return;
- }
- }
-
- $previousToken = $this->tokens[$this->currentIndex - 1];
- if ('-' === $previousToken[0] && '' !== trim($previousToken, '-')) {
- // check if previous option accepted a value
- $previousOption = $this->getOptionFromToken($previousToken);
- if (null !== $previousOption && $previousOption->acceptValue()) {
- $this->completionType = self::TYPE_OPTION_VALUE;
- $this->completionName = $previousOption->getName();
- $this->completionValue = $relevantToken;
-
- return;
- }
- }
-
- // complete argument value
- $this->completionType = self::TYPE_ARGUMENT_VALUE;
-
- foreach ($this->definition->getArguments() as $argumentName => $argument) {
- if (!isset($this->arguments[$argumentName])) {
- break;
- }
-
- $argumentValue = $this->arguments[$argumentName];
- $this->completionName = $argumentName;
- if (\is_array($argumentValue)) {
- $this->completionValue = $argumentValue ? $argumentValue[array_key_last($argumentValue)] : null;
- } else {
- $this->completionValue = $argumentValue;
- }
- }
-
- if ($this->currentIndex >= \count($this->tokens)) {
- if (!isset($this->arguments[$argumentName]) || $this->definition->getArgument($argumentName)->isArray()) {
- $this->completionName = $argumentName;
- $this->completionValue = '';
- } else {
- // we've reached the end
- $this->completionType = self::TYPE_NONE;
- $this->completionName = null;
- $this->completionValue = '';
- }
- }
- }
-
- /**
- * Returns the type of completion required.
- *
- * TYPE_ARGUMENT_VALUE when completing the value of an input argument
- * TYPE_OPTION_VALUE when completing the value of an input option
- * TYPE_OPTION_NAME when completing the name of an input option
- * TYPE_NONE when nothing should be completed
- *
- * @return string One of self::TYPE_* constants. TYPE_OPTION_NAME and TYPE_NONE are already implemented by the Console component
- */
- public function getCompletionType(): string
- {
- return $this->completionType;
- }
-
- /**
- * The name of the input option or argument when completing a value.
- *
- * @return string|null returns null when completing an option name
- */
- public function getCompletionName(): ?string
- {
- return $this->completionName;
- }
-
- /**
- * The value already typed by the user (or empty string).
- */
- public function getCompletionValue(): string
- {
- return $this->completionValue;
- }
-
- public function mustSuggestOptionValuesFor(string $optionName): bool
- {
- return self::TYPE_OPTION_VALUE === $this->getCompletionType() && $optionName === $this->getCompletionName();
- }
-
- public function mustSuggestArgumentValuesFor(string $argumentName): bool
- {
- return self::TYPE_ARGUMENT_VALUE === $this->getCompletionType() && $argumentName === $this->getCompletionName();
- }
-
- protected function parseToken(string $token, bool $parseOptions): bool
- {
- try {
- return parent::parseToken($token, $parseOptions);
- } catch (RuntimeException $e) {
- // suppress errors, completed input is almost never valid
- }
-
- return $parseOptions;
- }
-
- private function getOptionFromToken(string $optionToken): ?InputOption
- {
- $optionName = ltrim($optionToken, '-');
- if (!$optionName) {
- return null;
- }
-
- if ('-' === ($optionToken[1] ?? ' ')) {
- // long option name
- return $this->definition->hasOption($optionName) ? $this->definition->getOption($optionName) : null;
- }
-
- // short option name
- return $this->definition->hasShortcut($optionName[0]) ? $this->definition->getOptionForShortcut($optionName[0]) : null;
- }
-
- /**
- * The token of the cursor, or the last token if the cursor is at the end of the input.
- */
- private function getRelevantToken(): string
- {
- return $this->tokens[$this->isCursorFree() ? $this->currentIndex - 1 : $this->currentIndex];
- }
-
- /**
- * Whether the cursor is "free" (i.e. at the end of the input preceded by a space).
- */
- private function isCursorFree(): bool
- {
- $nrOfTokens = \count($this->tokens);
- if ($this->currentIndex > $nrOfTokens) {
- throw new \LogicException('Current index is invalid, it must be the number of input tokens or one more.');
- }
-
- return $this->currentIndex >= $nrOfTokens;
- }
-
- public function __toString()
- {
- $str = '';
- foreach ($this->tokens as $i => $token) {
- $str .= $token;
-
- if ($this->currentIndex === $i) {
- $str .= '|';
- }
-
- $str .= ' ';
- }
-
- if ($this->currentIndex > $i) {
- $str .= '|';
- }
-
- return rtrim($str);
- }
-}
diff --git a/vendor/symfony/console/Completion/CompletionSuggestions.php b/vendor/symfony/console/Completion/CompletionSuggestions.php
deleted file mode 100644
index d8905e5ee..000000000
--- a/vendor/symfony/console/Completion/CompletionSuggestions.php
+++ /dev/null
@@ -1,99 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Completion;
-
-use Symfony\Component\Console\Input\InputOption;
-
-/**
- * Stores all completion suggestions for the current input.
- *
- * @author Wouter de Jong
- */
-final class CompletionSuggestions
-{
- private $valueSuggestions = [];
- private $optionSuggestions = [];
-
- /**
- * Add a suggested value for an input option or argument.
- *
- * @param string|Suggestion $value
- *
- * @return $this
- */
- public function suggestValue($value): self
- {
- $this->valueSuggestions[] = !$value instanceof Suggestion ? new Suggestion($value) : $value;
-
- return $this;
- }
-
- /**
- * Add multiple suggested values at once for an input option or argument.
- *
- * @param list $values
- *
- * @return $this
- */
- public function suggestValues(array $values): self
- {
- foreach ($values as $value) {
- $this->suggestValue($value);
- }
-
- return $this;
- }
-
- /**
- * Add a suggestion for an input option name.
- *
- * @return $this
- */
- public function suggestOption(InputOption $option): self
- {
- $this->optionSuggestions[] = $option;
-
- return $this;
- }
-
- /**
- * Add multiple suggestions for input option names at once.
- *
- * @param InputOption[] $options
- *
- * @return $this
- */
- public function suggestOptions(array $options): self
- {
- foreach ($options as $option) {
- $this->suggestOption($option);
- }
-
- return $this;
- }
-
- /**
- * @return InputOption[]
- */
- public function getOptionSuggestions(): array
- {
- return $this->optionSuggestions;
- }
-
- /**
- * @return Suggestion[]
- */
- public function getValueSuggestions(): array
- {
- return $this->valueSuggestions;
- }
-}
diff --git a/vendor/symfony/console/Completion/Output/BashCompletionOutput.php b/vendor/symfony/console/Completion/Output/BashCompletionOutput.php
deleted file mode 100644
index c6f76eb8f..000000000
--- a/vendor/symfony/console/Completion/Output/BashCompletionOutput.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Completion\Output;
-
-use Symfony\Component\Console\Completion\CompletionSuggestions;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * @author Wouter de Jong
- */
-class BashCompletionOutput implements CompletionOutputInterface
-{
- public function write(CompletionSuggestions $suggestions, OutputInterface $output): void
- {
- $values = $suggestions->getValueSuggestions();
- foreach ($suggestions->getOptionSuggestions() as $option) {
- $values[] = '--'.$option->getName();
- if ($option->isNegatable()) {
- $values[] = '--no-'.$option->getName();
- }
- }
- $output->writeln(implode("\n", $values));
- }
-}
diff --git a/vendor/symfony/console/Completion/Output/CompletionOutputInterface.php b/vendor/symfony/console/Completion/Output/CompletionOutputInterface.php
deleted file mode 100644
index 659e59655..000000000
--- a/vendor/symfony/console/Completion/Output/CompletionOutputInterface.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Completion\Output;
-
-use Symfony\Component\Console\Completion\CompletionSuggestions;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * Transforms the {@see CompletionSuggestions} object into output readable by the shell completion.
- *
- * @author Wouter de Jong
- */
-interface CompletionOutputInterface
-{
- public function write(CompletionSuggestions $suggestions, OutputInterface $output): void;
-}
diff --git a/vendor/symfony/console/Completion/Suggestion.php b/vendor/symfony/console/Completion/Suggestion.php
deleted file mode 100644
index 6c7bc4dc4..000000000
--- a/vendor/symfony/console/Completion/Suggestion.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Completion;
-
-/**
- * Represents a single suggested value.
- *
- * @author Wouter de Jong
- */
-class Suggestion
-{
- private $value;
-
- public function __construct(string $value)
- {
- $this->value = $value;
- }
-
- public function getValue(): string
- {
- return $this->value;
- }
-
- public function __toString(): string
- {
- return $this->getValue();
- }
-}
diff --git a/vendor/symfony/console/ConsoleEvents.php b/vendor/symfony/console/ConsoleEvents.php
deleted file mode 100644
index 6ae8f32b8..000000000
--- a/vendor/symfony/console/ConsoleEvents.php
+++ /dev/null
@@ -1,72 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console;
-
-use Symfony\Component\Console\Event\ConsoleCommandEvent;
-use Symfony\Component\Console\Event\ConsoleErrorEvent;
-use Symfony\Component\Console\Event\ConsoleSignalEvent;
-use Symfony\Component\Console\Event\ConsoleTerminateEvent;
-
-/**
- * Contains all events dispatched by an Application.
- *
- * @author Francesco Levorato
- */
-final class ConsoleEvents
-{
- /**
- * The COMMAND event allows you to attach listeners before any command is
- * executed by the console. It also allows you to modify the command, input and output
- * before they are handed to the command.
- *
- * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent")
- */
- public const COMMAND = 'console.command';
-
- /**
- * The SIGNAL event allows you to perform some actions
- * after the command execution was interrupted.
- *
- * @Event("Symfony\Component\Console\Event\ConsoleSignalEvent")
- */
- public const SIGNAL = 'console.signal';
-
- /**
- * The TERMINATE event allows you to attach listeners after a command is
- * executed by the console.
- *
- * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent")
- */
- public const TERMINATE = 'console.terminate';
-
- /**
- * The ERROR event occurs when an uncaught exception or error appears.
- *
- * This event allows you to deal with the exception/error or
- * to modify the thrown exception.
- *
- * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent")
- */
- public const ERROR = 'console.error';
-
- /**
- * Event aliases.
- *
- * These aliases can be consumed by RegisterListenersPass.
- */
- public const ALIASES = [
- ConsoleCommandEvent::class => self::COMMAND,
- ConsoleErrorEvent::class => self::ERROR,
- ConsoleSignalEvent::class => self::SIGNAL,
- ConsoleTerminateEvent::class => self::TERMINATE,
- ];
-}
diff --git a/vendor/symfony/console/Cursor.php b/vendor/symfony/console/Cursor.php
deleted file mode 100644
index 0c4dafb6c..000000000
--- a/vendor/symfony/console/Cursor.php
+++ /dev/null
@@ -1,207 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console;
-
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * @author Pierre du Plessis
- */
-final class Cursor
-{
- private $output;
- private $input;
-
- /**
- * @param resource|null $input
- */
- public function __construct(OutputInterface $output, $input = null)
- {
- $this->output = $output;
- $this->input = $input ?? (\defined('STDIN') ? \STDIN : fopen('php://input', 'r+'));
- }
-
- /**
- * @return $this
- */
- public function moveUp(int $lines = 1): self
- {
- $this->output->write(sprintf("\x1b[%dA", $lines));
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function moveDown(int $lines = 1): self
- {
- $this->output->write(sprintf("\x1b[%dB", $lines));
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function moveRight(int $columns = 1): self
- {
- $this->output->write(sprintf("\x1b[%dC", $columns));
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function moveLeft(int $columns = 1): self
- {
- $this->output->write(sprintf("\x1b[%dD", $columns));
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function moveToColumn(int $column): self
- {
- $this->output->write(sprintf("\x1b[%dG", $column));
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function moveToPosition(int $column, int $row): self
- {
- $this->output->write(sprintf("\x1b[%d;%dH", $row + 1, $column));
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function savePosition(): self
- {
- $this->output->write("\x1b7");
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function restorePosition(): self
- {
- $this->output->write("\x1b8");
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function hide(): self
- {
- $this->output->write("\x1b[?25l");
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function show(): self
- {
- $this->output->write("\x1b[?25h\x1b[?0c");
-
- return $this;
- }
-
- /**
- * Clears all the output from the current line.
- *
- * @return $this
- */
- public function clearLine(): self
- {
- $this->output->write("\x1b[2K");
-
- return $this;
- }
-
- /**
- * Clears all the output from the current line after the current position.
- */
- public function clearLineAfter(): self
- {
- $this->output->write("\x1b[K");
-
- return $this;
- }
-
- /**
- * Clears all the output from the cursors' current position to the end of the screen.
- *
- * @return $this
- */
- public function clearOutput(): self
- {
- $this->output->write("\x1b[0J");
-
- return $this;
- }
-
- /**
- * Clears the entire screen.
- *
- * @return $this
- */
- public function clearScreen(): self
- {
- $this->output->write("\x1b[2J");
-
- return $this;
- }
-
- /**
- * Returns the current cursor position as x,y coordinates.
- */
- public function getCurrentPosition(): array
- {
- static $isTtySupported;
-
- if (null === $isTtySupported && \function_exists('proc_open')) {
- $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes);
- }
-
- if (!$isTtySupported) {
- return [1, 1];
- }
-
- $sttyMode = shell_exec('stty -g');
- shell_exec('stty -icanon -echo');
-
- @fwrite($this->input, "\033[6n");
-
- $code = trim(fread($this->input, 1024));
-
- shell_exec(sprintf('stty %s', $sttyMode));
-
- sscanf($code, "\033[%d;%dR", $row, $col);
-
- return [$col, $row];
- }
-}
diff --git a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php
deleted file mode 100644
index 1fbb212e7..000000000
--- a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php
+++ /dev/null
@@ -1,148 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\DependencyInjection;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Command\LazyCommand;
-use Symfony\Component\Console\CommandLoader\ContainerCommandLoader;
-use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
-use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
-use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
-use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\DependencyInjection\TypedReference;
-
-/**
- * Registers console commands.
- *
- * @author Grégoire Pineau
- */
-class AddConsoleCommandPass implements CompilerPassInterface
-{
- private $commandLoaderServiceId;
- private $commandTag;
- private $noPreloadTag;
- private $privateTagName;
-
- public function __construct(string $commandLoaderServiceId = 'console.command_loader', string $commandTag = 'console.command', string $noPreloadTag = 'container.no_preload', string $privateTagName = 'container.private')
- {
- if (0 < \func_num_args()) {
- trigger_deprecation('symfony/console', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
- }
-
- $this->commandLoaderServiceId = $commandLoaderServiceId;
- $this->commandTag = $commandTag;
- $this->noPreloadTag = $noPreloadTag;
- $this->privateTagName = $privateTagName;
- }
-
- public function process(ContainerBuilder $container)
- {
- $commandServices = $container->findTaggedServiceIds($this->commandTag, true);
- $lazyCommandMap = [];
- $lazyCommandRefs = [];
- $serviceIds = [];
-
- foreach ($commandServices as $id => $tags) {
- $definition = $container->getDefinition($id);
- $definition->addTag($this->noPreloadTag);
- $class = $container->getParameterBag()->resolveValue($definition->getClass());
-
- if (isset($tags[0]['command'])) {
- $aliases = $tags[0]['command'];
- } else {
- if (!$r = $container->getReflectionClass($class)) {
- throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
- }
- if (!$r->isSubclassOf(Command::class)) {
- throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class));
- }
- $aliases = str_replace('%', '%%', $class::getDefaultName() ?? '');
- }
-
- $aliases = explode('|', $aliases ?? '');
- $commandName = array_shift($aliases);
-
- if ($isHidden = '' === $commandName) {
- $commandName = array_shift($aliases);
- }
-
- if (null === $commandName) {
- if (!$definition->isPublic() || $definition->isPrivate() || $definition->hasTag($this->privateTagName)) {
- $commandId = 'console.command.public_alias.'.$id;
- $container->setAlias($commandId, $id)->setPublic(true);
- $id = $commandId;
- }
- $serviceIds[] = $id;
-
- continue;
- }
-
- $description = $tags[0]['description'] ?? null;
-
- unset($tags[0]);
- $lazyCommandMap[$commandName] = $id;
- $lazyCommandRefs[$id] = new TypedReference($id, $class);
-
- foreach ($aliases as $alias) {
- $lazyCommandMap[$alias] = $id;
- }
-
- foreach ($tags as $tag) {
- if (isset($tag['command'])) {
- $aliases[] = $tag['command'];
- $lazyCommandMap[$tag['command']] = $id;
- }
-
- $description = $description ?? $tag['description'] ?? null;
- }
-
- $definition->addMethodCall('setName', [$commandName]);
-
- if ($aliases) {
- $definition->addMethodCall('setAliases', [$aliases]);
- }
-
- if ($isHidden) {
- $definition->addMethodCall('setHidden', [true]);
- }
-
- if (!$description) {
- if (!$r = $container->getReflectionClass($class)) {
- throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
- }
- if (!$r->isSubclassOf(Command::class)) {
- throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class));
- }
- $description = str_replace('%', '%%', $class::getDefaultDescription() ?? '');
- }
-
- if ($description) {
- $definition->addMethodCall('setDescription', [$description]);
-
- $container->register('.'.$id.'.lazy', LazyCommand::class)
- ->setArguments([$commandName, $aliases, $description, $isHidden, new ServiceClosureArgument($lazyCommandRefs[$id])]);
-
- $lazyCommandRefs[$id] = new Reference('.'.$id.'.lazy');
- }
- }
-
- $container
- ->register($this->commandLoaderServiceId, ContainerCommandLoader::class)
- ->setPublic(true)
- ->addTag($this->noPreloadTag)
- ->setArguments([ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap]);
-
- $container->setParameter('console.command.ids', $serviceIds);
- }
-}
diff --git a/vendor/symfony/console/Descriptor/ApplicationDescription.php b/vendor/symfony/console/Descriptor/ApplicationDescription.php
deleted file mode 100644
index 2a3acc99b..000000000
--- a/vendor/symfony/console/Descriptor/ApplicationDescription.php
+++ /dev/null
@@ -1,143 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Descriptor;
-
-use Symfony\Component\Console\Application;
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Exception\CommandNotFoundException;
-
-/**
- * @author Jean-François Simon
- *
- * @internal
- */
-class ApplicationDescription
-{
- public const GLOBAL_NAMESPACE = '_global';
-
- private $application;
- private $namespace;
- private $showHidden;
-
- /**
- * @var array
- */
- private $namespaces;
-
- /**
- * @var array
- */
- private $commands;
-
- /**
- * @var array
- */
- private $aliases;
-
- public function __construct(Application $application, string $namespace = null, bool $showHidden = false)
- {
- $this->application = $application;
- $this->namespace = $namespace;
- $this->showHidden = $showHidden;
- }
-
- public function getNamespaces(): array
- {
- if (null === $this->namespaces) {
- $this->inspectApplication();
- }
-
- return $this->namespaces;
- }
-
- /**
- * @return Command[]
- */
- public function getCommands(): array
- {
- if (null === $this->commands) {
- $this->inspectApplication();
- }
-
- return $this->commands;
- }
-
- /**
- * @throws CommandNotFoundException
- */
- public function getCommand(string $name): Command
- {
- if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) {
- throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
- }
-
- return $this->commands[$name] ?? $this->aliases[$name];
- }
-
- private function inspectApplication()
- {
- $this->commands = [];
- $this->namespaces = [];
-
- $all = $this->application->all($this->namespace ? $this->application->findNamespace($this->namespace) : null);
- foreach ($this->sortCommands($all) as $namespace => $commands) {
- $names = [];
-
- /** @var Command $command */
- foreach ($commands as $name => $command) {
- if (!$command->getName() || (!$this->showHidden && $command->isHidden())) {
- continue;
- }
-
- if ($command->getName() === $name) {
- $this->commands[$name] = $command;
- } else {
- $this->aliases[$name] = $command;
- }
-
- $names[] = $name;
- }
-
- $this->namespaces[$namespace] = ['id' => $namespace, 'commands' => $names];
- }
- }
-
- private function sortCommands(array $commands): array
- {
- $namespacedCommands = [];
- $globalCommands = [];
- $sortedCommands = [];
- foreach ($commands as $name => $command) {
- $key = $this->application->extractNamespace($name, 1);
- if (\in_array($key, ['', self::GLOBAL_NAMESPACE], true)) {
- $globalCommands[$name] = $command;
- } else {
- $namespacedCommands[$key][$name] = $command;
- }
- }
-
- if ($globalCommands) {
- ksort($globalCommands);
- $sortedCommands[self::GLOBAL_NAMESPACE] = $globalCommands;
- }
-
- if ($namespacedCommands) {
- ksort($namespacedCommands, \SORT_STRING);
- foreach ($namespacedCommands as $key => $commandsSet) {
- ksort($commandsSet);
- $sortedCommands[$key] = $commandsSet;
- }
- }
-
- return $sortedCommands;
- }
-}
diff --git a/vendor/symfony/console/Descriptor/Descriptor.php b/vendor/symfony/console/Descriptor/Descriptor.php
deleted file mode 100644
index a3648301f..000000000
--- a/vendor/symfony/console/Descriptor/Descriptor.php
+++ /dev/null
@@ -1,94 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Descriptor;
-
-use Symfony\Component\Console\Application;
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputDefinition;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * @author Jean-François Simon
- *
- * @internal
- */
-abstract class Descriptor implements DescriptorInterface
-{
- /**
- * @var OutputInterface
- */
- protected $output;
-
- /**
- * {@inheritdoc}
- */
- public function describe(OutputInterface $output, object $object, array $options = [])
- {
- $this->output = $output;
-
- switch (true) {
- case $object instanceof InputArgument:
- $this->describeInputArgument($object, $options);
- break;
- case $object instanceof InputOption:
- $this->describeInputOption($object, $options);
- break;
- case $object instanceof InputDefinition:
- $this->describeInputDefinition($object, $options);
- break;
- case $object instanceof Command:
- $this->describeCommand($object, $options);
- break;
- case $object instanceof Application:
- $this->describeApplication($object, $options);
- break;
- default:
- throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_debug_type($object)));
- }
- }
-
- /**
- * Writes content to output.
- */
- protected function write(string $content, bool $decorated = false)
- {
- $this->output->write($content, false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW);
- }
-
- /**
- * Describes an InputArgument instance.
- */
- abstract protected function describeInputArgument(InputArgument $argument, array $options = []);
-
- /**
- * Describes an InputOption instance.
- */
- abstract protected function describeInputOption(InputOption $option, array $options = []);
-
- /**
- * Describes an InputDefinition instance.
- */
- abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []);
-
- /**
- * Describes a Command instance.
- */
- abstract protected function describeCommand(Command $command, array $options = []);
-
- /**
- * Describes an Application instance.
- */
- abstract protected function describeApplication(Application $application, array $options = []);
-}
diff --git a/vendor/symfony/console/Descriptor/DescriptorInterface.php b/vendor/symfony/console/Descriptor/DescriptorInterface.php
deleted file mode 100644
index ebea30367..000000000
--- a/vendor/symfony/console/Descriptor/DescriptorInterface.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Descriptor;
-
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * Descriptor interface.
- *
- * @author Jean-François Simon
- */
-interface DescriptorInterface
-{
- public function describe(OutputInterface $output, object $object, array $options = []);
-}
diff --git a/vendor/symfony/console/Descriptor/JsonDescriptor.php b/vendor/symfony/console/Descriptor/JsonDescriptor.php
deleted file mode 100644
index 1d2865941..000000000
--- a/vendor/symfony/console/Descriptor/JsonDescriptor.php
+++ /dev/null
@@ -1,181 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Descriptor;
-
-use Symfony\Component\Console\Application;
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputDefinition;
-use Symfony\Component\Console\Input\InputOption;
-
-/**
- * JSON descriptor.
- *
- * @author Jean-François Simon
- *
- * @internal
- */
-class JsonDescriptor extends Descriptor
-{
- /**
- * {@inheritdoc}
- */
- protected function describeInputArgument(InputArgument $argument, array $options = [])
- {
- $this->writeData($this->getInputArgumentData($argument), $options);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeInputOption(InputOption $option, array $options = [])
- {
- $this->writeData($this->getInputOptionData($option), $options);
- if ($option->isNegatable()) {
- $this->writeData($this->getInputOptionData($option, true), $options);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeInputDefinition(InputDefinition $definition, array $options = [])
- {
- $this->writeData($this->getInputDefinitionData($definition), $options);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeCommand(Command $command, array $options = [])
- {
- $this->writeData($this->getCommandData($command, $options['short'] ?? false), $options);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeApplication(Application $application, array $options = [])
- {
- $describedNamespace = $options['namespace'] ?? null;
- $description = new ApplicationDescription($application, $describedNamespace, true);
- $commands = [];
-
- foreach ($description->getCommands() as $command) {
- $commands[] = $this->getCommandData($command, $options['short'] ?? false);
- }
-
- $data = [];
- if ('UNKNOWN' !== $application->getName()) {
- $data['application']['name'] = $application->getName();
- if ('UNKNOWN' !== $application->getVersion()) {
- $data['application']['version'] = $application->getVersion();
- }
- }
-
- $data['commands'] = $commands;
-
- if ($describedNamespace) {
- $data['namespace'] = $describedNamespace;
- } else {
- $data['namespaces'] = array_values($description->getNamespaces());
- }
-
- $this->writeData($data, $options);
- }
-
- /**
- * Writes data as json.
- */
- private function writeData(array $data, array $options)
- {
- $flags = $options['json_encoding'] ?? 0;
-
- $this->write(json_encode($data, $flags));
- }
-
- private function getInputArgumentData(InputArgument $argument): array
- {
- return [
- 'name' => $argument->getName(),
- 'is_required' => $argument->isRequired(),
- 'is_array' => $argument->isArray(),
- 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $argument->getDescription()),
- 'default' => \INF === $argument->getDefault() ? 'INF' : $argument->getDefault(),
- ];
- }
-
- private function getInputOptionData(InputOption $option, bool $negated = false): array
- {
- return $negated ? [
- 'name' => '--no-'.$option->getName(),
- 'shortcut' => '',
- 'accept_value' => false,
- 'is_value_required' => false,
- 'is_multiple' => false,
- 'description' => 'Negate the "--'.$option->getName().'" option',
- 'default' => false,
- ] : [
- 'name' => '--'.$option->getName(),
- 'shortcut' => $option->getShortcut() ? '-'.str_replace('|', '|-', $option->getShortcut()) : '',
- 'accept_value' => $option->acceptValue(),
- 'is_value_required' => $option->isValueRequired(),
- 'is_multiple' => $option->isArray(),
- 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $option->getDescription()),
- 'default' => \INF === $option->getDefault() ? 'INF' : $option->getDefault(),
- ];
- }
-
- private function getInputDefinitionData(InputDefinition $definition): array
- {
- $inputArguments = [];
- foreach ($definition->getArguments() as $name => $argument) {
- $inputArguments[$name] = $this->getInputArgumentData($argument);
- }
-
- $inputOptions = [];
- foreach ($definition->getOptions() as $name => $option) {
- $inputOptions[$name] = $this->getInputOptionData($option);
- if ($option->isNegatable()) {
- $inputOptions['no-'.$name] = $this->getInputOptionData($option, true);
- }
- }
-
- return ['arguments' => $inputArguments, 'options' => $inputOptions];
- }
-
- private function getCommandData(Command $command, bool $short = false): array
- {
- $data = [
- 'name' => $command->getName(),
- 'description' => $command->getDescription(),
- ];
-
- if ($short) {
- $data += [
- 'usage' => $command->getAliases(),
- ];
- } else {
- $command->mergeApplicationDefinition(false);
-
- $data += [
- 'usage' => array_merge([$command->getSynopsis()], $command->getUsages(), $command->getAliases()),
- 'help' => $command->getProcessedHelp(),
- 'definition' => $this->getInputDefinitionData($command->getDefinition()),
- ];
- }
-
- $data['hidden'] = $command->isHidden();
-
- return $data;
- }
-}
diff --git a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php b/vendor/symfony/console/Descriptor/MarkdownDescriptor.php
deleted file mode 100644
index 21ceca6c2..000000000
--- a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php
+++ /dev/null
@@ -1,206 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Descriptor;
-
-use Symfony\Component\Console\Application;
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Helper\Helper;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputDefinition;
-use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * Markdown descriptor.
- *
- * @author Jean-François Simon
- *
- * @internal
- */
-class MarkdownDescriptor extends Descriptor
-{
- /**
- * {@inheritdoc}
- */
- public function describe(OutputInterface $output, object $object, array $options = [])
- {
- $decorated = $output->isDecorated();
- $output->setDecorated(false);
-
- parent::describe($output, $object, $options);
-
- $output->setDecorated($decorated);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function write(string $content, bool $decorated = true)
- {
- parent::write($content, $decorated);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeInputArgument(InputArgument $argument, array $options = [])
- {
- $this->write(
- '#### `'.($argument->getName() ?: '')."`\n\n"
- .($argument->getDescription() ? preg_replace('/\s*[\r\n]\s*/', "\n", $argument->getDescription())."\n\n" : '')
- .'* Is required: '.($argument->isRequired() ? 'yes' : 'no')."\n"
- .'* Is array: '.($argument->isArray() ? 'yes' : 'no')."\n"
- .'* Default: `'.str_replace("\n", '', var_export($argument->getDefault(), true)).'`'
- );
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeInputOption(InputOption $option, array $options = [])
- {
- $name = '--'.$option->getName();
- if ($option->isNegatable()) {
- $name .= '|--no-'.$option->getName();
- }
- if ($option->getShortcut()) {
- $name .= '|-'.str_replace('|', '|-', $option->getShortcut()).'';
- }
-
- $this->write(
- '#### `'.$name.'`'."\n\n"
- .($option->getDescription() ? preg_replace('/\s*[\r\n]\s*/', "\n", $option->getDescription())."\n\n" : '')
- .'* Accept value: '.($option->acceptValue() ? 'yes' : 'no')."\n"
- .'* Is value required: '.($option->isValueRequired() ? 'yes' : 'no')."\n"
- .'* Is multiple: '.($option->isArray() ? 'yes' : 'no')."\n"
- .'* Is negatable: '.($option->isNegatable() ? 'yes' : 'no')."\n"
- .'* Default: `'.str_replace("\n", '', var_export($option->getDefault(), true)).'`'
- );
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeInputDefinition(InputDefinition $definition, array $options = [])
- {
- if ($showArguments = \count($definition->getArguments()) > 0) {
- $this->write('### Arguments');
- foreach ($definition->getArguments() as $argument) {
- $this->write("\n\n");
- if (null !== $describeInputArgument = $this->describeInputArgument($argument)) {
- $this->write($describeInputArgument);
- }
- }
- }
-
- if (\count($definition->getOptions()) > 0) {
- if ($showArguments) {
- $this->write("\n\n");
- }
-
- $this->write('### Options');
- foreach ($definition->getOptions() as $option) {
- $this->write("\n\n");
- if (null !== $describeInputOption = $this->describeInputOption($option)) {
- $this->write($describeInputOption);
- }
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeCommand(Command $command, array $options = [])
- {
- if ($options['short'] ?? false) {
- $this->write(
- '`'.$command->getName()."`\n"
- .str_repeat('-', Helper::width($command->getName()) + 2)."\n\n"
- .($command->getDescription() ? $command->getDescription()."\n\n" : '')
- .'### Usage'."\n\n"
- .array_reduce($command->getAliases(), function ($carry, $usage) {
- return $carry.'* `'.$usage.'`'."\n";
- })
- );
-
- return;
- }
-
- $command->mergeApplicationDefinition(false);
-
- $this->write(
- '`'.$command->getName()."`\n"
- .str_repeat('-', Helper::width($command->getName()) + 2)."\n\n"
- .($command->getDescription() ? $command->getDescription()."\n\n" : '')
- .'### Usage'."\n\n"
- .array_reduce(array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()), function ($carry, $usage) {
- return $carry.'* `'.$usage.'`'."\n";
- })
- );
-
- if ($help = $command->getProcessedHelp()) {
- $this->write("\n");
- $this->write($help);
- }
-
- $definition = $command->getDefinition();
- if ($definition->getOptions() || $definition->getArguments()) {
- $this->write("\n\n");
- $this->describeInputDefinition($definition);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeApplication(Application $application, array $options = [])
- {
- $describedNamespace = $options['namespace'] ?? null;
- $description = new ApplicationDescription($application, $describedNamespace);
- $title = $this->getApplicationTitle($application);
-
- $this->write($title."\n".str_repeat('=', Helper::width($title)));
-
- foreach ($description->getNamespaces() as $namespace) {
- if (ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) {
- $this->write("\n\n");
- $this->write('**'.$namespace['id'].':**');
- }
-
- $this->write("\n\n");
- $this->write(implode("\n", array_map(function ($commandName) use ($description) {
- return sprintf('* [`%s`](#%s)', $commandName, str_replace(':', '', $description->getCommand($commandName)->getName()));
- }, $namespace['commands'])));
- }
-
- foreach ($description->getCommands() as $command) {
- $this->write("\n\n");
- if (null !== $describeCommand = $this->describeCommand($command, $options)) {
- $this->write($describeCommand);
- }
- }
- }
-
- private function getApplicationTitle(Application $application): string
- {
- if ('UNKNOWN' !== $application->getName()) {
- if ('UNKNOWN' !== $application->getVersion()) {
- return sprintf('%s %s', $application->getName(), $application->getVersion());
- }
-
- return $application->getName();
- }
-
- return 'Console Tool';
- }
-}
diff --git a/vendor/symfony/console/Descriptor/TextDescriptor.php b/vendor/symfony/console/Descriptor/TextDescriptor.php
deleted file mode 100644
index fbb140ae7..000000000
--- a/vendor/symfony/console/Descriptor/TextDescriptor.php
+++ /dev/null
@@ -1,341 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Descriptor;
-
-use Symfony\Component\Console\Application;
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Formatter\OutputFormatter;
-use Symfony\Component\Console\Helper\Helper;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputDefinition;
-use Symfony\Component\Console\Input\InputOption;
-
-/**
- * Text descriptor.
- *
- * @author Jean-François Simon
- *
- * @internal
- */
-class TextDescriptor extends Descriptor
-{
- /**
- * {@inheritdoc}
- */
- protected function describeInputArgument(InputArgument $argument, array $options = [])
- {
- if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) {
- $default = sprintf(' [default: %s]', $this->formatDefaultValue($argument->getDefault()));
- } else {
- $default = '';
- }
-
- $totalWidth = $options['total_width'] ?? Helper::width($argument->getName());
- $spacingWidth = $totalWidth - \strlen($argument->getName());
-
- $this->writeText(sprintf(' %s %s%s%s',
- $argument->getName(),
- str_repeat(' ', $spacingWidth),
- // + 4 = 2 spaces before , 2 spaces after
- preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $argument->getDescription()),
- $default
- ), $options);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeInputOption(InputOption $option, array $options = [])
- {
- if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) {
- $default = sprintf(' [default: %s]', $this->formatDefaultValue($option->getDefault()));
- } else {
- $default = '';
- }
-
- $value = '';
- if ($option->acceptValue()) {
- $value = '='.strtoupper($option->getName());
-
- if ($option->isValueOptional()) {
- $value = '['.$value.']';
- }
- }
-
- $totalWidth = $options['total_width'] ?? $this->calculateTotalWidthForOptions([$option]);
- $synopsis = sprintf('%s%s',
- $option->getShortcut() ? sprintf('-%s, ', $option->getShortcut()) : ' ',
- sprintf($option->isNegatable() ? '--%1$s|--no-%1$s' : '--%1$s%2$s', $option->getName(), $value)
- );
-
- $spacingWidth = $totalWidth - Helper::width($synopsis);
-
- $this->writeText(sprintf(' %s %s%s%s%s',
- $synopsis,
- str_repeat(' ', $spacingWidth),
- // + 4 = 2 spaces before , 2 spaces after
- preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $option->getDescription()),
- $default,
- $option->isArray() ? ' (multiple values allowed)' : ''
- ), $options);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeInputDefinition(InputDefinition $definition, array $options = [])
- {
- $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions());
- foreach ($definition->getArguments() as $argument) {
- $totalWidth = max($totalWidth, Helper::width($argument->getName()));
- }
-
- if ($definition->getArguments()) {
- $this->writeText('Arguments:', $options);
- $this->writeText("\n");
- foreach ($definition->getArguments() as $argument) {
- $this->describeInputArgument($argument, array_merge($options, ['total_width' => $totalWidth]));
- $this->writeText("\n");
- }
- }
-
- if ($definition->getArguments() && $definition->getOptions()) {
- $this->writeText("\n");
- }
-
- if ($definition->getOptions()) {
- $laterOptions = [];
-
- $this->writeText('Options:', $options);
- foreach ($definition->getOptions() as $option) {
- if (\strlen($option->getShortcut() ?? '') > 1) {
- $laterOptions[] = $option;
- continue;
- }
- $this->writeText("\n");
- $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth]));
- }
- foreach ($laterOptions as $option) {
- $this->writeText("\n");
- $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth]));
- }
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeCommand(Command $command, array $options = [])
- {
- $command->mergeApplicationDefinition(false);
-
- if ($description = $command->getDescription()) {
- $this->writeText('Description:', $options);
- $this->writeText("\n");
- $this->writeText(' '.$description);
- $this->writeText("\n\n");
- }
-
- $this->writeText('Usage:', $options);
- foreach (array_merge([$command->getSynopsis(true)], $command->getAliases(), $command->getUsages()) as $usage) {
- $this->writeText("\n");
- $this->writeText(' '.OutputFormatter::escape($usage), $options);
- }
- $this->writeText("\n");
-
- $definition = $command->getDefinition();
- if ($definition->getOptions() || $definition->getArguments()) {
- $this->writeText("\n");
- $this->describeInputDefinition($definition, $options);
- $this->writeText("\n");
- }
-
- $help = $command->getProcessedHelp();
- if ($help && $help !== $description) {
- $this->writeText("\n");
- $this->writeText('Help:', $options);
- $this->writeText("\n");
- $this->writeText(' '.str_replace("\n", "\n ", $help), $options);
- $this->writeText("\n");
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeApplication(Application $application, array $options = [])
- {
- $describedNamespace = $options['namespace'] ?? null;
- $description = new ApplicationDescription($application, $describedNamespace);
-
- if (isset($options['raw_text']) && $options['raw_text']) {
- $width = $this->getColumnWidth($description->getCommands());
-
- foreach ($description->getCommands() as $command) {
- $this->writeText(sprintf("%-{$width}s %s", $command->getName(), $command->getDescription()), $options);
- $this->writeText("\n");
- }
- } else {
- if ('' != $help = $application->getHelp()) {
- $this->writeText("$help\n\n", $options);
- }
-
- $this->writeText("Usage:\n", $options);
- $this->writeText(" command [options] [arguments]\n\n", $options);
-
- $this->describeInputDefinition(new InputDefinition($application->getDefinition()->getOptions()), $options);
-
- $this->writeText("\n");
- $this->writeText("\n");
-
- $commands = $description->getCommands();
- $namespaces = $description->getNamespaces();
- if ($describedNamespace && $namespaces) {
- // make sure all alias commands are included when describing a specific namespace
- $describedNamespaceInfo = reset($namespaces);
- foreach ($describedNamespaceInfo['commands'] as $name) {
- $commands[$name] = $description->getCommand($name);
- }
- }
-
- // calculate max. width based on available commands per namespace
- $width = $this->getColumnWidth(array_merge(...array_values(array_map(function ($namespace) use ($commands) {
- return array_intersect($namespace['commands'], array_keys($commands));
- }, array_values($namespaces)))));
-
- if ($describedNamespace) {
- $this->writeText(sprintf('Available commands for the "%s" namespace:', $describedNamespace), $options);
- } else {
- $this->writeText('Available commands:', $options);
- }
-
- foreach ($namespaces as $namespace) {
- $namespace['commands'] = array_filter($namespace['commands'], function ($name) use ($commands) {
- return isset($commands[$name]);
- });
-
- if (!$namespace['commands']) {
- continue;
- }
-
- if (!$describedNamespace && ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) {
- $this->writeText("\n");
- $this->writeText(' '.$namespace['id'].'', $options);
- }
-
- foreach ($namespace['commands'] as $name) {
- $this->writeText("\n");
- $spacingWidth = $width - Helper::width($name);
- $command = $commands[$name];
- $commandAliases = $name === $command->getName() ? $this->getCommandAliasesText($command) : '';
- $this->writeText(sprintf(' %s%s%s', $name, str_repeat(' ', $spacingWidth), $commandAliases.$command->getDescription()), $options);
- }
- }
-
- $this->writeText("\n");
- }
- }
-
- /**
- * {@inheritdoc}
- */
- private function writeText(string $content, array $options = [])
- {
- $this->write(
- isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content,
- isset($options['raw_output']) ? !$options['raw_output'] : true
- );
- }
-
- /**
- * Formats command aliases to show them in the command description.
- */
- private function getCommandAliasesText(Command $command): string
- {
- $text = '';
- $aliases = $command->getAliases();
-
- if ($aliases) {
- $text = '['.implode('|', $aliases).'] ';
- }
-
- return $text;
- }
-
- /**
- * Formats input option/argument default value.
- *
- * @param mixed $default
- */
- private function formatDefaultValue($default): string
- {
- if (\INF === $default) {
- return 'INF';
- }
-
- if (\is_string($default)) {
- $default = OutputFormatter::escape($default);
- } elseif (\is_array($default)) {
- foreach ($default as $key => $value) {
- if (\is_string($value)) {
- $default[$key] = OutputFormatter::escape($value);
- }
- }
- }
-
- return str_replace('\\\\', '\\', json_encode($default, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE));
- }
-
- /**
- * @param array $commands
- */
- private function getColumnWidth(array $commands): int
- {
- $widths = [];
-
- foreach ($commands as $command) {
- if ($command instanceof Command) {
- $widths[] = Helper::width($command->getName());
- foreach ($command->getAliases() as $alias) {
- $widths[] = Helper::width($alias);
- }
- } else {
- $widths[] = Helper::width($command);
- }
- }
-
- return $widths ? max($widths) + 2 : 0;
- }
-
- /**
- * @param InputOption[] $options
- */
- private function calculateTotalWidthForOptions(array $options): int
- {
- $totalWidth = 0;
- foreach ($options as $option) {
- // "-" + shortcut + ", --" + name
- $nameLength = 1 + max(Helper::width($option->getShortcut()), 1) + 4 + Helper::width($option->getName());
- if ($option->isNegatable()) {
- $nameLength += 6 + Helper::width($option->getName()); // |--no- + name
- } elseif ($option->acceptValue()) {
- $valueLength = 1 + Helper::width($option->getName()); // = + value
- $valueLength += $option->isValueOptional() ? 2 : 0; // [ + ]
-
- $nameLength += $valueLength;
- }
- $totalWidth = max($totalWidth, $nameLength);
- }
-
- return $totalWidth;
- }
-}
diff --git a/vendor/symfony/console/Descriptor/XmlDescriptor.php b/vendor/symfony/console/Descriptor/XmlDescriptor.php
deleted file mode 100644
index 4f7cd8b3e..000000000
--- a/vendor/symfony/console/Descriptor/XmlDescriptor.php
+++ /dev/null
@@ -1,247 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Descriptor;
-
-use Symfony\Component\Console\Application;
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputDefinition;
-use Symfony\Component\Console\Input\InputOption;
-
-/**
- * XML descriptor.
- *
- * @author Jean-François Simon
- *
- * @internal
- */
-class XmlDescriptor extends Descriptor
-{
- public function getInputDefinitionDocument(InputDefinition $definition): \DOMDocument
- {
- $dom = new \DOMDocument('1.0', 'UTF-8');
- $dom->appendChild($definitionXML = $dom->createElement('definition'));
-
- $definitionXML->appendChild($argumentsXML = $dom->createElement('arguments'));
- foreach ($definition->getArguments() as $argument) {
- $this->appendDocument($argumentsXML, $this->getInputArgumentDocument($argument));
- }
-
- $definitionXML->appendChild($optionsXML = $dom->createElement('options'));
- foreach ($definition->getOptions() as $option) {
- $this->appendDocument($optionsXML, $this->getInputOptionDocument($option));
- }
-
- return $dom;
- }
-
- public function getCommandDocument(Command $command, bool $short = false): \DOMDocument
- {
- $dom = new \DOMDocument('1.0', 'UTF-8');
- $dom->appendChild($commandXML = $dom->createElement('command'));
-
- $commandXML->setAttribute('id', $command->getName());
- $commandXML->setAttribute('name', $command->getName());
- $commandXML->setAttribute('hidden', $command->isHidden() ? 1 : 0);
-
- $commandXML->appendChild($usagesXML = $dom->createElement('usages'));
-
- $commandXML->appendChild($descriptionXML = $dom->createElement('description'));
- $descriptionXML->appendChild($dom->createTextNode(str_replace("\n", "\n ", $command->getDescription())));
-
- if ($short) {
- foreach ($command->getAliases() as $usage) {
- $usagesXML->appendChild($dom->createElement('usage', $usage));
- }
- } else {
- $command->mergeApplicationDefinition(false);
-
- foreach (array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()) as $usage) {
- $usagesXML->appendChild($dom->createElement('usage', $usage));
- }
-
- $commandXML->appendChild($helpXML = $dom->createElement('help'));
- $helpXML->appendChild($dom->createTextNode(str_replace("\n", "\n ", $command->getProcessedHelp())));
-
- $definitionXML = $this->getInputDefinitionDocument($command->getDefinition());
- $this->appendDocument($commandXML, $definitionXML->getElementsByTagName('definition')->item(0));
- }
-
- return $dom;
- }
-
- public function getApplicationDocument(Application $application, string $namespace = null, bool $short = false): \DOMDocument
- {
- $dom = new \DOMDocument('1.0', 'UTF-8');
- $dom->appendChild($rootXml = $dom->createElement('symfony'));
-
- if ('UNKNOWN' !== $application->getName()) {
- $rootXml->setAttribute('name', $application->getName());
- if ('UNKNOWN' !== $application->getVersion()) {
- $rootXml->setAttribute('version', $application->getVersion());
- }
- }
-
- $rootXml->appendChild($commandsXML = $dom->createElement('commands'));
-
- $description = new ApplicationDescription($application, $namespace, true);
-
- if ($namespace) {
- $commandsXML->setAttribute('namespace', $namespace);
- }
-
- foreach ($description->getCommands() as $command) {
- $this->appendDocument($commandsXML, $this->getCommandDocument($command, $short));
- }
-
- if (!$namespace) {
- $rootXml->appendChild($namespacesXML = $dom->createElement('namespaces'));
-
- foreach ($description->getNamespaces() as $namespaceDescription) {
- $namespacesXML->appendChild($namespaceArrayXML = $dom->createElement('namespace'));
- $namespaceArrayXML->setAttribute('id', $namespaceDescription['id']);
-
- foreach ($namespaceDescription['commands'] as $name) {
- $namespaceArrayXML->appendChild($commandXML = $dom->createElement('command'));
- $commandXML->appendChild($dom->createTextNode($name));
- }
- }
- }
-
- return $dom;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeInputArgument(InputArgument $argument, array $options = [])
- {
- $this->writeDocument($this->getInputArgumentDocument($argument));
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeInputOption(InputOption $option, array $options = [])
- {
- $this->writeDocument($this->getInputOptionDocument($option));
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeInputDefinition(InputDefinition $definition, array $options = [])
- {
- $this->writeDocument($this->getInputDefinitionDocument($definition));
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeCommand(Command $command, array $options = [])
- {
- $this->writeDocument($this->getCommandDocument($command, $options['short'] ?? false));
- }
-
- /**
- * {@inheritdoc}
- */
- protected function describeApplication(Application $application, array $options = [])
- {
- $this->writeDocument($this->getApplicationDocument($application, $options['namespace'] ?? null, $options['short'] ?? false));
- }
-
- /**
- * Appends document children to parent node.
- */
- private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent)
- {
- foreach ($importedParent->childNodes as $childNode) {
- $parentNode->appendChild($parentNode->ownerDocument->importNode($childNode, true));
- }
- }
-
- /**
- * Writes DOM document.
- */
- private function writeDocument(\DOMDocument $dom)
- {
- $dom->formatOutput = true;
- $this->write($dom->saveXML());
- }
-
- private function getInputArgumentDocument(InputArgument $argument): \DOMDocument
- {
- $dom = new \DOMDocument('1.0', 'UTF-8');
-
- $dom->appendChild($objectXML = $dom->createElement('argument'));
- $objectXML->setAttribute('name', $argument->getName());
- $objectXML->setAttribute('is_required', $argument->isRequired() ? 1 : 0);
- $objectXML->setAttribute('is_array', $argument->isArray() ? 1 : 0);
- $objectXML->appendChild($descriptionXML = $dom->createElement('description'));
- $descriptionXML->appendChild($dom->createTextNode($argument->getDescription()));
-
- $objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
- $defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? [var_export($argument->getDefault(), true)] : ($argument->getDefault() ? [$argument->getDefault()] : []));
- foreach ($defaults as $default) {
- $defaultsXML->appendChild($defaultXML = $dom->createElement('default'));
- $defaultXML->appendChild($dom->createTextNode($default));
- }
-
- return $dom;
- }
-
- private function getInputOptionDocument(InputOption $option): \DOMDocument
- {
- $dom = new \DOMDocument('1.0', 'UTF-8');
-
- $dom->appendChild($objectXML = $dom->createElement('option'));
- $objectXML->setAttribute('name', '--'.$option->getName());
- $pos = strpos($option->getShortcut() ?? '', '|');
- if (false !== $pos) {
- $objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos));
- $objectXML->setAttribute('shortcuts', '-'.str_replace('|', '|-', $option->getShortcut()));
- } else {
- $objectXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : '');
- }
- $objectXML->setAttribute('accept_value', $option->acceptValue() ? 1 : 0);
- $objectXML->setAttribute('is_value_required', $option->isValueRequired() ? 1 : 0);
- $objectXML->setAttribute('is_multiple', $option->isArray() ? 1 : 0);
- $objectXML->appendChild($descriptionXML = $dom->createElement('description'));
- $descriptionXML->appendChild($dom->createTextNode($option->getDescription()));
-
- if ($option->acceptValue()) {
- $defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? [var_export($option->getDefault(), true)] : ($option->getDefault() ? [$option->getDefault()] : []));
- $objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
-
- if (!empty($defaults)) {
- foreach ($defaults as $default) {
- $defaultsXML->appendChild($defaultXML = $dom->createElement('default'));
- $defaultXML->appendChild($dom->createTextNode($default));
- }
- }
- }
-
- if ($option->isNegatable()) {
- $dom->appendChild($objectXML = $dom->createElement('option'));
- $objectXML->setAttribute('name', '--no-'.$option->getName());
- $objectXML->setAttribute('shortcut', '');
- $objectXML->setAttribute('accept_value', 0);
- $objectXML->setAttribute('is_value_required', 0);
- $objectXML->setAttribute('is_multiple', 0);
- $objectXML->appendChild($descriptionXML = $dom->createElement('description'));
- $descriptionXML->appendChild($dom->createTextNode('Negate the "--'.$option->getName().'" option'));
- }
-
- return $dom;
- }
-}
diff --git a/vendor/symfony/console/Event/ConsoleCommandEvent.php b/vendor/symfony/console/Event/ConsoleCommandEvent.php
deleted file mode 100644
index 08bd18fd1..000000000
--- a/vendor/symfony/console/Event/ConsoleCommandEvent.php
+++ /dev/null
@@ -1,51 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Event;
-
-/**
- * Allows to do things before the command is executed, like skipping the command or changing the input.
- *
- * @author Fabien Potencier
- */
-final class ConsoleCommandEvent extends ConsoleEvent
-{
- /**
- * The return code for skipped commands, this will also be passed into the terminate event.
- */
- public const RETURN_CODE_DISABLED = 113;
-
- /**
- * Indicates if the command should be run or skipped.
- */
- private $commandShouldRun = true;
-
- /**
- * Disables the command, so it won't be run.
- */
- public function disableCommand(): bool
- {
- return $this->commandShouldRun = false;
- }
-
- public function enableCommand(): bool
- {
- return $this->commandShouldRun = true;
- }
-
- /**
- * Returns true if the command is runnable, false otherwise.
- */
- public function commandShouldRun(): bool
- {
- return $this->commandShouldRun;
- }
-}
diff --git a/vendor/symfony/console/Event/ConsoleErrorEvent.php b/vendor/symfony/console/Event/ConsoleErrorEvent.php
deleted file mode 100644
index 57d9b38ba..000000000
--- a/vendor/symfony/console/Event/ConsoleErrorEvent.php
+++ /dev/null
@@ -1,58 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Event;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * Allows to handle throwables thrown while running a command.
- *
- * @author Wouter de Jong
- */
-final class ConsoleErrorEvent extends ConsoleEvent
-{
- private $error;
- private $exitCode;
-
- public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, Command $command = null)
- {
- parent::__construct($command, $input, $output);
-
- $this->error = $error;
- }
-
- public function getError(): \Throwable
- {
- return $this->error;
- }
-
- public function setError(\Throwable $error): void
- {
- $this->error = $error;
- }
-
- public function setExitCode(int $exitCode): void
- {
- $this->exitCode = $exitCode;
-
- $r = new \ReflectionProperty($this->error, 'code');
- $r->setAccessible(true);
- $r->setValue($this->error, $this->exitCode);
- }
-
- public function getExitCode(): int
- {
- return $this->exitCode ?? (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
- }
-}
diff --git a/vendor/symfony/console/Event/ConsoleEvent.php b/vendor/symfony/console/Event/ConsoleEvent.php
deleted file mode 100644
index be7937d51..000000000
--- a/vendor/symfony/console/Event/ConsoleEvent.php
+++ /dev/null
@@ -1,67 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Event;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Contracts\EventDispatcher\Event;
-
-/**
- * Allows to inspect input and output of a command.
- *
- * @author Francesco Levorato
- */
-class ConsoleEvent extends Event
-{
- protected $command;
-
- private $input;
- private $output;
-
- public function __construct(?Command $command, InputInterface $input, OutputInterface $output)
- {
- $this->command = $command;
- $this->input = $input;
- $this->output = $output;
- }
-
- /**
- * Gets the command that is executed.
- *
- * @return Command|null
- */
- public function getCommand()
- {
- return $this->command;
- }
-
- /**
- * Gets the input instance.
- *
- * @return InputInterface
- */
- public function getInput()
- {
- return $this->input;
- }
-
- /**
- * Gets the output instance.
- *
- * @return OutputInterface
- */
- public function getOutput()
- {
- return $this->output;
- }
-}
diff --git a/vendor/symfony/console/Event/ConsoleSignalEvent.php b/vendor/symfony/console/Event/ConsoleSignalEvent.php
deleted file mode 100644
index ef13ed2f5..000000000
--- a/vendor/symfony/console/Event/ConsoleSignalEvent.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Event;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * @author marie
- */
-final class ConsoleSignalEvent extends ConsoleEvent
-{
- private $handlingSignal;
-
- public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $handlingSignal)
- {
- parent::__construct($command, $input, $output);
- $this->handlingSignal = $handlingSignal;
- }
-
- public function getHandlingSignal(): int
- {
- return $this->handlingSignal;
- }
-}
diff --git a/vendor/symfony/console/Event/ConsoleTerminateEvent.php b/vendor/symfony/console/Event/ConsoleTerminateEvent.php
deleted file mode 100644
index 190038d1a..000000000
--- a/vendor/symfony/console/Event/ConsoleTerminateEvent.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Event;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * Allows to manipulate the exit code of a command after its execution.
- *
- * @author Francesco Levorato
- */
-final class ConsoleTerminateEvent extends ConsoleEvent
-{
- private $exitCode;
-
- public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $exitCode)
- {
- parent::__construct($command, $input, $output);
-
- $this->setExitCode($exitCode);
- }
-
- public function setExitCode(int $exitCode): void
- {
- $this->exitCode = $exitCode;
- }
-
- public function getExitCode(): int
- {
- return $this->exitCode;
- }
-}
diff --git a/vendor/symfony/console/EventListener/ErrorListener.php b/vendor/symfony/console/EventListener/ErrorListener.php
deleted file mode 100644
index 897d9853f..000000000
--- a/vendor/symfony/console/EventListener/ErrorListener.php
+++ /dev/null
@@ -1,95 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\EventListener;
-
-use Psr\Log\LoggerInterface;
-use Symfony\Component\Console\ConsoleEvents;
-use Symfony\Component\Console\Event\ConsoleErrorEvent;
-use Symfony\Component\Console\Event\ConsoleEvent;
-use Symfony\Component\Console\Event\ConsoleTerminateEvent;
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-
-/**
- * @author James Halsall
- * @author Robin Chalas
- */
-class ErrorListener implements EventSubscriberInterface
-{
- private $logger;
-
- public function __construct(LoggerInterface $logger = null)
- {
- $this->logger = $logger;
- }
-
- public function onConsoleError(ConsoleErrorEvent $event)
- {
- if (null === $this->logger) {
- return;
- }
-
- $error = $event->getError();
-
- if (!$inputString = $this->getInputString($event)) {
- $this->logger->critical('An error occurred while using the console. Message: "{message}"', ['exception' => $error, 'message' => $error->getMessage()]);
-
- return;
- }
-
- $this->logger->critical('Error thrown while running command "{command}". Message: "{message}"', ['exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()]);
- }
-
- public function onConsoleTerminate(ConsoleTerminateEvent $event)
- {
- if (null === $this->logger) {
- return;
- }
-
- $exitCode = $event->getExitCode();
-
- if (0 === $exitCode) {
- return;
- }
-
- if (!$inputString = $this->getInputString($event)) {
- $this->logger->debug('The console exited with code "{code}"', ['code' => $exitCode]);
-
- return;
- }
-
- $this->logger->debug('Command "{command}" exited with code "{code}"', ['command' => $inputString, 'code' => $exitCode]);
- }
-
- public static function getSubscribedEvents()
- {
- return [
- ConsoleEvents::ERROR => ['onConsoleError', -128],
- ConsoleEvents::TERMINATE => ['onConsoleTerminate', -128],
- ];
- }
-
- private static function getInputString(ConsoleEvent $event): ?string
- {
- $commandName = $event->getCommand() ? $event->getCommand()->getName() : null;
- $input = $event->getInput();
-
- if (method_exists($input, '__toString')) {
- if ($commandName) {
- return str_replace(["'$commandName'", "\"$commandName\""], $commandName, (string) $input);
- }
-
- return (string) $input;
- }
-
- return $commandName;
- }
-}
diff --git a/vendor/symfony/console/Exception/CommandNotFoundException.php b/vendor/symfony/console/Exception/CommandNotFoundException.php
deleted file mode 100644
index 910ae1928..000000000
--- a/vendor/symfony/console/Exception/CommandNotFoundException.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Exception;
-
-/**
- * Represents an incorrect command name typed in the console.
- *
- * @author Jérôme Tamarelle
- */
-class CommandNotFoundException extends \InvalidArgumentException implements ExceptionInterface
-{
- private $alternatives;
-
- /**
- * @param string $message Exception message to throw
- * @param string[] $alternatives List of similar defined names
- * @param int $code Exception code
- * @param \Throwable|null $previous Previous exception used for the exception chaining
- */
- public function __construct(string $message, array $alternatives = [], int $code = 0, \Throwable $previous = null)
- {
- parent::__construct($message, $code, $previous);
-
- $this->alternatives = $alternatives;
- }
-
- /**
- * @return string[]
- */
- public function getAlternatives()
- {
- return $this->alternatives;
- }
-}
diff --git a/vendor/symfony/console/Exception/ExceptionInterface.php b/vendor/symfony/console/Exception/ExceptionInterface.php
deleted file mode 100644
index 1624e13d0..000000000
--- a/vendor/symfony/console/Exception/ExceptionInterface.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Exception;
-
-/**
- * ExceptionInterface.
- *
- * @author Jérôme Tamarelle
- */
-interface ExceptionInterface extends \Throwable
-{
-}
diff --git a/vendor/symfony/console/Exception/InvalidArgumentException.php b/vendor/symfony/console/Exception/InvalidArgumentException.php
deleted file mode 100644
index 07cc0b61d..000000000
--- a/vendor/symfony/console/Exception/InvalidArgumentException.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Exception;
-
-/**
- * @author Jérôme Tamarelle
- */
-class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
-{
-}
diff --git a/vendor/symfony/console/Exception/InvalidOptionException.php b/vendor/symfony/console/Exception/InvalidOptionException.php
deleted file mode 100644
index 5cf62792e..000000000
--- a/vendor/symfony/console/Exception/InvalidOptionException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Exception;
-
-/**
- * Represents an incorrect option name or value typed in the console.
- *
- * @author Jérôme Tamarelle
- */
-class InvalidOptionException extends \InvalidArgumentException implements ExceptionInterface
-{
-}
diff --git a/vendor/symfony/console/Exception/LogicException.php b/vendor/symfony/console/Exception/LogicException.php
deleted file mode 100644
index fc37b8d8a..000000000
--- a/vendor/symfony/console/Exception/LogicException.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Exception;
-
-/**
- * @author Jérôme Tamarelle
- */
-class LogicException extends \LogicException implements ExceptionInterface
-{
-}
diff --git a/vendor/symfony/console/Exception/MissingInputException.php b/vendor/symfony/console/Exception/MissingInputException.php
deleted file mode 100644
index 04f02ade4..000000000
--- a/vendor/symfony/console/Exception/MissingInputException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Exception;
-
-/**
- * Represents failure to read input from stdin.
- *
- * @author Gabriel Ostrolucký
- */
-class MissingInputException extends RuntimeException implements ExceptionInterface
-{
-}
diff --git a/vendor/symfony/console/Exception/NamespaceNotFoundException.php b/vendor/symfony/console/Exception/NamespaceNotFoundException.php
deleted file mode 100644
index dd16e4508..000000000
--- a/vendor/symfony/console/Exception/NamespaceNotFoundException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Exception;
-
-/**
- * Represents an incorrect namespace typed in the console.
- *
- * @author Pierre du Plessis
- */
-class NamespaceNotFoundException extends CommandNotFoundException
-{
-}
diff --git a/vendor/symfony/console/Exception/RuntimeException.php b/vendor/symfony/console/Exception/RuntimeException.php
deleted file mode 100644
index 51d7d80ac..000000000
--- a/vendor/symfony/console/Exception/RuntimeException.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Exception;
-
-/**
- * @author Jérôme Tamarelle
- */
-class RuntimeException extends \RuntimeException implements ExceptionInterface
-{
-}
diff --git a/vendor/symfony/console/Formatter/NullOutputFormatter.php b/vendor/symfony/console/Formatter/NullOutputFormatter.php
deleted file mode 100644
index d770e1465..000000000
--- a/vendor/symfony/console/Formatter/NullOutputFormatter.php
+++ /dev/null
@@ -1,69 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Formatter;
-
-/**
- * @author Tien Xuan Vo
- */
-final class NullOutputFormatter implements OutputFormatterInterface
-{
- private $style;
-
- /**
- * {@inheritdoc}
- */
- public function format(?string $message): ?string
- {
- return null;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getStyle(string $name): OutputFormatterStyleInterface
- {
- // to comply with the interface we must return a OutputFormatterStyleInterface
- return $this->style ?? $this->style = new NullOutputFormatterStyle();
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasStyle(string $name): bool
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isDecorated(): bool
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setDecorated(bool $decorated): void
- {
- // do nothing
- }
-
- /**
- * {@inheritdoc}
- */
- public function setStyle(string $name, OutputFormatterStyleInterface $style): void
- {
- // do nothing
- }
-}
diff --git a/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php b/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php
deleted file mode 100644
index 9232510f4..000000000
--- a/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php
+++ /dev/null
@@ -1,66 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Formatter;
-
-/**
- * @author Tien Xuan Vo
- */
-final class NullOutputFormatterStyle implements OutputFormatterStyleInterface
-{
- /**
- * {@inheritdoc}
- */
- public function apply(string $text): string
- {
- return $text;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setBackground(string $color = null): void
- {
- // do nothing
- }
-
- /**
- * {@inheritdoc}
- */
- public function setForeground(string $color = null): void
- {
- // do nothing
- }
-
- /**
- * {@inheritdoc}
- */
- public function setOption(string $option): void
- {
- // do nothing
- }
-
- /**
- * {@inheritdoc}
- */
- public function setOptions(array $options): void
- {
- // do nothing
- }
-
- /**
- * {@inheritdoc}
- */
- public function unsetOption(string $option): void
- {
- // do nothing
- }
-}
diff --git a/vendor/symfony/console/Formatter/OutputFormatter.php b/vendor/symfony/console/Formatter/OutputFormatter.php
deleted file mode 100644
index 603e5dca0..000000000
--- a/vendor/symfony/console/Formatter/OutputFormatter.php
+++ /dev/null
@@ -1,285 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Formatter;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-
-/**
- * Formatter class for console output.
- *
- * @author Konstantin Kudryashov
- * @author Roland Franssen
- */
-class OutputFormatter implements WrappableOutputFormatterInterface
-{
- private $decorated;
- private $styles = [];
- private $styleStack;
-
- public function __clone()
- {
- $this->styleStack = clone $this->styleStack;
- foreach ($this->styles as $key => $value) {
- $this->styles[$key] = clone $value;
- }
- }
-
- /**
- * Escapes "<" and ">" special chars in given text.
- *
- * @return string
- */
- public static function escape(string $text)
- {
- $text = preg_replace('/([^\\\\]|^)([<>])/', '$1\\\\$2', $text);
-
- return self::escapeTrailingBackslash($text);
- }
-
- /**
- * Escapes trailing "\" in given text.
- *
- * @internal
- */
- public static function escapeTrailingBackslash(string $text): string
- {
- if (str_ends_with($text, '\\')) {
- $len = \strlen($text);
- $text = rtrim($text, '\\');
- $text = str_replace("\0", '', $text);
- $text .= str_repeat("\0", $len - \strlen($text));
- }
-
- return $text;
- }
-
- /**
- * Initializes console output formatter.
- *
- * @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances
- */
- public function __construct(bool $decorated = false, array $styles = [])
- {
- $this->decorated = $decorated;
-
- $this->setStyle('error', new OutputFormatterStyle('white', 'red'));
- $this->setStyle('info', new OutputFormatterStyle('green'));
- $this->setStyle('comment', new OutputFormatterStyle('yellow'));
- $this->setStyle('question', new OutputFormatterStyle('black', 'cyan'));
-
- foreach ($styles as $name => $style) {
- $this->setStyle($name, $style);
- }
-
- $this->styleStack = new OutputFormatterStyleStack();
- }
-
- /**
- * {@inheritdoc}
- */
- public function setDecorated(bool $decorated)
- {
- $this->decorated = $decorated;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isDecorated()
- {
- return $this->decorated;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setStyle(string $name, OutputFormatterStyleInterface $style)
- {
- $this->styles[strtolower($name)] = $style;
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasStyle(string $name)
- {
- return isset($this->styles[strtolower($name)]);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getStyle(string $name)
- {
- if (!$this->hasStyle($name)) {
- throw new InvalidArgumentException(sprintf('Undefined style: "%s".', $name));
- }
-
- return $this->styles[strtolower($name)];
- }
-
- /**
- * {@inheritdoc}
- */
- public function format(?string $message)
- {
- return $this->formatAndWrap($message, 0);
- }
-
- /**
- * {@inheritdoc}
- */
- public function formatAndWrap(?string $message, int $width)
- {
- if (null === $message) {
- return '';
- }
-
- $offset = 0;
- $output = '';
- $openTagRegex = '[a-z](?:[^\\\\<>]*+ | \\\\.)*';
- $closeTagRegex = '[a-z][^<>]*+';
- $currentLineLength = 0;
- preg_match_all("#<(($openTagRegex) | /($closeTagRegex)?)>#ix", $message, $matches, \PREG_OFFSET_CAPTURE);
- foreach ($matches[0] as $i => $match) {
- $pos = $match[1];
- $text = $match[0];
-
- if (0 != $pos && '\\' == $message[$pos - 1]) {
- continue;
- }
-
- // add the text up to the next tag
- $output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset), $output, $width, $currentLineLength);
- $offset = $pos + \strlen($text);
-
- // opening tag?
- if ($open = '/' != $text[1]) {
- $tag = $matches[1][$i][0];
- } else {
- $tag = $matches[3][$i][0] ?? '';
- }
-
- if (!$open && !$tag) {
- // >
- $this->styleStack->pop();
- } elseif (null === $style = $this->createStyleFromString($tag)) {
- $output .= $this->applyCurrentStyle($text, $output, $width, $currentLineLength);
- } elseif ($open) {
- $this->styleStack->push($style);
- } else {
- $this->styleStack->pop($style);
- }
- }
-
- $output .= $this->applyCurrentStyle(substr($message, $offset), $output, $width, $currentLineLength);
-
- return strtr($output, ["\0" => '\\', '\\<' => '<', '\\>' => '>']);
- }
-
- /**
- * @return OutputFormatterStyleStack
- */
- public function getStyleStack()
- {
- return $this->styleStack;
- }
-
- /**
- * Tries to create new style instance from string.
- */
- private function createStyleFromString(string $string): ?OutputFormatterStyleInterface
- {
- if (isset($this->styles[$string])) {
- return $this->styles[$string];
- }
-
- if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', $string, $matches, \PREG_SET_ORDER)) {
- return null;
- }
-
- $style = new OutputFormatterStyle();
- foreach ($matches as $match) {
- array_shift($match);
- $match[0] = strtolower($match[0]);
-
- if ('fg' == $match[0]) {
- $style->setForeground(strtolower($match[1]));
- } elseif ('bg' == $match[0]) {
- $style->setBackground(strtolower($match[1]));
- } elseif ('href' === $match[0]) {
- $url = preg_replace('{\\\\([<>])}', '$1', $match[1]);
- $style->setHref($url);
- } elseif ('options' === $match[0]) {
- preg_match_all('([^,;]+)', strtolower($match[1]), $options);
- $options = array_shift($options);
- foreach ($options as $option) {
- $style->setOption($option);
- }
- } else {
- return null;
- }
- }
-
- return $style;
- }
-
- /**
- * Applies current style from stack to text, if must be applied.
- */
- private function applyCurrentStyle(string $text, string $current, int $width, int &$currentLineLength): string
- {
- if ('' === $text) {
- return '';
- }
-
- if (!$width) {
- return $this->isDecorated() ? $this->styleStack->getCurrent()->apply($text) : $text;
- }
-
- if (!$currentLineLength && '' !== $current) {
- $text = ltrim($text);
- }
-
- if ($currentLineLength) {
- $prefix = substr($text, 0, $i = $width - $currentLineLength)."\n";
- $text = substr($text, $i);
- } else {
- $prefix = '';
- }
-
- preg_match('~(\\n)$~', $text, $matches);
- $text = $prefix.preg_replace('~([^\\n]{'.$width.'})\\ *~', "\$1\n", $text);
- $text = rtrim($text, "\n").($matches[1] ?? '');
-
- if (!$currentLineLength && '' !== $current && "\n" !== substr($current, -1)) {
- $text = "\n".$text;
- }
-
- $lines = explode("\n", $text);
-
- foreach ($lines as $line) {
- $currentLineLength += \strlen($line);
- if ($width <= $currentLineLength) {
- $currentLineLength = 0;
- }
- }
-
- if ($this->isDecorated()) {
- foreach ($lines as $i => $line) {
- $lines[$i] = $this->styleStack->getCurrent()->apply($line);
- }
- }
-
- return implode("\n", $lines);
- }
-}
diff --git a/vendor/symfony/console/Formatter/OutputFormatterInterface.php b/vendor/symfony/console/Formatter/OutputFormatterInterface.php
deleted file mode 100644
index 0b5f839a2..000000000
--- a/vendor/symfony/console/Formatter/OutputFormatterInterface.php
+++ /dev/null
@@ -1,60 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Formatter;
-
-/**
- * Formatter interface for console output.
- *
- * @author Konstantin Kudryashov
- */
-interface OutputFormatterInterface
-{
- /**
- * Sets the decorated flag.
- */
- public function setDecorated(bool $decorated);
-
- /**
- * Whether the output will decorate messages.
- *
- * @return bool
- */
- public function isDecorated();
-
- /**
- * Sets a new style.
- */
- public function setStyle(string $name, OutputFormatterStyleInterface $style);
-
- /**
- * Checks if output formatter has style with specified name.
- *
- * @return bool
- */
- public function hasStyle(string $name);
-
- /**
- * Gets style options from style with specified name.
- *
- * @return OutputFormatterStyleInterface
- *
- * @throws \InvalidArgumentException When style isn't defined
- */
- public function getStyle(string $name);
-
- /**
- * Formats a message according to the given styles.
- *
- * @return string|null
- */
- public function format(?string $message);
-}
diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyle.php b/vendor/symfony/console/Formatter/OutputFormatterStyle.php
deleted file mode 100644
index 8370ba058..000000000
--- a/vendor/symfony/console/Formatter/OutputFormatterStyle.php
+++ /dev/null
@@ -1,109 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Formatter;
-
-use Symfony\Component\Console\Color;
-
-/**
- * Formatter style class for defining styles.
- *
- * @author Konstantin Kudryashov
- */
-class OutputFormatterStyle implements OutputFormatterStyleInterface
-{
- private $color;
- private $foreground;
- private $background;
- private $options;
- private $href;
- private $handlesHrefGracefully;
-
- /**
- * Initializes output formatter style.
- *
- * @param string|null $foreground The style foreground color name
- * @param string|null $background The style background color name
- */
- public function __construct(string $foreground = null, string $background = null, array $options = [])
- {
- $this->color = new Color($this->foreground = $foreground ?: '', $this->background = $background ?: '', $this->options = $options);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setForeground(string $color = null)
- {
- $this->color = new Color($this->foreground = $color ?: '', $this->background, $this->options);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setBackground(string $color = null)
- {
- $this->color = new Color($this->foreground, $this->background = $color ?: '', $this->options);
- }
-
- public function setHref(string $url): void
- {
- $this->href = $url;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setOption(string $option)
- {
- $this->options[] = $option;
- $this->color = new Color($this->foreground, $this->background, $this->options);
- }
-
- /**
- * {@inheritdoc}
- */
- public function unsetOption(string $option)
- {
- $pos = array_search($option, $this->options);
- if (false !== $pos) {
- unset($this->options[$pos]);
- }
-
- $this->color = new Color($this->foreground, $this->background, $this->options);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setOptions(array $options)
- {
- $this->color = new Color($this->foreground, $this->background, $this->options = $options);
- }
-
- /**
- * {@inheritdoc}
- */
- public function apply(string $text)
- {
- if (null === $this->handlesHrefGracefully) {
- $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR')
- && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100)
- && !isset($_SERVER['IDEA_INITIAL_DIRECTORY']);
- }
-
- if (null !== $this->href && $this->handlesHrefGracefully) {
- $text = "\033]8;;$this->href\033\\$text\033]8;;\033\\";
- }
-
- return $this->color->apply($text);
- }
-}
diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php b/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php
deleted file mode 100644
index b30560d22..000000000
--- a/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Formatter;
-
-/**
- * Formatter style interface for defining styles.
- *
- * @author Konstantin Kudryashov
- */
-interface OutputFormatterStyleInterface
-{
- /**
- * Sets style foreground color.
- */
- public function setForeground(string $color = null);
-
- /**
- * Sets style background color.
- */
- public function setBackground(string $color = null);
-
- /**
- * Sets some specific style option.
- */
- public function setOption(string $option);
-
- /**
- * Unsets some specific style option.
- */
- public function unsetOption(string $option);
-
- /**
- * Sets multiple style options at once.
- */
- public function setOptions(array $options);
-
- /**
- * Applies the style to a given text.
- *
- * @return string
- */
- public function apply(string $text);
-}
diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php
deleted file mode 100644
index fc48dc0e1..000000000
--- a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php
+++ /dev/null
@@ -1,110 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Formatter;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Contracts\Service\ResetInterface;
-
-/**
- * @author Jean-François Simon
- */
-class OutputFormatterStyleStack implements ResetInterface
-{
- /**
- * @var OutputFormatterStyleInterface[]
- */
- private $styles;
-
- private $emptyStyle;
-
- public function __construct(OutputFormatterStyleInterface $emptyStyle = null)
- {
- $this->emptyStyle = $emptyStyle ?? new OutputFormatterStyle();
- $this->reset();
- }
-
- /**
- * Resets stack (ie. empty internal arrays).
- */
- public function reset()
- {
- $this->styles = [];
- }
-
- /**
- * Pushes a style in the stack.
- */
- public function push(OutputFormatterStyleInterface $style)
- {
- $this->styles[] = $style;
- }
-
- /**
- * Pops a style from the stack.
- *
- * @return OutputFormatterStyleInterface
- *
- * @throws InvalidArgumentException When style tags incorrectly nested
- */
- public function pop(OutputFormatterStyleInterface $style = null)
- {
- if (empty($this->styles)) {
- return $this->emptyStyle;
- }
-
- if (null === $style) {
- return array_pop($this->styles);
- }
-
- foreach (array_reverse($this->styles, true) as $index => $stackedStyle) {
- if ($style->apply('') === $stackedStyle->apply('')) {
- $this->styles = \array_slice($this->styles, 0, $index);
-
- return $stackedStyle;
- }
- }
-
- throw new InvalidArgumentException('Incorrectly nested style tag found.');
- }
-
- /**
- * Computes current style with stacks top codes.
- *
- * @return OutputFormatterStyle
- */
- public function getCurrent()
- {
- if (empty($this->styles)) {
- return $this->emptyStyle;
- }
-
- return $this->styles[\count($this->styles) - 1];
- }
-
- /**
- * @return $this
- */
- public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle)
- {
- $this->emptyStyle = $emptyStyle;
-
- return $this;
- }
-
- /**
- * @return OutputFormatterStyleInterface
- */
- public function getEmptyStyle()
- {
- return $this->emptyStyle;
- }
-}
diff --git a/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php b/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php
deleted file mode 100644
index 42319ee55..000000000
--- a/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Formatter;
-
-/**
- * Formatter interface for console output that supports word wrapping.
- *
- * @author Roland Franssen
- */
-interface WrappableOutputFormatterInterface extends OutputFormatterInterface
-{
- /**
- * Formats a message according to the given styles, wrapping at `$width` (0 means no wrapping).
- */
- public function formatAndWrap(?string $message, int $width);
-}
diff --git a/vendor/symfony/console/Helper/DebugFormatterHelper.php b/vendor/symfony/console/Helper/DebugFormatterHelper.php
deleted file mode 100644
index e258ba050..000000000
--- a/vendor/symfony/console/Helper/DebugFormatterHelper.php
+++ /dev/null
@@ -1,107 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-/**
- * Helps outputting debug information when running an external program from a command.
- *
- * An external program can be a Process, an HTTP request, or anything else.
- *
- * @author Fabien Potencier
- */
-class DebugFormatterHelper extends Helper
-{
- private const COLORS = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default'];
- private $started = [];
- private $count = -1;
-
- /**
- * Starts a debug formatting session.
- *
- * @return string
- */
- public function start(string $id, string $message, string $prefix = 'RUN')
- {
- $this->started[$id] = ['border' => ++$this->count % \count(self::COLORS)];
-
- return sprintf("%s %s > %s>\n", $this->getBorder($id), $prefix, $message);
- }
-
- /**
- * Adds progress to a formatting session.
- *
- * @return string
- */
- public function progress(string $id, string $buffer, bool $error = false, string $prefix = 'OUT', string $errorPrefix = 'ERR')
- {
- $message = '';
-
- if ($error) {
- if (isset($this->started[$id]['out'])) {
- $message .= "\n";
- unset($this->started[$id]['out']);
- }
- if (!isset($this->started[$id]['err'])) {
- $message .= sprintf('%s %s > ', $this->getBorder($id), $errorPrefix);
- $this->started[$id]['err'] = true;
- }
-
- $message .= str_replace("\n", sprintf("\n%s %s > ", $this->getBorder($id), $errorPrefix), $buffer);
- } else {
- if (isset($this->started[$id]['err'])) {
- $message .= "\n";
- unset($this->started[$id]['err']);
- }
- if (!isset($this->started[$id]['out'])) {
- $message .= sprintf('%s %s > ', $this->getBorder($id), $prefix);
- $this->started[$id]['out'] = true;
- }
-
- $message .= str_replace("\n", sprintf("\n%s %s > ", $this->getBorder($id), $prefix), $buffer);
- }
-
- return $message;
- }
-
- /**
- * Stops a formatting session.
- *
- * @return string
- */
- public function stop(string $id, string $message, bool $successful, string $prefix = 'RES')
- {
- $trailingEOL = isset($this->started[$id]['out']) || isset($this->started[$id]['err']) ? "\n" : '';
-
- if ($successful) {
- return sprintf("%s%s %s > %s>\n", $trailingEOL, $this->getBorder($id), $prefix, $message);
- }
-
- $message = sprintf("%s%s %s > %s>\n", $trailingEOL, $this->getBorder($id), $prefix, $message);
-
- unset($this->started[$id]['out'], $this->started[$id]['err']);
-
- return $message;
- }
-
- private function getBorder(string $id): string
- {
- return sprintf(' >', self::COLORS[$this->started[$id]['border']]);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getName()
- {
- return 'debug_formatter';
- }
-}
diff --git a/vendor/symfony/console/Helper/DescriptorHelper.php b/vendor/symfony/console/Helper/DescriptorHelper.php
deleted file mode 100644
index af85e9c0a..000000000
--- a/vendor/symfony/console/Helper/DescriptorHelper.php
+++ /dev/null
@@ -1,92 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Descriptor\DescriptorInterface;
-use Symfony\Component\Console\Descriptor\JsonDescriptor;
-use Symfony\Component\Console\Descriptor\MarkdownDescriptor;
-use Symfony\Component\Console\Descriptor\TextDescriptor;
-use Symfony\Component\Console\Descriptor\XmlDescriptor;
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * This class adds helper method to describe objects in various formats.
- *
- * @author Jean-François Simon
- */
-class DescriptorHelper extends Helper
-{
- /**
- * @var DescriptorInterface[]
- */
- private $descriptors = [];
-
- public function __construct()
- {
- $this
- ->register('txt', new TextDescriptor())
- ->register('xml', new XmlDescriptor())
- ->register('json', new JsonDescriptor())
- ->register('md', new MarkdownDescriptor())
- ;
- }
-
- /**
- * Describes an object if supported.
- *
- * Available options are:
- * * format: string, the output format name
- * * raw_text: boolean, sets output type as raw
- *
- * @throws InvalidArgumentException when the given format is not supported
- */
- public function describe(OutputInterface $output, ?object $object, array $options = [])
- {
- $options = array_merge([
- 'raw_text' => false,
- 'format' => 'txt',
- ], $options);
-
- if (!isset($this->descriptors[$options['format']])) {
- throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $options['format']));
- }
-
- $descriptor = $this->descriptors[$options['format']];
- $descriptor->describe($output, $object, $options);
- }
-
- /**
- * Registers a descriptor.
- *
- * @return $this
- */
- public function register(string $format, DescriptorInterface $descriptor)
- {
- $this->descriptors[$format] = $descriptor;
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getName()
- {
- return 'descriptor';
- }
-
- public function getFormats(): array
- {
- return array_keys($this->descriptors);
- }
-}
diff --git a/vendor/symfony/console/Helper/Dumper.php b/vendor/symfony/console/Helper/Dumper.php
deleted file mode 100644
index b013b6c52..000000000
--- a/vendor/symfony/console/Helper/Dumper.php
+++ /dev/null
@@ -1,64 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\VarDumper\Cloner\ClonerInterface;
-use Symfony\Component\VarDumper\Cloner\VarCloner;
-use Symfony\Component\VarDumper\Dumper\CliDumper;
-
-/**
- * @author Roland Franssen
- */
-final class Dumper
-{
- private $output;
- private $dumper;
- private $cloner;
- private $handler;
-
- public function __construct(OutputInterface $output, CliDumper $dumper = null, ClonerInterface $cloner = null)
- {
- $this->output = $output;
- $this->dumper = $dumper;
- $this->cloner = $cloner;
-
- if (class_exists(CliDumper::class)) {
- $this->handler = function ($var): string {
- $dumper = $this->dumper ?? $this->dumper = new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_COMMA_SEPARATOR);
- $dumper->setColors($this->output->isDecorated());
-
- return rtrim($dumper->dump(($this->cloner ?? $this->cloner = new VarCloner())->cloneVar($var)->withRefHandles(false), true));
- };
- } else {
- $this->handler = function ($var): string {
- switch (true) {
- case null === $var:
- return 'null';
- case true === $var:
- return 'true';
- case false === $var:
- return 'false';
- case \is_string($var):
- return '"'.$var.'"';
- default:
- return rtrim(print_r($var, true));
- }
- };
- }
- }
-
- public function __invoke($var): string
- {
- return ($this->handler)($var);
- }
-}
diff --git a/vendor/symfony/console/Helper/FormatterHelper.php b/vendor/symfony/console/Helper/FormatterHelper.php
deleted file mode 100644
index 92d8dc724..000000000
--- a/vendor/symfony/console/Helper/FormatterHelper.php
+++ /dev/null
@@ -1,92 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Formatter\OutputFormatter;
-
-/**
- * The Formatter class provides helpers to format messages.
- *
- * @author Fabien Potencier
- */
-class FormatterHelper extends Helper
-{
- /**
- * Formats a message within a section.
- *
- * @return string
- */
- public function formatSection(string $section, string $message, string $style = 'info')
- {
- return sprintf('<%s>[%s]%s> %s', $style, $section, $style, $message);
- }
-
- /**
- * Formats a message as a block of text.
- *
- * @param string|array $messages The message to write in the block
- *
- * @return string
- */
- public function formatBlock($messages, string $style, bool $large = false)
- {
- if (!\is_array($messages)) {
- $messages = [$messages];
- }
-
- $len = 0;
- $lines = [];
- foreach ($messages as $message) {
- $message = OutputFormatter::escape($message);
- $lines[] = sprintf($large ? ' %s ' : ' %s ', $message);
- $len = max(self::width($message) + ($large ? 4 : 2), $len);
- }
-
- $messages = $large ? [str_repeat(' ', $len)] : [];
- for ($i = 0; isset($lines[$i]); ++$i) {
- $messages[] = $lines[$i].str_repeat(' ', $len - self::width($lines[$i]));
- }
- if ($large) {
- $messages[] = str_repeat(' ', $len);
- }
-
- for ($i = 0; isset($messages[$i]); ++$i) {
- $messages[$i] = sprintf('<%s>%s%s>', $style, $messages[$i], $style);
- }
-
- return implode("\n", $messages);
- }
-
- /**
- * Truncates a message to the given length.
- *
- * @return string
- */
- public function truncate(string $message, int $length, string $suffix = '...')
- {
- $computedLength = $length - self::width($suffix);
-
- if ($computedLength > self::width($message)) {
- return $message;
- }
-
- return self::substr($message, 0, $length).$suffix;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getName()
- {
- return 'formatter';
- }
-}
diff --git a/vendor/symfony/console/Helper/Helper.php b/vendor/symfony/console/Helper/Helper.php
deleted file mode 100644
index c7d3e25d0..000000000
--- a/vendor/symfony/console/Helper/Helper.php
+++ /dev/null
@@ -1,180 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Formatter\OutputFormatterInterface;
-use Symfony\Component\String\UnicodeString;
-
-/**
- * Helper is the base class for all helper classes.
- *
- * @author Fabien Potencier
- */
-abstract class Helper implements HelperInterface
-{
- protected $helperSet = null;
-
- /**
- * {@inheritdoc}
- */
- public function setHelperSet(HelperSet $helperSet = null)
- {
- $this->helperSet = $helperSet;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getHelperSet()
- {
- return $this->helperSet;
- }
-
- /**
- * Returns the length of a string, using mb_strwidth if it is available.
- *
- * @deprecated since Symfony 5.3
- *
- * @return int
- */
- public static function strlen(?string $string)
- {
- trigger_deprecation('symfony/console', '5.3', 'Method "%s()" is deprecated and will be removed in Symfony 6.0. Use Helper::width() or Helper::length() instead.', __METHOD__);
-
- return self::width($string);
- }
-
- /**
- * Returns the width of a string, using mb_strwidth if it is available.
- * The width is how many characters positions the string will use.
- */
- public static function width(?string $string): int
- {
- $string ?? $string = '';
-
- if (preg_match('//u', $string)) {
- return (new UnicodeString($string))->width(false);
- }
-
- if (false === $encoding = mb_detect_encoding($string, null, true)) {
- return \strlen($string);
- }
-
- return mb_strwidth($string, $encoding);
- }
-
- /**
- * Returns the length of a string, using mb_strlen if it is available.
- * The length is related to how many bytes the string will use.
- */
- public static function length(?string $string): int
- {
- $string ?? $string = '';
-
- if (preg_match('//u', $string)) {
- return (new UnicodeString($string))->length();
- }
-
- if (false === $encoding = mb_detect_encoding($string, null, true)) {
- return \strlen($string);
- }
-
- return mb_strlen($string, $encoding);
- }
-
- /**
- * Returns the subset of a string, using mb_substr if it is available.
- *
- * @return string
- */
- public static function substr(?string $string, int $from, int $length = null)
- {
- $string ?? $string = '';
-
- if (false === $encoding = mb_detect_encoding($string, null, true)) {
- return substr($string, $from, $length);
- }
-
- return mb_substr($string, $from, $length, $encoding);
- }
-
- public static function formatTime($secs)
- {
- static $timeFormats = [
- [0, '< 1 sec'],
- [1, '1 sec'],
- [2, 'secs', 1],
- [60, '1 min'],
- [120, 'mins', 60],
- [3600, '1 hr'],
- [7200, 'hrs', 3600],
- [86400, '1 day'],
- [172800, 'days', 86400],
- ];
-
- foreach ($timeFormats as $index => $format) {
- if ($secs >= $format[0]) {
- if ((isset($timeFormats[$index + 1]) && $secs < $timeFormats[$index + 1][0])
- || $index == \count($timeFormats) - 1
- ) {
- if (2 == \count($format)) {
- return $format[1];
- }
-
- return floor($secs / $format[2]).' '.$format[1];
- }
- }
- }
- }
-
- public static function formatMemory(int $memory)
- {
- if ($memory >= 1024 * 1024 * 1024) {
- return sprintf('%.1f GiB', $memory / 1024 / 1024 / 1024);
- }
-
- if ($memory >= 1024 * 1024) {
- return sprintf('%.1f MiB', $memory / 1024 / 1024);
- }
-
- if ($memory >= 1024) {
- return sprintf('%d KiB', $memory / 1024);
- }
-
- return sprintf('%d B', $memory);
- }
-
- /**
- * @deprecated since Symfony 5.3
- */
- public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, ?string $string)
- {
- trigger_deprecation('symfony/console', '5.3', 'Method "%s()" is deprecated and will be removed in Symfony 6.0. Use Helper::removeDecoration() instead.', __METHOD__);
-
- return self::width(self::removeDecoration($formatter, $string));
- }
-
- public static function removeDecoration(OutputFormatterInterface $formatter, ?string $string)
- {
- $isDecorated = $formatter->isDecorated();
- $formatter->setDecorated(false);
- // remove <...> formatting
- $string = $formatter->format($string ?? '');
- // remove already formatted characters
- $string = preg_replace("/\033\[[^m]*m/", '', $string ?? '');
- // remove terminal hyperlinks
- $string = preg_replace('/\\033]8;[^;]*;[^\\033]*\\033\\\\/', '', $string ?? '');
- $formatter->setDecorated($isDecorated);
-
- return $string;
- }
-}
diff --git a/vendor/symfony/console/Helper/HelperInterface.php b/vendor/symfony/console/Helper/HelperInterface.php
deleted file mode 100644
index fc952b486..000000000
--- a/vendor/symfony/console/Helper/HelperInterface.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-/**
- * HelperInterface is the interface all helpers must implement.
- *
- * @author Fabien Potencier
- */
-interface HelperInterface
-{
- /**
- * Sets the helper set associated with this helper.
- */
- public function setHelperSet(HelperSet $helperSet = null);
-
- /**
- * Gets the helper set associated with this helper.
- *
- * @return HelperSet|null
- */
- public function getHelperSet();
-
- /**
- * Returns the canonical name of this helper.
- *
- * @return string
- */
- public function getName();
-}
diff --git a/vendor/symfony/console/Helper/HelperSet.php b/vendor/symfony/console/Helper/HelperSet.php
deleted file mode 100644
index 719762d24..000000000
--- a/vendor/symfony/console/Helper/HelperSet.php
+++ /dev/null
@@ -1,108 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-
-/**
- * HelperSet represents a set of helpers to be used with a command.
- *
- * @author Fabien Potencier
- *
- * @implements \IteratorAggregate
- */
-class HelperSet implements \IteratorAggregate
-{
- /** @var array */
- private $helpers = [];
- private $command;
-
- /**
- * @param Helper[] $helpers An array of helper
- */
- public function __construct(array $helpers = [])
- {
- foreach ($helpers as $alias => $helper) {
- $this->set($helper, \is_int($alias) ? null : $alias);
- }
- }
-
- public function set(HelperInterface $helper, string $alias = null)
- {
- $this->helpers[$helper->getName()] = $helper;
- if (null !== $alias) {
- $this->helpers[$alias] = $helper;
- }
-
- $helper->setHelperSet($this);
- }
-
- /**
- * Returns true if the helper if defined.
- *
- * @return bool
- */
- public function has(string $name)
- {
- return isset($this->helpers[$name]);
- }
-
- /**
- * Gets a helper value.
- *
- * @return HelperInterface
- *
- * @throws InvalidArgumentException if the helper is not defined
- */
- public function get(string $name)
- {
- if (!$this->has($name)) {
- throw new InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name));
- }
-
- return $this->helpers[$name];
- }
-
- /**
- * @deprecated since Symfony 5.4
- */
- public function setCommand(Command $command = null)
- {
- trigger_deprecation('symfony/console', '5.4', 'Method "%s()" is deprecated.', __METHOD__);
-
- $this->command = $command;
- }
-
- /**
- * Gets the command associated with this helper set.
- *
- * @return Command
- *
- * @deprecated since Symfony 5.4
- */
- public function getCommand()
- {
- trigger_deprecation('symfony/console', '5.4', 'Method "%s()" is deprecated.', __METHOD__);
-
- return $this->command;
- }
-
- /**
- * @return \Traversable
- */
- #[\ReturnTypeWillChange]
- public function getIterator()
- {
- return new \ArrayIterator($this->helpers);
- }
-}
diff --git a/vendor/symfony/console/Helper/InputAwareHelper.php b/vendor/symfony/console/Helper/InputAwareHelper.php
deleted file mode 100644
index 0d0dba23e..000000000
--- a/vendor/symfony/console/Helper/InputAwareHelper.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Input\InputAwareInterface;
-use Symfony\Component\Console\Input\InputInterface;
-
-/**
- * An implementation of InputAwareInterface for Helpers.
- *
- * @author Wouter J
- */
-abstract class InputAwareHelper extends Helper implements InputAwareInterface
-{
- protected $input;
-
- /**
- * {@inheritdoc}
- */
- public function setInput(InputInterface $input)
- {
- $this->input = $input;
- }
-}
diff --git a/vendor/symfony/console/Helper/ProcessHelper.php b/vendor/symfony/console/Helper/ProcessHelper.php
deleted file mode 100644
index 4ea3d724d..000000000
--- a/vendor/symfony/console/Helper/ProcessHelper.php
+++ /dev/null
@@ -1,144 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Output\ConsoleOutputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Process\Exception\ProcessFailedException;
-use Symfony\Component\Process\Process;
-
-/**
- * The ProcessHelper class provides helpers to run external processes.
- *
- * @author Fabien Potencier
- *
- * @final
- */
-class ProcessHelper extends Helper
-{
- /**
- * Runs an external process.
- *
- * @param array|Process $cmd An instance of Process or an array of the command and arguments
- * @param callable|null $callback A PHP callback to run whenever there is some
- * output available on STDOUT or STDERR
- */
- public function run(OutputInterface $output, $cmd, string $error = null, callable $callback = null, int $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE): Process
- {
- if (!class_exists(Process::class)) {
- throw new \LogicException('The ProcessHelper cannot be run as the Process component is not installed. Try running "compose require symfony/process".');
- }
-
- if ($output instanceof ConsoleOutputInterface) {
- $output = $output->getErrorOutput();
- }
-
- $formatter = $this->getHelperSet()->get('debug_formatter');
-
- if ($cmd instanceof Process) {
- $cmd = [$cmd];
- }
-
- if (!\is_array($cmd)) {
- throw new \TypeError(sprintf('The "command" argument of "%s()" must be an array or a "%s" instance, "%s" given.', __METHOD__, Process::class, get_debug_type($cmd)));
- }
-
- if (\is_string($cmd[0] ?? null)) {
- $process = new Process($cmd);
- $cmd = [];
- } elseif (($cmd[0] ?? null) instanceof Process) {
- $process = $cmd[0];
- unset($cmd[0]);
- } else {
- throw new \InvalidArgumentException(sprintf('Invalid command provided to "%s()": the command should be an array whose first element is either the path to the binary to run or a "Process" object.', __METHOD__));
- }
-
- if ($verbosity <= $output->getVerbosity()) {
- $output->write($formatter->start(spl_object_hash($process), $this->escapeString($process->getCommandLine())));
- }
-
- if ($output->isDebug()) {
- $callback = $this->wrapCallback($output, $process, $callback);
- }
-
- $process->run($callback, $cmd);
-
- if ($verbosity <= $output->getVerbosity()) {
- $message = $process->isSuccessful() ? 'Command ran successfully' : sprintf('%s Command did not run successfully', $process->getExitCode());
- $output->write($formatter->stop(spl_object_hash($process), $message, $process->isSuccessful()));
- }
-
- if (!$process->isSuccessful() && null !== $error) {
- $output->writeln(sprintf('%s', $this->escapeString($error)));
- }
-
- return $process;
- }
-
- /**
- * Runs the process.
- *
- * This is identical to run() except that an exception is thrown if the process
- * exits with a non-zero exit code.
- *
- * @param array|Process $cmd An instance of Process or a command to run
- * @param callable|null $callback A PHP callback to run whenever there is some
- * output available on STDOUT or STDERR
- *
- * @throws ProcessFailedException
- *
- * @see run()
- */
- public function mustRun(OutputInterface $output, $cmd, string $error = null, callable $callback = null): Process
- {
- $process = $this->run($output, $cmd, $error, $callback);
-
- if (!$process->isSuccessful()) {
- throw new ProcessFailedException($process);
- }
-
- return $process;
- }
-
- /**
- * Wraps a Process callback to add debugging output.
- */
- public function wrapCallback(OutputInterface $output, Process $process, callable $callback = null): callable
- {
- if ($output instanceof ConsoleOutputInterface) {
- $output = $output->getErrorOutput();
- }
-
- $formatter = $this->getHelperSet()->get('debug_formatter');
-
- return function ($type, $buffer) use ($output, $process, $callback, $formatter) {
- $output->write($formatter->progress(spl_object_hash($process), $this->escapeString($buffer), Process::ERR === $type));
-
- if (null !== $callback) {
- $callback($type, $buffer);
- }
- };
- }
-
- private function escapeString(string $str): string
- {
- return str_replace('<', '\\<', $str);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getName(): string
- {
- return 'process';
- }
-}
diff --git a/vendor/symfony/console/Helper/ProgressBar.php b/vendor/symfony/console/Helper/ProgressBar.php
deleted file mode 100644
index eb6aacb1a..000000000
--- a/vendor/symfony/console/Helper/ProgressBar.php
+++ /dev/null
@@ -1,609 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Cursor;
-use Symfony\Component\Console\Exception\LogicException;
-use Symfony\Component\Console\Output\ConsoleOutputInterface;
-use Symfony\Component\Console\Output\ConsoleSectionOutput;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Terminal;
-
-/**
- * The ProgressBar provides helpers to display progress output.
- *
- * @author Fabien Potencier
- * @author Chris Jones
- */
-final class ProgressBar
-{
- public const FORMAT_VERBOSE = 'verbose';
- public const FORMAT_VERY_VERBOSE = 'very_verbose';
- public const FORMAT_DEBUG = 'debug';
- public const FORMAT_NORMAL = 'normal';
-
- private const FORMAT_VERBOSE_NOMAX = 'verbose_nomax';
- private const FORMAT_VERY_VERBOSE_NOMAX = 'very_verbose_nomax';
- private const FORMAT_DEBUG_NOMAX = 'debug_nomax';
- private const FORMAT_NORMAL_NOMAX = 'normal_nomax';
-
- private $barWidth = 28;
- private $barChar;
- private $emptyBarChar = '-';
- private $progressChar = '>';
- private $format;
- private $internalFormat;
- private $redrawFreq = 1;
- private $writeCount;
- private $lastWriteTime;
- private $minSecondsBetweenRedraws = 0;
- private $maxSecondsBetweenRedraws = 1;
- private $output;
- private $step = 0;
- private $max;
- private $startTime;
- private $stepWidth;
- private $percent = 0.0;
- private $messages = [];
- private $overwrite = true;
- private $terminal;
- private $previousMessage;
- private $cursor;
-
- private static $formatters;
- private static $formats;
-
- /**
- * @param int $max Maximum steps (0 if unknown)
- */
- public function __construct(OutputInterface $output, int $max = 0, float $minSecondsBetweenRedraws = 1 / 25)
- {
- if ($output instanceof ConsoleOutputInterface) {
- $output = $output->getErrorOutput();
- }
-
- $this->output = $output;
- $this->setMaxSteps($max);
- $this->terminal = new Terminal();
-
- if (0 < $minSecondsBetweenRedraws) {
- $this->redrawFreq = null;
- $this->minSecondsBetweenRedraws = $minSecondsBetweenRedraws;
- }
-
- if (!$this->output->isDecorated()) {
- // disable overwrite when output does not support ANSI codes.
- $this->overwrite = false;
-
- // set a reasonable redraw frequency so output isn't flooded
- $this->redrawFreq = null;
- }
-
- $this->startTime = time();
- $this->cursor = new Cursor($output);
- }
-
- /**
- * Sets a placeholder formatter for a given name.
- *
- * This method also allow you to override an existing placeholder.
- *
- * @param string $name The placeholder name (including the delimiter char like %)
- * @param callable $callable A PHP callable
- */
- public static function setPlaceholderFormatterDefinition(string $name, callable $callable): void
- {
- if (!self::$formatters) {
- self::$formatters = self::initPlaceholderFormatters();
- }
-
- self::$formatters[$name] = $callable;
- }
-
- /**
- * Gets the placeholder formatter for a given name.
- *
- * @param string $name The placeholder name (including the delimiter char like %)
- */
- public static function getPlaceholderFormatterDefinition(string $name): ?callable
- {
- if (!self::$formatters) {
- self::$formatters = self::initPlaceholderFormatters();
- }
-
- return self::$formatters[$name] ?? null;
- }
-
- /**
- * Sets a format for a given name.
- *
- * This method also allow you to override an existing format.
- *
- * @param string $name The format name
- * @param string $format A format string
- */
- public static function setFormatDefinition(string $name, string $format): void
- {
- if (!self::$formats) {
- self::$formats = self::initFormats();
- }
-
- self::$formats[$name] = $format;
- }
-
- /**
- * Gets the format for a given name.
- *
- * @param string $name The format name
- */
- public static function getFormatDefinition(string $name): ?string
- {
- if (!self::$formats) {
- self::$formats = self::initFormats();
- }
-
- return self::$formats[$name] ?? null;
- }
-
- /**
- * Associates a text with a named placeholder.
- *
- * The text is displayed when the progress bar is rendered but only
- * when the corresponding placeholder is part of the custom format line
- * (by wrapping the name with %).
- *
- * @param string $message The text to associate with the placeholder
- * @param string $name The name of the placeholder
- */
- public function setMessage(string $message, string $name = 'message')
- {
- $this->messages[$name] = $message;
- }
-
- public function getMessage(string $name = 'message')
- {
- return $this->messages[$name];
- }
-
- public function getStartTime(): int
- {
- return $this->startTime;
- }
-
- public function getMaxSteps(): int
- {
- return $this->max;
- }
-
- public function getProgress(): int
- {
- return $this->step;
- }
-
- private function getStepWidth(): int
- {
- return $this->stepWidth;
- }
-
- public function getProgressPercent(): float
- {
- return $this->percent;
- }
-
- public function getBarOffset(): float
- {
- return floor($this->max ? $this->percent * $this->barWidth : (null === $this->redrawFreq ? (int) (min(5, $this->barWidth / 15) * $this->writeCount) : $this->step) % $this->barWidth);
- }
-
- public function getEstimated(): float
- {
- if (!$this->step) {
- return 0;
- }
-
- return round((time() - $this->startTime) / $this->step * $this->max);
- }
-
- public function getRemaining(): float
- {
- if (!$this->step) {
- return 0;
- }
-
- return round((time() - $this->startTime) / $this->step * ($this->max - $this->step));
- }
-
- public function setBarWidth(int $size)
- {
- $this->barWidth = max(1, $size);
- }
-
- public function getBarWidth(): int
- {
- return $this->barWidth;
- }
-
- public function setBarCharacter(string $char)
- {
- $this->barChar = $char;
- }
-
- public function getBarCharacter(): string
- {
- return $this->barChar ?? ($this->max ? '=' : $this->emptyBarChar);
- }
-
- public function setEmptyBarCharacter(string $char)
- {
- $this->emptyBarChar = $char;
- }
-
- public function getEmptyBarCharacter(): string
- {
- return $this->emptyBarChar;
- }
-
- public function setProgressCharacter(string $char)
- {
- $this->progressChar = $char;
- }
-
- public function getProgressCharacter(): string
- {
- return $this->progressChar;
- }
-
- public function setFormat(string $format)
- {
- $this->format = null;
- $this->internalFormat = $format;
- }
-
- /**
- * Sets the redraw frequency.
- *
- * @param int|null $freq The frequency in steps
- */
- public function setRedrawFrequency(?int $freq)
- {
- $this->redrawFreq = null !== $freq ? max(1, $freq) : null;
- }
-
- public function minSecondsBetweenRedraws(float $seconds): void
- {
- $this->minSecondsBetweenRedraws = $seconds;
- }
-
- public function maxSecondsBetweenRedraws(float $seconds): void
- {
- $this->maxSecondsBetweenRedraws = $seconds;
- }
-
- /**
- * Returns an iterator that will automatically update the progress bar when iterated.
- *
- * @param int|null $max Number of steps to complete the bar (0 if indeterminate), if null it will be inferred from $iterable
- */
- public function iterate(iterable $iterable, int $max = null): iterable
- {
- $this->start($max ?? (is_countable($iterable) ? \count($iterable) : 0));
-
- foreach ($iterable as $key => $value) {
- yield $key => $value;
-
- $this->advance();
- }
-
- $this->finish();
- }
-
- /**
- * Starts the progress output.
- *
- * @param int|null $max Number of steps to complete the bar (0 if indeterminate), null to leave unchanged
- */
- public function start(int $max = null)
- {
- $this->startTime = time();
- $this->step = 0;
- $this->percent = 0.0;
-
- if (null !== $max) {
- $this->setMaxSteps($max);
- }
-
- $this->display();
- }
-
- /**
- * Advances the progress output X steps.
- *
- * @param int $step Number of steps to advance
- */
- public function advance(int $step = 1)
- {
- $this->setProgress($this->step + $step);
- }
-
- /**
- * Sets whether to overwrite the progressbar, false for new line.
- */
- public function setOverwrite(bool $overwrite)
- {
- $this->overwrite = $overwrite;
- }
-
- public function setProgress(int $step)
- {
- if ($this->max && $step > $this->max) {
- $this->max = $step;
- } elseif ($step < 0) {
- $step = 0;
- }
-
- $redrawFreq = $this->redrawFreq ?? (($this->max ?: 10) / 10);
- $prevPeriod = (int) ($this->step / $redrawFreq);
- $currPeriod = (int) ($step / $redrawFreq);
- $this->step = $step;
- $this->percent = $this->max ? (float) $this->step / $this->max : 0;
- $timeInterval = microtime(true) - $this->lastWriteTime;
-
- // Draw regardless of other limits
- if ($this->max === $step) {
- $this->display();
-
- return;
- }
-
- // Throttling
- if ($timeInterval < $this->minSecondsBetweenRedraws) {
- return;
- }
-
- // Draw each step period, but not too late
- if ($prevPeriod !== $currPeriod || $timeInterval >= $this->maxSecondsBetweenRedraws) {
- $this->display();
- }
- }
-
- public function setMaxSteps(int $max)
- {
- $this->format = null;
- $this->max = max(0, $max);
- $this->stepWidth = $this->max ? Helper::width((string) $this->max) : 4;
- }
-
- /**
- * Finishes the progress output.
- */
- public function finish(): void
- {
- if (!$this->max) {
- $this->max = $this->step;
- }
-
- if ($this->step === $this->max && !$this->overwrite) {
- // prevent double 100% output
- return;
- }
-
- $this->setProgress($this->max);
- }
-
- /**
- * Outputs the current progress string.
- */
- public function display(): void
- {
- if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) {
- return;
- }
-
- if (null === $this->format) {
- $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat());
- }
-
- $this->overwrite($this->buildLine());
- }
-
- /**
- * Removes the progress bar from the current line.
- *
- * This is useful if you wish to write some output
- * while a progress bar is running.
- * Call display() to show the progress bar again.
- */
- public function clear(): void
- {
- if (!$this->overwrite) {
- return;
- }
-
- if (null === $this->format) {
- $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat());
- }
-
- $this->overwrite('');
- }
-
- private function setRealFormat(string $format)
- {
- // try to use the _nomax variant if available
- if (!$this->max && null !== self::getFormatDefinition($format.'_nomax')) {
- $this->format = self::getFormatDefinition($format.'_nomax');
- } elseif (null !== self::getFormatDefinition($format)) {
- $this->format = self::getFormatDefinition($format);
- } else {
- $this->format = $format;
- }
- }
-
- /**
- * Overwrites a previous message to the output.
- */
- private function overwrite(string $message): void
- {
- if ($this->previousMessage === $message) {
- return;
- }
-
- $originalMessage = $message;
-
- if ($this->overwrite) {
- if (null !== $this->previousMessage) {
- if ($this->output instanceof ConsoleSectionOutput) {
- $messageLines = explode("\n", $this->previousMessage);
- $lineCount = \count($messageLines);
- foreach ($messageLines as $messageLine) {
- $messageLineLength = Helper::width(Helper::removeDecoration($this->output->getFormatter(), $messageLine));
- if ($messageLineLength > $this->terminal->getWidth()) {
- $lineCount += floor($messageLineLength / $this->terminal->getWidth());
- }
- }
- $this->output->clear($lineCount);
- } else {
- $lineCount = substr_count($this->previousMessage, "\n");
- for ($i = 0; $i < $lineCount; ++$i) {
- $this->cursor->moveToColumn(1);
- $this->cursor->clearLine();
- $this->cursor->moveUp();
- }
-
- $this->cursor->moveToColumn(1);
- $this->cursor->clearLine();
- }
- }
- } elseif ($this->step > 0) {
- $message = \PHP_EOL.$message;
- }
-
- $this->previousMessage = $originalMessage;
- $this->lastWriteTime = microtime(true);
-
- $this->output->write($message);
- ++$this->writeCount;
- }
-
- private function determineBestFormat(): string
- {
- switch ($this->output->getVerbosity()) {
- // OutputInterface::VERBOSITY_QUIET: display is disabled anyway
- case OutputInterface::VERBOSITY_VERBOSE:
- return $this->max ? self::FORMAT_VERBOSE : self::FORMAT_VERBOSE_NOMAX;
- case OutputInterface::VERBOSITY_VERY_VERBOSE:
- return $this->max ? self::FORMAT_VERY_VERBOSE : self::FORMAT_VERY_VERBOSE_NOMAX;
- case OutputInterface::VERBOSITY_DEBUG:
- return $this->max ? self::FORMAT_DEBUG : self::FORMAT_DEBUG_NOMAX;
- default:
- return $this->max ? self::FORMAT_NORMAL : self::FORMAT_NORMAL_NOMAX;
- }
- }
-
- private static function initPlaceholderFormatters(): array
- {
- return [
- 'bar' => function (self $bar, OutputInterface $output) {
- $completeBars = $bar->getBarOffset();
- $display = str_repeat($bar->getBarCharacter(), $completeBars);
- if ($completeBars < $bar->getBarWidth()) {
- $emptyBars = $bar->getBarWidth() - $completeBars - Helper::length(Helper::removeDecoration($output->getFormatter(), $bar->getProgressCharacter()));
- $display .= $bar->getProgressCharacter().str_repeat($bar->getEmptyBarCharacter(), $emptyBars);
- }
-
- return $display;
- },
- 'elapsed' => function (self $bar) {
- return Helper::formatTime(time() - $bar->getStartTime());
- },
- 'remaining' => function (self $bar) {
- if (!$bar->getMaxSteps()) {
- throw new LogicException('Unable to display the remaining time if the maximum number of steps is not set.');
- }
-
- return Helper::formatTime($bar->getRemaining());
- },
- 'estimated' => function (self $bar) {
- if (!$bar->getMaxSteps()) {
- throw new LogicException('Unable to display the estimated time if the maximum number of steps is not set.');
- }
-
- return Helper::formatTime($bar->getEstimated());
- },
- 'memory' => function (self $bar) {
- return Helper::formatMemory(memory_get_usage(true));
- },
- 'current' => function (self $bar) {
- return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', \STR_PAD_LEFT);
- },
- 'max' => function (self $bar) {
- return $bar->getMaxSteps();
- },
- 'percent' => function (self $bar) {
- return floor($bar->getProgressPercent() * 100);
- },
- ];
- }
-
- private static function initFormats(): array
- {
- return [
- self::FORMAT_NORMAL => ' %current%/%max% [%bar%] %percent:3s%%',
- self::FORMAT_NORMAL_NOMAX => ' %current% [%bar%]',
-
- self::FORMAT_VERBOSE => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%',
- self::FORMAT_VERBOSE_NOMAX => ' %current% [%bar%] %elapsed:6s%',
-
- self::FORMAT_VERY_VERBOSE => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s%',
- self::FORMAT_VERY_VERBOSE_NOMAX => ' %current% [%bar%] %elapsed:6s%',
-
- self::FORMAT_DEBUG => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%',
- self::FORMAT_DEBUG_NOMAX => ' %current% [%bar%] %elapsed:6s% %memory:6s%',
- ];
- }
-
- private function buildLine(): string
- {
- $regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i";
- $callback = function ($matches) {
- if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) {
- $text = $formatter($this, $this->output);
- } elseif (isset($this->messages[$matches[1]])) {
- $text = $this->messages[$matches[1]];
- } else {
- return $matches[0];
- }
-
- if (isset($matches[2])) {
- $text = sprintf('%'.$matches[2], $text);
- }
-
- return $text;
- };
- $line = preg_replace_callback($regex, $callback, $this->format);
-
- // gets string length for each sub line with multiline format
- $linesLength = array_map(function ($subLine) {
- return Helper::width(Helper::removeDecoration($this->output->getFormatter(), rtrim($subLine, "\r")));
- }, explode("\n", $line));
-
- $linesWidth = max($linesLength);
-
- $terminalWidth = $this->terminal->getWidth();
- if ($linesWidth <= $terminalWidth) {
- return $line;
- }
-
- $this->setBarWidth($this->barWidth - $linesWidth + $terminalWidth);
-
- return preg_replace_callback($regex, $callback, $this->format);
- }
-}
diff --git a/vendor/symfony/console/Helper/ProgressIndicator.php b/vendor/symfony/console/Helper/ProgressIndicator.php
deleted file mode 100644
index 3482343fc..000000000
--- a/vendor/symfony/console/Helper/ProgressIndicator.php
+++ /dev/null
@@ -1,249 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\LogicException;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * @author Kevin Bond
- */
-class ProgressIndicator
-{
- private const FORMATS = [
- 'normal' => ' %indicator% %message%',
- 'normal_no_ansi' => ' %message%',
-
- 'verbose' => ' %indicator% %message% (%elapsed:6s%)',
- 'verbose_no_ansi' => ' %message% (%elapsed:6s%)',
-
- 'very_verbose' => ' %indicator% %message% (%elapsed:6s%, %memory:6s%)',
- 'very_verbose_no_ansi' => ' %message% (%elapsed:6s%, %memory:6s%)',
- ];
-
- private $output;
- private $startTime;
- private $format;
- private $message;
- private $indicatorValues;
- private $indicatorCurrent;
- private $indicatorChangeInterval;
- private $indicatorUpdateTime;
- private $started = false;
-
- /**
- * @var array
- */
- private static $formatters;
-
- /**
- * @param int $indicatorChangeInterval Change interval in milliseconds
- * @param array|null $indicatorValues Animated indicator characters
- */
- public function __construct(OutputInterface $output, string $format = null, int $indicatorChangeInterval = 100, array $indicatorValues = null)
- {
- $this->output = $output;
-
- if (null === $format) {
- $format = $this->determineBestFormat();
- }
-
- if (null === $indicatorValues) {
- $indicatorValues = ['-', '\\', '|', '/'];
- }
-
- $indicatorValues = array_values($indicatorValues);
-
- if (2 > \count($indicatorValues)) {
- throw new InvalidArgumentException('Must have at least 2 indicator value characters.');
- }
-
- $this->format = self::getFormatDefinition($format);
- $this->indicatorChangeInterval = $indicatorChangeInterval;
- $this->indicatorValues = $indicatorValues;
- $this->startTime = time();
- }
-
- /**
- * Sets the current indicator message.
- */
- public function setMessage(?string $message)
- {
- $this->message = $message;
-
- $this->display();
- }
-
- /**
- * Starts the indicator output.
- */
- public function start(string $message)
- {
- if ($this->started) {
- throw new LogicException('Progress indicator already started.');
- }
-
- $this->message = $message;
- $this->started = true;
- $this->startTime = time();
- $this->indicatorUpdateTime = $this->getCurrentTimeInMilliseconds() + $this->indicatorChangeInterval;
- $this->indicatorCurrent = 0;
-
- $this->display();
- }
-
- /**
- * Advances the indicator.
- */
- public function advance()
- {
- if (!$this->started) {
- throw new LogicException('Progress indicator has not yet been started.');
- }
-
- if (!$this->output->isDecorated()) {
- return;
- }
-
- $currentTime = $this->getCurrentTimeInMilliseconds();
-
- if ($currentTime < $this->indicatorUpdateTime) {
- return;
- }
-
- $this->indicatorUpdateTime = $currentTime + $this->indicatorChangeInterval;
- ++$this->indicatorCurrent;
-
- $this->display();
- }
-
- /**
- * Finish the indicator with message.
- *
- * @param $message
- */
- public function finish(string $message)
- {
- if (!$this->started) {
- throw new LogicException('Progress indicator has not yet been started.');
- }
-
- $this->message = $message;
- $this->display();
- $this->output->writeln('');
- $this->started = false;
- }
-
- /**
- * Gets the format for a given name.
- *
- * @return string|null
- */
- public static function getFormatDefinition(string $name)
- {
- return self::FORMATS[$name] ?? null;
- }
-
- /**
- * Sets a placeholder formatter for a given name.
- *
- * This method also allow you to override an existing placeholder.
- */
- public static function setPlaceholderFormatterDefinition(string $name, callable $callable)
- {
- if (!self::$formatters) {
- self::$formatters = self::initPlaceholderFormatters();
- }
-
- self::$formatters[$name] = $callable;
- }
-
- /**
- * Gets the placeholder formatter for a given name (including the delimiter char like %).
- *
- * @return callable|null
- */
- public static function getPlaceholderFormatterDefinition(string $name)
- {
- if (!self::$formatters) {
- self::$formatters = self::initPlaceholderFormatters();
- }
-
- return self::$formatters[$name] ?? null;
- }
-
- private function display()
- {
- if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) {
- return;
- }
-
- $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) {
- if ($formatter = self::getPlaceholderFormatterDefinition($matches[1])) {
- return $formatter($this);
- }
-
- return $matches[0];
- }, $this->format ?? ''));
- }
-
- private function determineBestFormat(): string
- {
- switch ($this->output->getVerbosity()) {
- // OutputInterface::VERBOSITY_QUIET: display is disabled anyway
- case OutputInterface::VERBOSITY_VERBOSE:
- return $this->output->isDecorated() ? 'verbose' : 'verbose_no_ansi';
- case OutputInterface::VERBOSITY_VERY_VERBOSE:
- case OutputInterface::VERBOSITY_DEBUG:
- return $this->output->isDecorated() ? 'very_verbose' : 'very_verbose_no_ansi';
- default:
- return $this->output->isDecorated() ? 'normal' : 'normal_no_ansi';
- }
- }
-
- /**
- * Overwrites a previous message to the output.
- */
- private function overwrite(string $message)
- {
- if ($this->output->isDecorated()) {
- $this->output->write("\x0D\x1B[2K");
- $this->output->write($message);
- } else {
- $this->output->writeln($message);
- }
- }
-
- private function getCurrentTimeInMilliseconds(): float
- {
- return round(microtime(true) * 1000);
- }
-
- private static function initPlaceholderFormatters(): array
- {
- return [
- 'indicator' => function (self $indicator) {
- return $indicator->indicatorValues[$indicator->indicatorCurrent % \count($indicator->indicatorValues)];
- },
- 'message' => function (self $indicator) {
- return $indicator->message;
- },
- 'elapsed' => function (self $indicator) {
- return Helper::formatTime(time() - $indicator->startTime);
- },
- 'memory' => function () {
- return Helper::formatMemory(memory_get_usage(true));
- },
- ];
- }
-}
diff --git a/vendor/symfony/console/Helper/QuestionHelper.php b/vendor/symfony/console/Helper/QuestionHelper.php
deleted file mode 100644
index e236be92a..000000000
--- a/vendor/symfony/console/Helper/QuestionHelper.php
+++ /dev/null
@@ -1,625 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Cursor;
-use Symfony\Component\Console\Exception\MissingInputException;
-use Symfony\Component\Console\Exception\RuntimeException;
-use Symfony\Component\Console\Formatter\OutputFormatter;
-use Symfony\Component\Console\Formatter\OutputFormatterStyle;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\StreamableInputInterface;
-use Symfony\Component\Console\Output\ConsoleOutputInterface;
-use Symfony\Component\Console\Output\ConsoleSectionOutput;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Question\ChoiceQuestion;
-use Symfony\Component\Console\Question\Question;
-use Symfony\Component\Console\Terminal;
-
-use function Symfony\Component\String\s;
-
-/**
- * The QuestionHelper class provides helpers to interact with the user.
- *
- * @author Fabien Potencier
- */
-class QuestionHelper extends Helper
-{
- /**
- * @var resource|null
- */
- private $inputStream;
-
- private static $stty = true;
- private static $stdinIsInteractive;
-
- /**
- * Asks a question to the user.
- *
- * @return mixed The user answer
- *
- * @throws RuntimeException If there is no data to read in the input stream
- */
- public function ask(InputInterface $input, OutputInterface $output, Question $question)
- {
- if ($output instanceof ConsoleOutputInterface) {
- $output = $output->getErrorOutput();
- }
-
- if (!$input->isInteractive()) {
- return $this->getDefaultAnswer($question);
- }
-
- if ($input instanceof StreamableInputInterface && $stream = $input->getStream()) {
- $this->inputStream = $stream;
- }
-
- try {
- if (!$question->getValidator()) {
- return $this->doAsk($output, $question);
- }
-
- $interviewer = function () use ($output, $question) {
- return $this->doAsk($output, $question);
- };
-
- return $this->validateAttempts($interviewer, $output, $question);
- } catch (MissingInputException $exception) {
- $input->setInteractive(false);
-
- if (null === $fallbackOutput = $this->getDefaultAnswer($question)) {
- throw $exception;
- }
-
- return $fallbackOutput;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function getName()
- {
- return 'question';
- }
-
- /**
- * Prevents usage of stty.
- */
- public static function disableStty()
- {
- self::$stty = false;
- }
-
- /**
- * Asks the question to the user.
- *
- * @return mixed
- *
- * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
- */
- private function doAsk(OutputInterface $output, Question $question)
- {
- $this->writePrompt($output, $question);
-
- $inputStream = $this->inputStream ?: \STDIN;
- $autocomplete = $question->getAutocompleterCallback();
-
- if (null === $autocomplete || !self::$stty || !Terminal::hasSttyAvailable()) {
- $ret = false;
- if ($question->isHidden()) {
- try {
- $hiddenResponse = $this->getHiddenResponse($output, $inputStream, $question->isTrimmable());
- $ret = $question->isTrimmable() ? trim($hiddenResponse) : $hiddenResponse;
- } catch (RuntimeException $e) {
- if (!$question->isHiddenFallback()) {
- throw $e;
- }
- }
- }
-
- if (false === $ret) {
- $isBlocked = stream_get_meta_data($inputStream)['blocked'] ?? true;
-
- if (!$isBlocked) {
- stream_set_blocking($inputStream, true);
- }
-
- $ret = $this->readInput($inputStream, $question);
-
- if (!$isBlocked) {
- stream_set_blocking($inputStream, false);
- }
-
- if (false === $ret) {
- throw new MissingInputException('Aborted.');
- }
- if ($question->isTrimmable()) {
- $ret = trim($ret);
- }
- }
- } else {
- $autocomplete = $this->autocomplete($output, $question, $inputStream, $autocomplete);
- $ret = $question->isTrimmable() ? trim($autocomplete) : $autocomplete;
- }
-
- if ($output instanceof ConsoleSectionOutput) {
- $output->addContent($ret);
- }
-
- $ret = \strlen($ret) > 0 ? $ret : $question->getDefault();
-
- if ($normalizer = $question->getNormalizer()) {
- return $normalizer($ret);
- }
-
- return $ret;
- }
-
- /**
- * @return mixed
- */
- private function getDefaultAnswer(Question $question)
- {
- $default = $question->getDefault();
-
- if (null === $default) {
- return $default;
- }
-
- if ($validator = $question->getValidator()) {
- return \call_user_func($question->getValidator(), $default);
- } elseif ($question instanceof ChoiceQuestion) {
- $choices = $question->getChoices();
-
- if (!$question->isMultiselect()) {
- return $choices[$default] ?? $default;
- }
-
- $default = explode(',', $default);
- foreach ($default as $k => $v) {
- $v = $question->isTrimmable() ? trim($v) : $v;
- $default[$k] = $choices[$v] ?? $v;
- }
- }
-
- return $default;
- }
-
- /**
- * Outputs the question prompt.
- */
- protected function writePrompt(OutputInterface $output, Question $question)
- {
- $message = $question->getQuestion();
-
- if ($question instanceof ChoiceQuestion) {
- $output->writeln(array_merge([
- $question->getQuestion(),
- ], $this->formatChoiceQuestionChoices($question, 'info')));
-
- $message = $question->getPrompt();
- }
-
- $output->write($message);
- }
-
- /**
- * @return string[]
- */
- protected function formatChoiceQuestionChoices(ChoiceQuestion $question, string $tag)
- {
- $messages = [];
-
- $maxWidth = max(array_map([__CLASS__, 'width'], array_keys($choices = $question->getChoices())));
-
- foreach ($choices as $key => $value) {
- $padding = str_repeat(' ', $maxWidth - self::width($key));
-
- $messages[] = sprintf(" [<$tag>%s$padding$tag>] %s", $key, $value);
- }
-
- return $messages;
- }
-
- /**
- * Outputs an error message.
- */
- protected function writeError(OutputInterface $output, \Exception $error)
- {
- if (null !== $this->getHelperSet() && $this->getHelperSet()->has('formatter')) {
- $message = $this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error');
- } else {
- $message = ''.$error->getMessage().'';
- }
-
- $output->writeln($message);
- }
-
- /**
- * Autocompletes a question.
- *
- * @param resource $inputStream
- */
- private function autocomplete(OutputInterface $output, Question $question, $inputStream, callable $autocomplete): string
- {
- $cursor = new Cursor($output, $inputStream);
-
- $fullChoice = '';
- $ret = '';
-
- $i = 0;
- $ofs = -1;
- $matches = $autocomplete($ret);
- $numMatches = \count($matches);
-
- $sttyMode = shell_exec('stty -g');
- $isStdin = 'php://stdin' === (stream_get_meta_data($inputStream)['uri'] ?? null);
- $r = [$inputStream];
- $w = [];
-
- // Disable icanon (so we can fread each keypress) and echo (we'll do echoing here instead)
- shell_exec('stty -icanon -echo');
-
- // Add highlighted text style
- $output->getFormatter()->setStyle('hl', new OutputFormatterStyle('black', 'white'));
-
- // Read a keypress
- while (!feof($inputStream)) {
- while ($isStdin && 0 === @stream_select($r, $w, $w, 0, 100)) {
- // Give signal handlers a chance to run
- $r = [$inputStream];
- }
- $c = fread($inputStream, 1);
-
- // as opposed to fgets(), fread() returns an empty string when the stream content is empty, not false.
- if (false === $c || ('' === $ret && '' === $c && null === $question->getDefault())) {
- shell_exec('stty '.$sttyMode);
- throw new MissingInputException('Aborted.');
- } elseif ("\177" === $c) { // Backspace Character
- if (0 === $numMatches && 0 !== $i) {
- --$i;
- $cursor->moveLeft(s($fullChoice)->slice(-1)->width(false));
-
- $fullChoice = self::substr($fullChoice, 0, $i);
- }
-
- if (0 === $i) {
- $ofs = -1;
- $matches = $autocomplete($ret);
- $numMatches = \count($matches);
- } else {
- $numMatches = 0;
- }
-
- // Pop the last character off the end of our string
- $ret = self::substr($ret, 0, $i);
- } elseif ("\033" === $c) {
- // Did we read an escape sequence?
- $c .= fread($inputStream, 2);
-
- // A = Up Arrow. B = Down Arrow
- if (isset($c[2]) && ('A' === $c[2] || 'B' === $c[2])) {
- if ('A' === $c[2] && -1 === $ofs) {
- $ofs = 0;
- }
-
- if (0 === $numMatches) {
- continue;
- }
-
- $ofs += ('A' === $c[2]) ? -1 : 1;
- $ofs = ($numMatches + $ofs) % $numMatches;
- }
- } elseif (\ord($c) < 32) {
- if ("\t" === $c || "\n" === $c) {
- if ($numMatches > 0 && -1 !== $ofs) {
- $ret = (string) $matches[$ofs];
- // Echo out remaining chars for current match
- $remainingCharacters = substr($ret, \strlen(trim($this->mostRecentlyEnteredValue($fullChoice))));
- $output->write($remainingCharacters);
- $fullChoice .= $remainingCharacters;
- $i = (false === $encoding = mb_detect_encoding($fullChoice, null, true)) ? \strlen($fullChoice) : mb_strlen($fullChoice, $encoding);
-
- $matches = array_filter(
- $autocomplete($ret),
- function ($match) use ($ret) {
- return '' === $ret || str_starts_with($match, $ret);
- }
- );
- $numMatches = \count($matches);
- $ofs = -1;
- }
-
- if ("\n" === $c) {
- $output->write($c);
- break;
- }
-
- $numMatches = 0;
- }
-
- continue;
- } else {
- if ("\x80" <= $c) {
- $c .= fread($inputStream, ["\xC0" => 1, "\xD0" => 1, "\xE0" => 2, "\xF0" => 3][$c & "\xF0"]);
- }
-
- $output->write($c);
- $ret .= $c;
- $fullChoice .= $c;
- ++$i;
-
- $tempRet = $ret;
-
- if ($question instanceof ChoiceQuestion && $question->isMultiselect()) {
- $tempRet = $this->mostRecentlyEnteredValue($fullChoice);
- }
-
- $numMatches = 0;
- $ofs = 0;
-
- foreach ($autocomplete($ret) as $value) {
- // If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle)
- if (str_starts_with($value, $tempRet)) {
- $matches[$numMatches++] = $value;
- }
- }
- }
-
- $cursor->clearLineAfter();
-
- if ($numMatches > 0 && -1 !== $ofs) {
- $cursor->savePosition();
- // Write highlighted text, complete the partially entered response
- $charactersEntered = \strlen(trim($this->mostRecentlyEnteredValue($fullChoice)));
- $output->write(''.OutputFormatter::escapeTrailingBackslash(substr($matches[$ofs], $charactersEntered)).'');
- $cursor->restorePosition();
- }
- }
-
- // Reset stty so it behaves normally again
- shell_exec('stty '.$sttyMode);
-
- return $fullChoice;
- }
-
- private function mostRecentlyEnteredValue(string $entered): string
- {
- // Determine the most recent value that the user entered
- if (!str_contains($entered, ',')) {
- return $entered;
- }
-
- $choices = explode(',', $entered);
- if ('' !== $lastChoice = trim($choices[\count($choices) - 1])) {
- return $lastChoice;
- }
-
- return $entered;
- }
-
- /**
- * Gets a hidden response from user.
- *
- * @param resource $inputStream The handler resource
- * @param bool $trimmable Is the answer trimmable
- *
- * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
- */
- private function getHiddenResponse(OutputInterface $output, $inputStream, bool $trimmable = true): string
- {
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $exe = __DIR__.'/../Resources/bin/hiddeninput.exe';
-
- // handle code running from a phar
- if ('phar:' === substr(__FILE__, 0, 5)) {
- $tmpExe = sys_get_temp_dir().'/hiddeninput.exe';
- copy($exe, $tmpExe);
- $exe = $tmpExe;
- }
-
- $sExec = shell_exec('"'.$exe.'"');
- $value = $trimmable ? rtrim($sExec) : $sExec;
- $output->writeln('');
-
- if (isset($tmpExe)) {
- unlink($tmpExe);
- }
-
- return $value;
- }
-
- if (self::$stty && Terminal::hasSttyAvailable()) {
- $sttyMode = shell_exec('stty -g');
- shell_exec('stty -echo');
- } elseif ($this->isInteractiveInput($inputStream)) {
- throw new RuntimeException('Unable to hide the response.');
- }
-
- $value = fgets($inputStream, 4096);
-
- if (self::$stty && Terminal::hasSttyAvailable()) {
- shell_exec('stty '.$sttyMode);
- }
-
- if (false === $value) {
- throw new MissingInputException('Aborted.');
- }
- if ($trimmable) {
- $value = trim($value);
- }
- $output->writeln('');
-
- return $value;
- }
-
- /**
- * Validates an attempt.
- *
- * @param callable $interviewer A callable that will ask for a question and return the result
- *
- * @return mixed The validated response
- *
- * @throws \Exception In case the max number of attempts has been reached and no valid response has been given
- */
- private function validateAttempts(callable $interviewer, OutputInterface $output, Question $question)
- {
- $error = null;
- $attempts = $question->getMaxAttempts();
-
- while (null === $attempts || $attempts--) {
- if (null !== $error) {
- $this->writeError($output, $error);
- }
-
- try {
- return $question->getValidator()($interviewer());
- } catch (RuntimeException $e) {
- throw $e;
- } catch (\Exception $error) {
- }
- }
-
- throw $error;
- }
-
- private function isInteractiveInput($inputStream): bool
- {
- if ('php://stdin' !== (stream_get_meta_data($inputStream)['uri'] ?? null)) {
- return false;
- }
-
- if (null !== self::$stdinIsInteractive) {
- return self::$stdinIsInteractive;
- }
-
- if (\function_exists('stream_isatty')) {
- return self::$stdinIsInteractive = @stream_isatty(fopen('php://stdin', 'r'));
- }
-
- if (\function_exists('posix_isatty')) {
- return self::$stdinIsInteractive = @posix_isatty(fopen('php://stdin', 'r'));
- }
-
- if (!\function_exists('shell_exec')) {
- return self::$stdinIsInteractive = true;
- }
-
- return self::$stdinIsInteractive = (bool) shell_exec('stty 2> '.('\\' === \DIRECTORY_SEPARATOR ? 'NUL' : '/dev/null'));
- }
-
- /**
- * Reads one or more lines of input and returns what is read.
- *
- * @param resource $inputStream The handler resource
- * @param Question $question The question being asked
- *
- * @return string|false The input received, false in case input could not be read
- */
- private function readInput($inputStream, Question $question)
- {
- if (!$question->isMultiline()) {
- $cp = $this->setIOCodepage();
- $ret = fgets($inputStream, 4096);
-
- return $this->resetIOCodepage($cp, $ret);
- }
-
- $multiLineStreamReader = $this->cloneInputStream($inputStream);
- if (null === $multiLineStreamReader) {
- return false;
- }
-
- $ret = '';
- $cp = $this->setIOCodepage();
- while (false !== ($char = fgetc($multiLineStreamReader))) {
- if (\PHP_EOL === "{$ret}{$char}") {
- break;
- }
- $ret .= $char;
- }
-
- return $this->resetIOCodepage($cp, $ret);
- }
-
- /**
- * Sets console I/O to the host code page.
- *
- * @return int Previous code page in IBM/EBCDIC format
- */
- private function setIOCodepage(): int
- {
- if (\function_exists('sapi_windows_cp_set')) {
- $cp = sapi_windows_cp_get();
- sapi_windows_cp_set(sapi_windows_cp_get('oem'));
-
- return $cp;
- }
-
- return 0;
- }
-
- /**
- * Sets console I/O to the specified code page and converts the user input.
- *
- * @param string|false $input
- *
- * @return string|false
- */
- private function resetIOCodepage(int $cp, $input)
- {
- if (0 !== $cp) {
- sapi_windows_cp_set($cp);
-
- if (false !== $input && '' !== $input) {
- $input = sapi_windows_cp_conv(sapi_windows_cp_get('oem'), $cp, $input);
- }
- }
-
- return $input;
- }
-
- /**
- * Clones an input stream in order to act on one instance of the same
- * stream without affecting the other instance.
- *
- * @param resource $inputStream The handler resource
- *
- * @return resource|null The cloned resource, null in case it could not be cloned
- */
- private function cloneInputStream($inputStream)
- {
- $streamMetaData = stream_get_meta_data($inputStream);
- $seekable = $streamMetaData['seekable'] ?? false;
- $mode = $streamMetaData['mode'] ?? 'rb';
- $uri = $streamMetaData['uri'] ?? null;
-
- if (null === $uri) {
- return null;
- }
-
- $cloneStream = fopen($uri, $mode);
-
- // For seekable and writable streams, add all the same data to the
- // cloned stream and then seek to the same offset.
- if (true === $seekable && !\in_array($mode, ['r', 'rb', 'rt'])) {
- $offset = ftell($inputStream);
- rewind($inputStream);
- stream_copy_to_stream($inputStream, $cloneStream);
- fseek($inputStream, $offset);
- fseek($cloneStream, $offset);
- }
-
- return $cloneStream;
- }
-}
diff --git a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php
deleted file mode 100644
index 01f94aba4..000000000
--- a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php
+++ /dev/null
@@ -1,109 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Formatter\OutputFormatter;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Question\ChoiceQuestion;
-use Symfony\Component\Console\Question\ConfirmationQuestion;
-use Symfony\Component\Console\Question\Question;
-use Symfony\Component\Console\Style\SymfonyStyle;
-
-/**
- * Symfony Style Guide compliant question helper.
- *
- * @author Kevin Bond
- */
-class SymfonyQuestionHelper extends QuestionHelper
-{
- /**
- * {@inheritdoc}
- */
- protected function writePrompt(OutputInterface $output, Question $question)
- {
- $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion());
- $default = $question->getDefault();
-
- if ($question->isMultiline()) {
- $text .= sprintf(' (press %s to continue)', $this->getEofShortcut());
- }
-
- switch (true) {
- case null === $default:
- $text = sprintf(' %s:', $text);
-
- break;
-
- case $question instanceof ConfirmationQuestion:
- $text = sprintf(' %s (yes/no) [%s]:', $text, $default ? 'yes' : 'no');
-
- break;
-
- case $question instanceof ChoiceQuestion && $question->isMultiselect():
- $choices = $question->getChoices();
- $default = explode(',', $default);
-
- foreach ($default as $key => $value) {
- $default[$key] = $choices[trim($value)];
- }
-
- $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape(implode(', ', $default)));
-
- break;
-
- case $question instanceof ChoiceQuestion:
- $choices = $question->getChoices();
- $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape($choices[$default] ?? $default));
-
- break;
-
- default:
- $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape($default));
- }
-
- $output->writeln($text);
-
- $prompt = ' > ';
-
- if ($question instanceof ChoiceQuestion) {
- $output->writeln($this->formatChoiceQuestionChoices($question, 'comment'));
-
- $prompt = $question->getPrompt();
- }
-
- $output->write($prompt);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function writeError(OutputInterface $output, \Exception $error)
- {
- if ($output instanceof SymfonyStyle) {
- $output->newLine();
- $output->error($error->getMessage());
-
- return;
- }
-
- parent::writeError($output, $error);
- }
-
- private function getEofShortcut(): string
- {
- if ('Windows' === \PHP_OS_FAMILY) {
- return 'Ctrl+Z then Enter';
- }
-
- return 'Ctrl+D';
- }
-}
diff --git a/vendor/symfony/console/Helper/Table.php b/vendor/symfony/console/Helper/Table.php
deleted file mode 100644
index 5c3447ab3..000000000
--- a/vendor/symfony/console/Helper/Table.php
+++ /dev/null
@@ -1,915 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\RuntimeException;
-use Symfony\Component\Console\Formatter\OutputFormatter;
-use Symfony\Component\Console\Formatter\WrappableOutputFormatterInterface;
-use Symfony\Component\Console\Output\ConsoleSectionOutput;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * Provides helpers to display a table.
- *
- * @author Fabien Potencier
- * @author Саша Стаменковић
- * @author Abdellatif Ait boudad
- * @author Max Grigorian
- * @author Dany Maillard
- */
-class Table
-{
- private const SEPARATOR_TOP = 0;
- private const SEPARATOR_TOP_BOTTOM = 1;
- private const SEPARATOR_MID = 2;
- private const SEPARATOR_BOTTOM = 3;
- private const BORDER_OUTSIDE = 0;
- private const BORDER_INSIDE = 1;
-
- private $headerTitle;
- private $footerTitle;
-
- /**
- * Table headers.
- */
- private $headers = [];
-
- /**
- * Table rows.
- */
- private $rows = [];
- private $horizontal = false;
-
- /**
- * Column widths cache.
- */
- private $effectiveColumnWidths = [];
-
- /**
- * Number of columns cache.
- *
- * @var int
- */
- private $numberOfColumns;
-
- /**
- * @var OutputInterface
- */
- private $output;
-
- /**
- * @var TableStyle
- */
- private $style;
-
- /**
- * @var array
- */
- private $columnStyles = [];
-
- /**
- * User set column widths.
- *
- * @var array
- */
- private $columnWidths = [];
- private $columnMaxWidths = [];
-
- /**
- * @var array|null
- */
- private static $styles;
-
- private $rendered = false;
-
- public function __construct(OutputInterface $output)
- {
- $this->output = $output;
-
- if (!self::$styles) {
- self::$styles = self::initStyles();
- }
-
- $this->setStyle('default');
- }
-
- /**
- * Sets a style definition.
- */
- public static function setStyleDefinition(string $name, TableStyle $style)
- {
- if (!self::$styles) {
- self::$styles = self::initStyles();
- }
-
- self::$styles[$name] = $style;
- }
-
- /**
- * Gets a style definition by name.
- *
- * @return TableStyle
- */
- public static function getStyleDefinition(string $name)
- {
- if (!self::$styles) {
- self::$styles = self::initStyles();
- }
-
- if (isset(self::$styles[$name])) {
- return self::$styles[$name];
- }
-
- throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
- }
-
- /**
- * Sets table style.
- *
- * @param TableStyle|string $name The style name or a TableStyle instance
- *
- * @return $this
- */
- public function setStyle($name)
- {
- $this->style = $this->resolveStyle($name);
-
- return $this;
- }
-
- /**
- * Gets the current table style.
- *
- * @return TableStyle
- */
- public function getStyle()
- {
- return $this->style;
- }
-
- /**
- * Sets table column style.
- *
- * @param TableStyle|string $name The style name or a TableStyle instance
- *
- * @return $this
- */
- public function setColumnStyle(int $columnIndex, $name)
- {
- $this->columnStyles[$columnIndex] = $this->resolveStyle($name);
-
- return $this;
- }
-
- /**
- * Gets the current style for a column.
- *
- * If style was not set, it returns the global table style.
- *
- * @return TableStyle
- */
- public function getColumnStyle(int $columnIndex)
- {
- return $this->columnStyles[$columnIndex] ?? $this->getStyle();
- }
-
- /**
- * Sets the minimum width of a column.
- *
- * @return $this
- */
- public function setColumnWidth(int $columnIndex, int $width)
- {
- $this->columnWidths[$columnIndex] = $width;
-
- return $this;
- }
-
- /**
- * Sets the minimum width of all columns.
- *
- * @return $this
- */
- public function setColumnWidths(array $widths)
- {
- $this->columnWidths = [];
- foreach ($widths as $index => $width) {
- $this->setColumnWidth($index, $width);
- }
-
- return $this;
- }
-
- /**
- * Sets the maximum width of a column.
- *
- * Any cell within this column which contents exceeds the specified width will be wrapped into multiple lines, while
- * formatted strings are preserved.
- *
- * @return $this
- */
- public function setColumnMaxWidth(int $columnIndex, int $width): self
- {
- if (!$this->output->getFormatter() instanceof WrappableOutputFormatterInterface) {
- throw new \LogicException(sprintf('Setting a maximum column width is only supported when using a "%s" formatter, got "%s".', WrappableOutputFormatterInterface::class, get_debug_type($this->output->getFormatter())));
- }
-
- $this->columnMaxWidths[$columnIndex] = $width;
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function setHeaders(array $headers)
- {
- $headers = array_values($headers);
- if (!empty($headers) && !\is_array($headers[0])) {
- $headers = [$headers];
- }
-
- $this->headers = $headers;
-
- return $this;
- }
-
- public function setRows(array $rows)
- {
- $this->rows = [];
-
- return $this->addRows($rows);
- }
-
- /**
- * @return $this
- */
- public function addRows(array $rows)
- {
- foreach ($rows as $row) {
- $this->addRow($row);
- }
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function addRow($row)
- {
- if ($row instanceof TableSeparator) {
- $this->rows[] = $row;
-
- return $this;
- }
-
- if (!\is_array($row)) {
- throw new InvalidArgumentException('A row must be an array or a TableSeparator instance.');
- }
-
- $this->rows[] = array_values($row);
-
- return $this;
- }
-
- /**
- * Adds a row to the table, and re-renders the table.
- *
- * @return $this
- */
- public function appendRow($row): self
- {
- if (!$this->output instanceof ConsoleSectionOutput) {
- throw new RuntimeException(sprintf('Output should be an instance of "%s" when calling "%s".', ConsoleSectionOutput::class, __METHOD__));
- }
-
- if ($this->rendered) {
- $this->output->clear($this->calculateRowCount());
- }
-
- $this->addRow($row);
- $this->render();
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function setRow($column, array $row)
- {
- $this->rows[$column] = $row;
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function setHeaderTitle(?string $title): self
- {
- $this->headerTitle = $title;
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function setFooterTitle(?string $title): self
- {
- $this->footerTitle = $title;
-
- return $this;
- }
-
- /**
- * @return $this
- */
- public function setHorizontal(bool $horizontal = true): self
- {
- $this->horizontal = $horizontal;
-
- return $this;
- }
-
- /**
- * Renders table to output.
- *
- * Example:
- *
- * +---------------+-----------------------+------------------+
- * | ISBN | Title | Author |
- * +---------------+-----------------------+------------------+
- * | 99921-58-10-7 | Divine Comedy | Dante Alighieri |
- * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
- * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
- * +---------------+-----------------------+------------------+
- */
- public function render()
- {
- $divider = new TableSeparator();
- if ($this->horizontal) {
- $rows = [];
- foreach ($this->headers[0] ?? [] as $i => $header) {
- $rows[$i] = [$header];
- foreach ($this->rows as $row) {
- if ($row instanceof TableSeparator) {
- continue;
- }
- if (isset($row[$i])) {
- $rows[$i][] = $row[$i];
- } elseif ($rows[$i][0] instanceof TableCell && $rows[$i][0]->getColspan() >= 2) {
- // Noop, there is a "title"
- } else {
- $rows[$i][] = null;
- }
- }
- }
- } else {
- $rows = array_merge($this->headers, [$divider], $this->rows);
- }
-
- $this->calculateNumberOfColumns($rows);
-
- $rowGroups = $this->buildTableRows($rows);
- $this->calculateColumnsWidth($rowGroups);
-
- $isHeader = !$this->horizontal;
- $isFirstRow = $this->horizontal;
- $hasTitle = (bool) $this->headerTitle;
-
- foreach ($rowGroups as $rowGroup) {
- $isHeaderSeparatorRendered = false;
-
- foreach ($rowGroup as $row) {
- if ($divider === $row) {
- $isHeader = false;
- $isFirstRow = true;
-
- continue;
- }
-
- if ($row instanceof TableSeparator) {
- $this->renderRowSeparator();
-
- continue;
- }
-
- if (!$row) {
- continue;
- }
-
- if ($isHeader && !$isHeaderSeparatorRendered) {
- $this->renderRowSeparator(
- $isHeader ? self::SEPARATOR_TOP : self::SEPARATOR_TOP_BOTTOM,
- $hasTitle ? $this->headerTitle : null,
- $hasTitle ? $this->style->getHeaderTitleFormat() : null
- );
- $hasTitle = false;
- $isHeaderSeparatorRendered = true;
- }
-
- if ($isFirstRow) {
- $this->renderRowSeparator(
- $isHeader ? self::SEPARATOR_TOP : self::SEPARATOR_TOP_BOTTOM,
- $hasTitle ? $this->headerTitle : null,
- $hasTitle ? $this->style->getHeaderTitleFormat() : null
- );
- $isFirstRow = false;
- $hasTitle = false;
- }
-
- if ($this->horizontal) {
- $this->renderRow($row, $this->style->getCellRowFormat(), $this->style->getCellHeaderFormat());
- } else {
- $this->renderRow($row, $isHeader ? $this->style->getCellHeaderFormat() : $this->style->getCellRowFormat());
- }
- }
- }
- $this->renderRowSeparator(self::SEPARATOR_BOTTOM, $this->footerTitle, $this->style->getFooterTitleFormat());
-
- $this->cleanup();
- $this->rendered = true;
- }
-
- /**
- * Renders horizontal header separator.
- *
- * Example:
- *
- * +-----+-----------+-------+
- */
- private function renderRowSeparator(int $type = self::SEPARATOR_MID, string $title = null, string $titleFormat = null)
- {
- if (0 === $count = $this->numberOfColumns) {
- return;
- }
-
- $borders = $this->style->getBorderChars();
- if (!$borders[0] && !$borders[2] && !$this->style->getCrossingChar()) {
- return;
- }
-
- $crossings = $this->style->getCrossingChars();
- if (self::SEPARATOR_MID === $type) {
- [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[2], $crossings[8], $crossings[0], $crossings[4]];
- } elseif (self::SEPARATOR_TOP === $type) {
- [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[1], $crossings[2], $crossings[3]];
- } elseif (self::SEPARATOR_TOP_BOTTOM === $type) {
- [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[9], $crossings[10], $crossings[11]];
- } else {
- [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[7], $crossings[6], $crossings[5]];
- }
-
- $markup = $leftChar;
- for ($column = 0; $column < $count; ++$column) {
- $markup .= str_repeat($horizontal, $this->effectiveColumnWidths[$column]);
- $markup .= $column === $count - 1 ? $rightChar : $midChar;
- }
-
- if (null !== $title) {
- $titleLength = Helper::width(Helper::removeDecoration($formatter = $this->output->getFormatter(), $formattedTitle = sprintf($titleFormat, $title)));
- $markupLength = Helper::width($markup);
- if ($titleLength > $limit = $markupLength - 4) {
- $titleLength = $limit;
- $formatLength = Helper::width(Helper::removeDecoration($formatter, sprintf($titleFormat, '')));
- $formattedTitle = sprintf($titleFormat, Helper::substr($title, 0, $limit - $formatLength - 3).'...');
- }
-
- $titleStart = intdiv($markupLength - $titleLength, 2);
- if (false === mb_detect_encoding($markup, null, true)) {
- $markup = substr_replace($markup, $formattedTitle, $titleStart, $titleLength);
- } else {
- $markup = mb_substr($markup, 0, $titleStart).$formattedTitle.mb_substr($markup, $titleStart + $titleLength);
- }
- }
-
- $this->output->writeln(sprintf($this->style->getBorderFormat(), $markup));
- }
-
- /**
- * Renders vertical column separator.
- */
- private function renderColumnSeparator(int $type = self::BORDER_OUTSIDE): string
- {
- $borders = $this->style->getBorderChars();
-
- return sprintf($this->style->getBorderFormat(), self::BORDER_OUTSIDE === $type ? $borders[1] : $borders[3]);
- }
-
- /**
- * Renders table row.
- *
- * Example:
- *
- * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
- */
- private function renderRow(array $row, string $cellFormat, string $firstCellFormat = null)
- {
- $rowContent = $this->renderColumnSeparator(self::BORDER_OUTSIDE);
- $columns = $this->getRowColumns($row);
- $last = \count($columns) - 1;
- foreach ($columns as $i => $column) {
- if ($firstCellFormat && 0 === $i) {
- $rowContent .= $this->renderCell($row, $column, $firstCellFormat);
- } else {
- $rowContent .= $this->renderCell($row, $column, $cellFormat);
- }
- $rowContent .= $this->renderColumnSeparator($last === $i ? self::BORDER_OUTSIDE : self::BORDER_INSIDE);
- }
- $this->output->writeln($rowContent);
- }
-
- /**
- * Renders table cell with padding.
- */
- private function renderCell(array $row, int $column, string $cellFormat): string
- {
- $cell = $row[$column] ?? '';
- $width = $this->effectiveColumnWidths[$column];
- if ($cell instanceof TableCell && $cell->getColspan() > 1) {
- // add the width of the following columns(numbers of colspan).
- foreach (range($column + 1, $column + $cell->getColspan() - 1) as $nextColumn) {
- $width += $this->getColumnSeparatorWidth() + $this->effectiveColumnWidths[$nextColumn];
- }
- }
-
- // str_pad won't work properly with multi-byte strings, we need to fix the padding
- if (false !== $encoding = mb_detect_encoding($cell, null, true)) {
- $width += \strlen($cell) - mb_strwidth($cell, $encoding);
- }
-
- $style = $this->getColumnStyle($column);
-
- if ($cell instanceof TableSeparator) {
- return sprintf($style->getBorderFormat(), str_repeat($style->getBorderChars()[2], $width));
- }
-
- $width += Helper::length($cell) - Helper::length(Helper::removeDecoration($this->output->getFormatter(), $cell));
- $content = sprintf($style->getCellRowContentFormat(), $cell);
-
- $padType = $style->getPadType();
- if ($cell instanceof TableCell && $cell->getStyle() instanceof TableCellStyle) {
- $isNotStyledByTag = !preg_match('/^<(\w+|(\w+=[\w,]+;?)*)>.+<\/(\w+|(\w+=\w+;?)*)?>$/', $cell);
- if ($isNotStyledByTag) {
- $cellFormat = $cell->getStyle()->getCellFormat();
- if (!\is_string($cellFormat)) {
- $tag = http_build_query($cell->getStyle()->getTagOptions(), '', ';');
- $cellFormat = '<'.$tag.'>%s>';
- }
-
- if (strstr($content, '>')) {
- $content = str_replace('>', '', $content);
- $width -= 3;
- }
- if (strstr($content, '')) {
- $content = str_replace('', '', $content);
- $width -= \strlen('');
- }
- }
-
- $padType = $cell->getStyle()->getPadByAlign();
- }
-
- return sprintf($cellFormat, str_pad($content, $width, $style->getPaddingChar(), $padType));
- }
-
- /**
- * Calculate number of columns for this table.
- */
- private function calculateNumberOfColumns(array $rows)
- {
- $columns = [0];
- foreach ($rows as $row) {
- if ($row instanceof TableSeparator) {
- continue;
- }
-
- $columns[] = $this->getNumberOfColumns($row);
- }
-
- $this->numberOfColumns = max($columns);
- }
-
- private function buildTableRows(array $rows): TableRows
- {
- /** @var WrappableOutputFormatterInterface $formatter */
- $formatter = $this->output->getFormatter();
- $unmergedRows = [];
- for ($rowKey = 0; $rowKey < \count($rows); ++$rowKey) {
- $rows = $this->fillNextRows($rows, $rowKey);
-
- // Remove any new line breaks and replace it with a new line
- foreach ($rows[$rowKey] as $column => $cell) {
- $colspan = $cell instanceof TableCell ? $cell->getColspan() : 1;
-
- if (isset($this->columnMaxWidths[$column]) && Helper::width(Helper::removeDecoration($formatter, $cell)) > $this->columnMaxWidths[$column]) {
- $cell = $formatter->formatAndWrap($cell, $this->columnMaxWidths[$column] * $colspan);
- }
- if (!strstr($cell ?? '', "\n")) {
- continue;
- }
- $escaped = implode("\n", array_map([OutputFormatter::class, 'escapeTrailingBackslash'], explode("\n", $cell)));
- $cell = $cell instanceof TableCell ? new TableCell($escaped, ['colspan' => $cell->getColspan()]) : $escaped;
- $lines = explode("\n", str_replace("\n", ">\n", $cell));
- foreach ($lines as $lineKey => $line) {
- if ($colspan > 1) {
- $line = new TableCell($line, ['colspan' => $colspan]);
- }
- if (0 === $lineKey) {
- $rows[$rowKey][$column] = $line;
- } else {
- if (!\array_key_exists($rowKey, $unmergedRows) || !\array_key_exists($lineKey, $unmergedRows[$rowKey])) {
- $unmergedRows[$rowKey][$lineKey] = $this->copyRow($rows, $rowKey);
- }
- $unmergedRows[$rowKey][$lineKey][$column] = $line;
- }
- }
- }
- }
-
- return new TableRows(function () use ($rows, $unmergedRows): \Traversable {
- foreach ($rows as $rowKey => $row) {
- $rowGroup = [$row instanceof TableSeparator ? $row : $this->fillCells($row)];
-
- if (isset($unmergedRows[$rowKey])) {
- foreach ($unmergedRows[$rowKey] as $row) {
- $rowGroup[] = $row instanceof TableSeparator ? $row : $this->fillCells($row);
- }
- }
- yield $rowGroup;
- }
- });
- }
-
- private function calculateRowCount(): int
- {
- $numberOfRows = \count(iterator_to_array($this->buildTableRows(array_merge($this->headers, [new TableSeparator()], $this->rows))));
-
- if ($this->headers) {
- ++$numberOfRows; // Add row for header separator
- }
-
- if (\count($this->rows) > 0) {
- ++$numberOfRows; // Add row for footer separator
- }
-
- return $numberOfRows;
- }
-
- /**
- * fill rows that contains rowspan > 1.
- *
- * @throws InvalidArgumentException
- */
- private function fillNextRows(array $rows, int $line): array
- {
- $unmergedRows = [];
- foreach ($rows[$line] as $column => $cell) {
- if (null !== $cell && !$cell instanceof TableCell && !\is_scalar($cell) && !(\is_object($cell) && method_exists($cell, '__toString'))) {
- throw new InvalidArgumentException(sprintf('A cell must be a TableCell, a scalar or an object implementing "__toString()", "%s" given.', get_debug_type($cell)));
- }
- if ($cell instanceof TableCell && $cell->getRowspan() > 1) {
- $nbLines = $cell->getRowspan() - 1;
- $lines = [$cell];
- if (strstr($cell, "\n")) {
- $lines = explode("\n", str_replace("\n", "\n>", $cell));
- $nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines;
-
- $rows[$line][$column] = new TableCell($lines[0], ['colspan' => $cell->getColspan(), 'style' => $cell->getStyle()]);
- unset($lines[0]);
- }
-
- // create a two dimensional array (rowspan x colspan)
- $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, []), $unmergedRows);
- foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
- $value = $lines[$unmergedRowKey - $line] ?? '';
- $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, ['colspan' => $cell->getColspan(), 'style' => $cell->getStyle()]);
- if ($nbLines === $unmergedRowKey - $line) {
- break;
- }
- }
- }
- }
-
- foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
- // we need to know if $unmergedRow will be merged or inserted into $rows
- if (isset($rows[$unmergedRowKey]) && \is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) {
- foreach ($unmergedRow as $cellKey => $cell) {
- // insert cell into row at cellKey position
- array_splice($rows[$unmergedRowKey], $cellKey, 0, [$cell]);
- }
- } else {
- $row = $this->copyRow($rows, $unmergedRowKey - 1);
- foreach ($unmergedRow as $column => $cell) {
- if (!empty($cell)) {
- $row[$column] = $unmergedRow[$column];
- }
- }
- array_splice($rows, $unmergedRowKey, 0, [$row]);
- }
- }
-
- return $rows;
- }
-
- /**
- * fill cells for a row that contains colspan > 1.
- */
- private function fillCells(iterable $row)
- {
- $newRow = [];
-
- foreach ($row as $column => $cell) {
- $newRow[] = $cell;
- if ($cell instanceof TableCell && $cell->getColspan() > 1) {
- foreach (range($column + 1, $column + $cell->getColspan() - 1) as $position) {
- // insert empty value at column position
- $newRow[] = '';
- }
- }
- }
-
- return $newRow ?: $row;
- }
-
- private function copyRow(array $rows, int $line): array
- {
- $row = $rows[$line];
- foreach ($row as $cellKey => $cellValue) {
- $row[$cellKey] = '';
- if ($cellValue instanceof TableCell) {
- $row[$cellKey] = new TableCell('', ['colspan' => $cellValue->getColspan()]);
- }
- }
-
- return $row;
- }
-
- /**
- * Gets number of columns by row.
- */
- private function getNumberOfColumns(array $row): int
- {
- $columns = \count($row);
- foreach ($row as $column) {
- $columns += $column instanceof TableCell ? ($column->getColspan() - 1) : 0;
- }
-
- return $columns;
- }
-
- /**
- * Gets list of columns for the given row.
- */
- private function getRowColumns(array $row): array
- {
- $columns = range(0, $this->numberOfColumns - 1);
- foreach ($row as $cellKey => $cell) {
- if ($cell instanceof TableCell && $cell->getColspan() > 1) {
- // exclude grouped columns.
- $columns = array_diff($columns, range($cellKey + 1, $cellKey + $cell->getColspan() - 1));
- }
- }
-
- return $columns;
- }
-
- /**
- * Calculates columns widths.
- */
- private function calculateColumnsWidth(iterable $groups)
- {
- for ($column = 0; $column < $this->numberOfColumns; ++$column) {
- $lengths = [];
- foreach ($groups as $group) {
- foreach ($group as $row) {
- if ($row instanceof TableSeparator) {
- continue;
- }
-
- foreach ($row as $i => $cell) {
- if ($cell instanceof TableCell) {
- $textContent = Helper::removeDecoration($this->output->getFormatter(), $cell);
- $textLength = Helper::width($textContent);
- if ($textLength > 0) {
- $contentColumns = mb_str_split($textContent, ceil($textLength / $cell->getColspan()));
- foreach ($contentColumns as $position => $content) {
- $row[$i + $position] = $content;
- }
- }
- }
- }
-
- $lengths[] = $this->getCellWidth($row, $column);
- }
- }
-
- $this->effectiveColumnWidths[$column] = max($lengths) + Helper::width($this->style->getCellRowContentFormat()) - 2;
- }
- }
-
- private function getColumnSeparatorWidth(): int
- {
- return Helper::width(sprintf($this->style->getBorderFormat(), $this->style->getBorderChars()[3]));
- }
-
- private function getCellWidth(array $row, int $column): int
- {
- $cellWidth = 0;
-
- if (isset($row[$column])) {
- $cell = $row[$column];
- $cellWidth = Helper::width(Helper::removeDecoration($this->output->getFormatter(), $cell));
- }
-
- $columnWidth = $this->columnWidths[$column] ?? 0;
- $cellWidth = max($cellWidth, $columnWidth);
-
- return isset($this->columnMaxWidths[$column]) ? min($this->columnMaxWidths[$column], $cellWidth) : $cellWidth;
- }
-
- /**
- * Called after rendering to cleanup cache data.
- */
- private function cleanup()
- {
- $this->effectiveColumnWidths = [];
- $this->numberOfColumns = null;
- }
-
- /**
- * @return array
- */
- private static function initStyles(): array
- {
- $borderless = new TableStyle();
- $borderless
- ->setHorizontalBorderChars('=')
- ->setVerticalBorderChars(' ')
- ->setDefaultCrossingChar(' ')
- ;
-
- $compact = new TableStyle();
- $compact
- ->setHorizontalBorderChars('')
- ->setVerticalBorderChars('')
- ->setDefaultCrossingChar('')
- ->setCellRowContentFormat('%s ')
- ;
-
- $styleGuide = new TableStyle();
- $styleGuide
- ->setHorizontalBorderChars('-')
- ->setVerticalBorderChars(' ')
- ->setDefaultCrossingChar(' ')
- ->setCellHeaderFormat('%s')
- ;
-
- $box = (new TableStyle())
- ->setHorizontalBorderChars('─')
- ->setVerticalBorderChars('│')
- ->setCrossingChars('┼', '┌', '┬', '┐', '┤', '┘', '┴', '└', '├')
- ;
-
- $boxDouble = (new TableStyle())
- ->setHorizontalBorderChars('═', '─')
- ->setVerticalBorderChars('║', '│')
- ->setCrossingChars('┼', '╔', '╤', '╗', '╢', '╝', '╧', '╚', '╟', '╠', '╪', '╣')
- ;
-
- return [
- 'default' => new TableStyle(),
- 'borderless' => $borderless,
- 'compact' => $compact,
- 'symfony-style-guide' => $styleGuide,
- 'box' => $box,
- 'box-double' => $boxDouble,
- ];
- }
-
- private function resolveStyle($name): TableStyle
- {
- if ($name instanceof TableStyle) {
- return $name;
- }
-
- if (isset(self::$styles[$name])) {
- return self::$styles[$name];
- }
-
- throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name));
- }
-}
diff --git a/vendor/symfony/console/Helper/TableCell.php b/vendor/symfony/console/Helper/TableCell.php
deleted file mode 100644
index 1a7bc6ede..000000000
--- a/vendor/symfony/console/Helper/TableCell.php
+++ /dev/null
@@ -1,78 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-
-/**
- * @author Abdellatif Ait boudad
- */
-class TableCell
-{
- private $value;
- private $options = [
- 'rowspan' => 1,
- 'colspan' => 1,
- 'style' => null,
- ];
-
- public function __construct(string $value = '', array $options = [])
- {
- $this->value = $value;
-
- // check option names
- if ($diff = array_diff(array_keys($options), array_keys($this->options))) {
- throw new InvalidArgumentException(sprintf('The TableCell does not support the following options: \'%s\'.', implode('\', \'', $diff)));
- }
-
- if (isset($options['style']) && !$options['style'] instanceof TableCellStyle) {
- throw new InvalidArgumentException('The style option must be an instance of "TableCellStyle".');
- }
-
- $this->options = array_merge($this->options, $options);
- }
-
- /**
- * Returns the cell value.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->value;
- }
-
- /**
- * Gets number of colspan.
- *
- * @return int
- */
- public function getColspan()
- {
- return (int) $this->options['colspan'];
- }
-
- /**
- * Gets number of rowspan.
- *
- * @return int
- */
- public function getRowspan()
- {
- return (int) $this->options['rowspan'];
- }
-
- public function getStyle(): ?TableCellStyle
- {
- return $this->options['style'];
- }
-}
diff --git a/vendor/symfony/console/Helper/TableCellStyle.php b/vendor/symfony/console/Helper/TableCellStyle.php
deleted file mode 100644
index 19cd0ffc6..000000000
--- a/vendor/symfony/console/Helper/TableCellStyle.php
+++ /dev/null
@@ -1,89 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-
-/**
- * @author Yewhen Khoptynskyi
- */
-class TableCellStyle
-{
- public const DEFAULT_ALIGN = 'left';
-
- private const TAG_OPTIONS = [
- 'fg',
- 'bg',
- 'options',
- ];
-
- private const ALIGN_MAP = [
- 'left' => \STR_PAD_RIGHT,
- 'center' => \STR_PAD_BOTH,
- 'right' => \STR_PAD_LEFT,
- ];
-
- private $options = [
- 'fg' => 'default',
- 'bg' => 'default',
- 'options' => null,
- 'align' => self::DEFAULT_ALIGN,
- 'cellFormat' => null,
- ];
-
- public function __construct(array $options = [])
- {
- if ($diff = array_diff(array_keys($options), array_keys($this->options))) {
- throw new InvalidArgumentException(sprintf('The TableCellStyle does not support the following options: \'%s\'.', implode('\', \'', $diff)));
- }
-
- if (isset($options['align']) && !\array_key_exists($options['align'], self::ALIGN_MAP)) {
- throw new InvalidArgumentException(sprintf('Wrong align value. Value must be following: \'%s\'.', implode('\', \'', array_keys(self::ALIGN_MAP))));
- }
-
- $this->options = array_merge($this->options, $options);
- }
-
- public function getOptions(): array
- {
- return $this->options;
- }
-
- /**
- * Gets options we need for tag for example fg, bg.
- *
- * @return string[]
- */
- public function getTagOptions()
- {
- return array_filter(
- $this->getOptions(),
- function ($key) {
- return \in_array($key, self::TAG_OPTIONS) && isset($this->options[$key]);
- },
- \ARRAY_FILTER_USE_KEY
- );
- }
-
- /**
- * @return int
- */
- public function getPadByAlign()
- {
- return self::ALIGN_MAP[$this->getOptions()['align']];
- }
-
- public function getCellFormat(): ?string
- {
- return $this->getOptions()['cellFormat'];
- }
-}
diff --git a/vendor/symfony/console/Helper/TableRows.php b/vendor/symfony/console/Helper/TableRows.php
deleted file mode 100644
index cbc07d294..000000000
--- a/vendor/symfony/console/Helper/TableRows.php
+++ /dev/null
@@ -1,30 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-/**
- * @internal
- */
-class TableRows implements \IteratorAggregate
-{
- private $generator;
-
- public function __construct(\Closure $generator)
- {
- $this->generator = $generator;
- }
-
- public function getIterator(): \Traversable
- {
- return ($this->generator)();
- }
-}
diff --git a/vendor/symfony/console/Helper/TableSeparator.php b/vendor/symfony/console/Helper/TableSeparator.php
deleted file mode 100644
index e541c5315..000000000
--- a/vendor/symfony/console/Helper/TableSeparator.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-/**
- * Marks a row as being a separator.
- *
- * @author Fabien Potencier
- */
-class TableSeparator extends TableCell
-{
- public function __construct(array $options = [])
- {
- parent::__construct('', $options);
- }
-}
diff --git a/vendor/symfony/console/Helper/TableStyle.php b/vendor/symfony/console/Helper/TableStyle.php
deleted file mode 100644
index dfc41e6a4..000000000
--- a/vendor/symfony/console/Helper/TableStyle.php
+++ /dev/null
@@ -1,376 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Helper;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\LogicException;
-
-/**
- * Defines the styles for a Table.
- *
- * @author Fabien Potencier
- * @author Саша Стаменковић
- * @author Dany Maillard
- */
-class TableStyle
-{
- private $paddingChar = ' ';
- private $horizontalOutsideBorderChar = '-';
- private $horizontalInsideBorderChar = '-';
- private $verticalOutsideBorderChar = '|';
- private $verticalInsideBorderChar = '|';
- private $crossingChar = '+';
- private $crossingTopRightChar = '+';
- private $crossingTopMidChar = '+';
- private $crossingTopLeftChar = '+';
- private $crossingMidRightChar = '+';
- private $crossingBottomRightChar = '+';
- private $crossingBottomMidChar = '+';
- private $crossingBottomLeftChar = '+';
- private $crossingMidLeftChar = '+';
- private $crossingTopLeftBottomChar = '+';
- private $crossingTopMidBottomChar = '+';
- private $crossingTopRightBottomChar = '+';
- private $headerTitleFormat = ' %s >';
- private $footerTitleFormat = ' %s >';
- private $cellHeaderFormat = '%s';
- private $cellRowFormat = '%s';
- private $cellRowContentFormat = ' %s ';
- private $borderFormat = '%s';
- private $padType = \STR_PAD_RIGHT;
-
- /**
- * Sets padding character, used for cell padding.
- *
- * @return $this
- */
- public function setPaddingChar(string $paddingChar)
- {
- if (!$paddingChar) {
- throw new LogicException('The padding char must not be empty.');
- }
-
- $this->paddingChar = $paddingChar;
-
- return $this;
- }
-
- /**
- * Gets padding character, used for cell padding.
- *
- * @return string
- */
- public function getPaddingChar()
- {
- return $this->paddingChar;
- }
-
- /**
- * Sets horizontal border characters.
- *
- *
- * ╔═══════════════╤══════════════════════════╤══════════════════╗
- * 1 ISBN 2 Title │ Author ║
- * ╠═══════════════╪══════════════════════════╪══════════════════╣
- * ║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║
- * ║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║
- * ║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║
- * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║
- * ╚═══════════════╧══════════════════════════╧══════════════════╝
- *
- *
- * @return $this
- */
- public function setHorizontalBorderChars(string $outside, string $inside = null): self
- {
- $this->horizontalOutsideBorderChar = $outside;
- $this->horizontalInsideBorderChar = $inside ?? $outside;
-
- return $this;
- }
-
- /**
- * Sets vertical border characters.
- *
- *
- * ╔═══════════════╤══════════════════════════╤══════════════════╗
- * ║ ISBN │ Title │ Author ║
- * ╠═══════1═══════╪══════════════════════════╪══════════════════╣
- * ║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║
- * ║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║
- * ╟───────2───────┼──────────────────────────┼──────────────────╢
- * ║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║
- * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║
- * ╚═══════════════╧══════════════════════════╧══════════════════╝
- *
- *
- * @return $this
- */
- public function setVerticalBorderChars(string $outside, string $inside = null): self
- {
- $this->verticalOutsideBorderChar = $outside;
- $this->verticalInsideBorderChar = $inside ?? $outside;
-
- return $this;
- }
-
- /**
- * Gets border characters.
- *
- * @internal
- */
- public function getBorderChars(): array
- {
- return [
- $this->horizontalOutsideBorderChar,
- $this->verticalOutsideBorderChar,
- $this->horizontalInsideBorderChar,
- $this->verticalInsideBorderChar,
- ];
- }
-
- /**
- * Sets crossing characters.
- *
- * Example:
- *
- * 1═══════════════2══════════════════════════2══════════════════3
- * ║ ISBN │ Title │ Author ║
- * 8'══════════════0'═════════════════════════0'═════════════════4'
- * ║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║
- * ║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║
- * 8───────────────0──────────────────────────0──────────────────4
- * ║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║
- * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║
- * 7═══════════════6══════════════════════════6══════════════════5
- *
- *
- * @param string $cross Crossing char (see #0 of example)
- * @param string $topLeft Top left char (see #1 of example)
- * @param string $topMid Top mid char (see #2 of example)
- * @param string $topRight Top right char (see #3 of example)
- * @param string $midRight Mid right char (see #4 of example)
- * @param string $bottomRight Bottom right char (see #5 of example)
- * @param string $bottomMid Bottom mid char (see #6 of example)
- * @param string $bottomLeft Bottom left char (see #7 of example)
- * @param string $midLeft Mid left char (see #8 of example)
- * @param string|null $topLeftBottom Top left bottom char (see #8' of example), equals to $midLeft if null
- * @param string|null $topMidBottom Top mid bottom char (see #0' of example), equals to $cross if null
- * @param string|null $topRightBottom Top right bottom char (see #4' of example), equals to $midRight if null
- *
- * @return $this
- */
- public function setCrossingChars(string $cross, string $topLeft, string $topMid, string $topRight, string $midRight, string $bottomRight, string $bottomMid, string $bottomLeft, string $midLeft, string $topLeftBottom = null, string $topMidBottom = null, string $topRightBottom = null): self
- {
- $this->crossingChar = $cross;
- $this->crossingTopLeftChar = $topLeft;
- $this->crossingTopMidChar = $topMid;
- $this->crossingTopRightChar = $topRight;
- $this->crossingMidRightChar = $midRight;
- $this->crossingBottomRightChar = $bottomRight;
- $this->crossingBottomMidChar = $bottomMid;
- $this->crossingBottomLeftChar = $bottomLeft;
- $this->crossingMidLeftChar = $midLeft;
- $this->crossingTopLeftBottomChar = $topLeftBottom ?? $midLeft;
- $this->crossingTopMidBottomChar = $topMidBottom ?? $cross;
- $this->crossingTopRightBottomChar = $topRightBottom ?? $midRight;
-
- return $this;
- }
-
- /**
- * Sets default crossing character used for each cross.
- *
- * @see {@link setCrossingChars()} for setting each crossing individually.
- */
- public function setDefaultCrossingChar(string $char): self
- {
- return $this->setCrossingChars($char, $char, $char, $char, $char, $char, $char, $char, $char);
- }
-
- /**
- * Gets crossing character.
- *
- * @return string
- */
- public function getCrossingChar()
- {
- return $this->crossingChar;
- }
-
- /**
- * Gets crossing characters.
- *
- * @internal
- */
- public function getCrossingChars(): array
- {
- return [
- $this->crossingChar,
- $this->crossingTopLeftChar,
- $this->crossingTopMidChar,
- $this->crossingTopRightChar,
- $this->crossingMidRightChar,
- $this->crossingBottomRightChar,
- $this->crossingBottomMidChar,
- $this->crossingBottomLeftChar,
- $this->crossingMidLeftChar,
- $this->crossingTopLeftBottomChar,
- $this->crossingTopMidBottomChar,
- $this->crossingTopRightBottomChar,
- ];
- }
-
- /**
- * Sets header cell format.
- *
- * @return $this
- */
- public function setCellHeaderFormat(string $cellHeaderFormat)
- {
- $this->cellHeaderFormat = $cellHeaderFormat;
-
- return $this;
- }
-
- /**
- * Gets header cell format.
- *
- * @return string
- */
- public function getCellHeaderFormat()
- {
- return $this->cellHeaderFormat;
- }
-
- /**
- * Sets row cell format.
- *
- * @return $this
- */
- public function setCellRowFormat(string $cellRowFormat)
- {
- $this->cellRowFormat = $cellRowFormat;
-
- return $this;
- }
-
- /**
- * Gets row cell format.
- *
- * @return string
- */
- public function getCellRowFormat()
- {
- return $this->cellRowFormat;
- }
-
- /**
- * Sets row cell content format.
- *
- * @return $this
- */
- public function setCellRowContentFormat(string $cellRowContentFormat)
- {
- $this->cellRowContentFormat = $cellRowContentFormat;
-
- return $this;
- }
-
- /**
- * Gets row cell content format.
- *
- * @return string
- */
- public function getCellRowContentFormat()
- {
- return $this->cellRowContentFormat;
- }
-
- /**
- * Sets table border format.
- *
- * @return $this
- */
- public function setBorderFormat(string $borderFormat)
- {
- $this->borderFormat = $borderFormat;
-
- return $this;
- }
-
- /**
- * Gets table border format.
- *
- * @return string
- */
- public function getBorderFormat()
- {
- return $this->borderFormat;
- }
-
- /**
- * Sets cell padding type.
- *
- * @return $this
- */
- public function setPadType(int $padType)
- {
- if (!\in_array($padType, [\STR_PAD_LEFT, \STR_PAD_RIGHT, \STR_PAD_BOTH], true)) {
- throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).');
- }
-
- $this->padType = $padType;
-
- return $this;
- }
-
- /**
- * Gets cell padding type.
- *
- * @return int
- */
- public function getPadType()
- {
- return $this->padType;
- }
-
- public function getHeaderTitleFormat(): string
- {
- return $this->headerTitleFormat;
- }
-
- /**
- * @return $this
- */
- public function setHeaderTitleFormat(string $format): self
- {
- $this->headerTitleFormat = $format;
-
- return $this;
- }
-
- public function getFooterTitleFormat(): string
- {
- return $this->footerTitleFormat;
- }
-
- /**
- * @return $this
- */
- public function setFooterTitleFormat(string $format): self
- {
- $this->footerTitleFormat = $format;
-
- return $this;
- }
-}
diff --git a/vendor/symfony/console/Input/ArgvInput.php b/vendor/symfony/console/Input/ArgvInput.php
deleted file mode 100644
index 675b9ef58..000000000
--- a/vendor/symfony/console/Input/ArgvInput.php
+++ /dev/null
@@ -1,378 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Input;
-
-use Symfony\Component\Console\Exception\RuntimeException;
-
-/**
- * ArgvInput represents an input coming from the CLI arguments.
- *
- * Usage:
- *
- * $input = new ArgvInput();
- *
- * By default, the `$_SERVER['argv']` array is used for the input values.
- *
- * This can be overridden by explicitly passing the input values in the constructor:
- *
- * $input = new ArgvInput($_SERVER['argv']);
- *
- * If you pass it yourself, don't forget that the first element of the array
- * is the name of the running application.
- *
- * When passing an argument to the constructor, be sure that it respects
- * the same rules as the argv one. It's almost always better to use the
- * `StringInput` when you want to provide your own input.
- *
- * @author Fabien Potencier
- *
- * @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
- * @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02
- */
-class ArgvInput extends Input
-{
- private $tokens;
- private $parsed;
-
- public function __construct(array $argv = null, InputDefinition $definition = null)
- {
- $argv = $argv ?? $_SERVER['argv'] ?? [];
-
- // strip the application name
- array_shift($argv);
-
- $this->tokens = $argv;
-
- parent::__construct($definition);
- }
-
- protected function setTokens(array $tokens)
- {
- $this->tokens = $tokens;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function parse()
- {
- $parseOptions = true;
- $this->parsed = $this->tokens;
- while (null !== $token = array_shift($this->parsed)) {
- $parseOptions = $this->parseToken($token, $parseOptions);
- }
- }
-
- protected function parseToken(string $token, bool $parseOptions): bool
- {
- if ($parseOptions && '' == $token) {
- $this->parseArgument($token);
- } elseif ($parseOptions && '--' == $token) {
- return false;
- } elseif ($parseOptions && str_starts_with($token, '--')) {
- $this->parseLongOption($token);
- } elseif ($parseOptions && '-' === $token[0] && '-' !== $token) {
- $this->parseShortOption($token);
- } else {
- $this->parseArgument($token);
- }
-
- return $parseOptions;
- }
-
- /**
- * Parses a short option.
- */
- private function parseShortOption(string $token)
- {
- $name = substr($token, 1);
-
- if (\strlen($name) > 1) {
- if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) {
- // an option with a value (with no space)
- $this->addShortOption($name[0], substr($name, 1));
- } else {
- $this->parseShortOptionSet($name);
- }
- } else {
- $this->addShortOption($name, null);
- }
- }
-
- /**
- * Parses a short option set.
- *
- * @throws RuntimeException When option given doesn't exist
- */
- private function parseShortOptionSet(string $name)
- {
- $len = \strlen($name);
- for ($i = 0; $i < $len; ++$i) {
- if (!$this->definition->hasShortcut($name[$i])) {
- $encoding = mb_detect_encoding($name, null, true);
- throw new RuntimeException(sprintf('The "-%s" option does not exist.', false === $encoding ? $name[$i] : mb_substr($name, $i, 1, $encoding)));
- }
-
- $option = $this->definition->getOptionForShortcut($name[$i]);
- if ($option->acceptValue()) {
- $this->addLongOption($option->getName(), $i === $len - 1 ? null : substr($name, $i + 1));
-
- break;
- } else {
- $this->addLongOption($option->getName(), null);
- }
- }
- }
-
- /**
- * Parses a long option.
- */
- private function parseLongOption(string $token)
- {
- $name = substr($token, 2);
-
- if (false !== $pos = strpos($name, '=')) {
- if ('' === $value = substr($name, $pos + 1)) {
- array_unshift($this->parsed, $value);
- }
- $this->addLongOption(substr($name, 0, $pos), $value);
- } else {
- $this->addLongOption($name, null);
- }
- }
-
- /**
- * Parses an argument.
- *
- * @throws RuntimeException When too many arguments are given
- */
- private function parseArgument(string $token)
- {
- $c = \count($this->arguments);
-
- // if input is expecting another argument, add it
- if ($this->definition->hasArgument($c)) {
- $arg = $this->definition->getArgument($c);
- $this->arguments[$arg->getName()] = $arg->isArray() ? [$token] : $token;
-
- // if last argument isArray(), append token to last argument
- } elseif ($this->definition->hasArgument($c - 1) && $this->definition->getArgument($c - 1)->isArray()) {
- $arg = $this->definition->getArgument($c - 1);
- $this->arguments[$arg->getName()][] = $token;
-
- // unexpected argument
- } else {
- $all = $this->definition->getArguments();
- $symfonyCommandName = null;
- if (($inputArgument = $all[$key = array_key_first($all)] ?? null) && 'command' === $inputArgument->getName()) {
- $symfonyCommandName = $this->arguments['command'] ?? null;
- unset($all[$key]);
- }
-
- if (\count($all)) {
- if ($symfonyCommandName) {
- $message = sprintf('Too many arguments to "%s" command, expected arguments "%s".', $symfonyCommandName, implode('" "', array_keys($all)));
- } else {
- $message = sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all)));
- }
- } elseif ($symfonyCommandName) {
- $message = sprintf('No arguments expected for "%s" command, got "%s".', $symfonyCommandName, $token);
- } else {
- $message = sprintf('No arguments expected, got "%s".', $token);
- }
-
- throw new RuntimeException($message);
- }
- }
-
- /**
- * Adds a short option value.
- *
- * @throws RuntimeException When option given doesn't exist
- */
- private function addShortOption(string $shortcut, $value)
- {
- if (!$this->definition->hasShortcut($shortcut)) {
- throw new RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut));
- }
-
- $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value);
- }
-
- /**
- * Adds a long option value.
- *
- * @throws RuntimeException When option given doesn't exist
- */
- private function addLongOption(string $name, $value)
- {
- if (!$this->definition->hasOption($name)) {
- if (!$this->definition->hasNegation($name)) {
- throw new RuntimeException(sprintf('The "--%s" option does not exist.', $name));
- }
-
- $optionName = $this->definition->negationToName($name);
- if (null !== $value) {
- throw new RuntimeException(sprintf('The "--%s" option does not accept a value.', $name));
- }
- $this->options[$optionName] = false;
-
- return;
- }
-
- $option = $this->definition->getOption($name);
-
- if (null !== $value && !$option->acceptValue()) {
- throw new RuntimeException(sprintf('The "--%s" option does not accept a value.', $name));
- }
-
- if (\in_array($value, ['', null], true) && $option->acceptValue() && \count($this->parsed)) {
- // if option accepts an optional or mandatory argument
- // let's see if there is one provided
- $next = array_shift($this->parsed);
- if ((isset($next[0]) && '-' !== $next[0]) || \in_array($next, ['', null], true)) {
- $value = $next;
- } else {
- array_unshift($this->parsed, $next);
- }
- }
-
- if (null === $value) {
- if ($option->isValueRequired()) {
- throw new RuntimeException(sprintf('The "--%s" option requires a value.', $name));
- }
-
- if (!$option->isArray() && !$option->isValueOptional()) {
- $value = true;
- }
- }
-
- if ($option->isArray()) {
- $this->options[$name][] = $value;
- } else {
- $this->options[$name] = $value;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function getFirstArgument()
- {
- $isOption = false;
- foreach ($this->tokens as $i => $token) {
- if ($token && '-' === $token[0]) {
- if (str_contains($token, '=') || !isset($this->tokens[$i + 1])) {
- continue;
- }
-
- // If it's a long option, consider that everything after "--" is the option name.
- // Otherwise, use the last char (if it's a short option set, only the last one can take a value with space separator)
- $name = '-' === $token[1] ? substr($token, 2) : substr($token, -1);
- if (!isset($this->options[$name]) && !$this->definition->hasShortcut($name)) {
- // noop
- } elseif ((isset($this->options[$name]) || isset($this->options[$name = $this->definition->shortcutToName($name)])) && $this->tokens[$i + 1] === $this->options[$name]) {
- $isOption = true;
- }
-
- continue;
- }
-
- if ($isOption) {
- $isOption = false;
- continue;
- }
-
- return $token;
- }
-
- return null;
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasParameterOption($values, bool $onlyParams = false)
- {
- $values = (array) $values;
-
- foreach ($this->tokens as $token) {
- if ($onlyParams && '--' === $token) {
- return false;
- }
- foreach ($values as $value) {
- // Options with values:
- // For long options, test for '--option=' at beginning
- // For short options, test for '-o' at beginning
- $leading = str_starts_with($value, '--') ? $value.'=' : $value;
- if ($token === $value || '' !== $leading && str_starts_with($token, $leading)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getParameterOption($values, $default = false, bool $onlyParams = false)
- {
- $values = (array) $values;
- $tokens = $this->tokens;
-
- while (0 < \count($tokens)) {
- $token = array_shift($tokens);
- if ($onlyParams && '--' === $token) {
- return $default;
- }
-
- foreach ($values as $value) {
- if ($token === $value) {
- return array_shift($tokens);
- }
- // Options with values:
- // For long options, test for '--option=' at beginning
- // For short options, test for '-o' at beginning
- $leading = str_starts_with($value, '--') ? $value.'=' : $value;
- if ('' !== $leading && str_starts_with($token, $leading)) {
- return substr($token, \strlen($leading));
- }
- }
- }
-
- return $default;
- }
-
- /**
- * Returns a stringified representation of the args passed to the command.
- *
- * @return string
- */
- public function __toString()
- {
- $tokens = array_map(function ($token) {
- if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) {
- return $match[1].$this->escapeToken($match[2]);
- }
-
- if ($token && '-' !== $token[0]) {
- return $this->escapeToken($token);
- }
-
- return $token;
- }, $this->tokens);
-
- return implode(' ', $tokens);
- }
-}
diff --git a/vendor/symfony/console/Input/ArrayInput.php b/vendor/symfony/console/Input/ArrayInput.php
deleted file mode 100644
index c65161484..000000000
--- a/vendor/symfony/console/Input/ArrayInput.php
+++ /dev/null
@@ -1,210 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Input;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\InvalidOptionException;
-
-/**
- * ArrayInput represents an input provided as an array.
- *
- * Usage:
- *
- * $input = new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']);
- *
- * @author Fabien Potencier
- */
-class ArrayInput extends Input
-{
- private $parameters;
-
- public function __construct(array $parameters, InputDefinition $definition = null)
- {
- $this->parameters = $parameters;
-
- parent::__construct($definition);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getFirstArgument()
- {
- foreach ($this->parameters as $param => $value) {
- if ($param && \is_string($param) && '-' === $param[0]) {
- continue;
- }
-
- return $value;
- }
-
- return null;
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasParameterOption($values, bool $onlyParams = false)
- {
- $values = (array) $values;
-
- foreach ($this->parameters as $k => $v) {
- if (!\is_int($k)) {
- $v = $k;
- }
-
- if ($onlyParams && '--' === $v) {
- return false;
- }
-
- if (\in_array($v, $values)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getParameterOption($values, $default = false, bool $onlyParams = false)
- {
- $values = (array) $values;
-
- foreach ($this->parameters as $k => $v) {
- if ($onlyParams && ('--' === $k || (\is_int($k) && '--' === $v))) {
- return $default;
- }
-
- if (\is_int($k)) {
- if (\in_array($v, $values)) {
- return true;
- }
- } elseif (\in_array($k, $values)) {
- return $v;
- }
- }
-
- return $default;
- }
-
- /**
- * Returns a stringified representation of the args passed to the command.
- *
- * @return string
- */
- public function __toString()
- {
- $params = [];
- foreach ($this->parameters as $param => $val) {
- if ($param && \is_string($param) && '-' === $param[0]) {
- $glue = ('-' === $param[1]) ? '=' : ' ';
- if (\is_array($val)) {
- foreach ($val as $v) {
- $params[] = $param.('' != $v ? $glue.$this->escapeToken($v) : '');
- }
- } else {
- $params[] = $param.('' != $val ? $glue.$this->escapeToken($val) : '');
- }
- } else {
- $params[] = \is_array($val) ? implode(' ', array_map([$this, 'escapeToken'], $val)) : $this->escapeToken($val);
- }
- }
-
- return implode(' ', $params);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function parse()
- {
- foreach ($this->parameters as $key => $value) {
- if ('--' === $key) {
- return;
- }
- if (str_starts_with($key, '--')) {
- $this->addLongOption(substr($key, 2), $value);
- } elseif (str_starts_with($key, '-')) {
- $this->addShortOption(substr($key, 1), $value);
- } else {
- $this->addArgument($key, $value);
- }
- }
- }
-
- /**
- * Adds a short option value.
- *
- * @throws InvalidOptionException When option given doesn't exist
- */
- private function addShortOption(string $shortcut, $value)
- {
- if (!$this->definition->hasShortcut($shortcut)) {
- throw new InvalidOptionException(sprintf('The "-%s" option does not exist.', $shortcut));
- }
-
- $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value);
- }
-
- /**
- * Adds a long option value.
- *
- * @throws InvalidOptionException When option given doesn't exist
- * @throws InvalidOptionException When a required value is missing
- */
- private function addLongOption(string $name, $value)
- {
- if (!$this->definition->hasOption($name)) {
- if (!$this->definition->hasNegation($name)) {
- throw new InvalidOptionException(sprintf('The "--%s" option does not exist.', $name));
- }
-
- $optionName = $this->definition->negationToName($name);
- $this->options[$optionName] = false;
-
- return;
- }
-
- $option = $this->definition->getOption($name);
-
- if (null === $value) {
- if ($option->isValueRequired()) {
- throw new InvalidOptionException(sprintf('The "--%s" option requires a value.', $name));
- }
-
- if (!$option->isValueOptional()) {
- $value = true;
- }
- }
-
- $this->options[$name] = $value;
- }
-
- /**
- * Adds an argument value.
- *
- * @param string|int $name The argument name
- * @param mixed $value The value for the argument
- *
- * @throws InvalidArgumentException When argument given doesn't exist
- */
- private function addArgument($name, $value)
- {
- if (!$this->definition->hasArgument($name)) {
- throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
- }
-
- $this->arguments[$name] = $value;
- }
-}
diff --git a/vendor/symfony/console/Input/Input.php b/vendor/symfony/console/Input/Input.php
deleted file mode 100644
index d37460ed3..000000000
--- a/vendor/symfony/console/Input/Input.php
+++ /dev/null
@@ -1,213 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Input;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\RuntimeException;
-
-/**
- * Input is the base class for all concrete Input classes.
- *
- * Three concrete classes are provided by default:
- *
- * * `ArgvInput`: The input comes from the CLI arguments (argv)
- * * `StringInput`: The input is provided as a string
- * * `ArrayInput`: The input is provided as an array
- *
- * @author Fabien Potencier
- */
-abstract class Input implements InputInterface, StreamableInputInterface
-{
- protected $definition;
- protected $stream;
- protected $options = [];
- protected $arguments = [];
- protected $interactive = true;
-
- public function __construct(InputDefinition $definition = null)
- {
- if (null === $definition) {
- $this->definition = new InputDefinition();
- } else {
- $this->bind($definition);
- $this->validate();
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function bind(InputDefinition $definition)
- {
- $this->arguments = [];
- $this->options = [];
- $this->definition = $definition;
-
- $this->parse();
- }
-
- /**
- * Processes command line arguments.
- */
- abstract protected function parse();
-
- /**
- * {@inheritdoc}
- */
- public function validate()
- {
- $definition = $this->definition;
- $givenArguments = $this->arguments;
-
- $missingArguments = array_filter(array_keys($definition->getArguments()), function ($argument) use ($definition, $givenArguments) {
- return !\array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired();
- });
-
- if (\count($missingArguments) > 0) {
- throw new RuntimeException(sprintf('Not enough arguments (missing: "%s").', implode(', ', $missingArguments)));
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function isInteractive()
- {
- return $this->interactive;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setInteractive(bool $interactive)
- {
- $this->interactive = $interactive;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getArguments()
- {
- return array_merge($this->definition->getArgumentDefaults(), $this->arguments);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getArgument(string $name)
- {
- if (!$this->definition->hasArgument($name)) {
- throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
- }
-
- return $this->arguments[$name] ?? $this->definition->getArgument($name)->getDefault();
- }
-
- /**
- * {@inheritdoc}
- */
- public function setArgument(string $name, $value)
- {
- if (!$this->definition->hasArgument($name)) {
- throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
- }
-
- $this->arguments[$name] = $value;
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasArgument(string $name)
- {
- return $this->definition->hasArgument($name);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getOptions()
- {
- return array_merge($this->definition->getOptionDefaults(), $this->options);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getOption(string $name)
- {
- if ($this->definition->hasNegation($name)) {
- if (null === $value = $this->getOption($this->definition->negationToName($name))) {
- return $value;
- }
-
- return !$value;
- }
-
- if (!$this->definition->hasOption($name)) {
- throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name));
- }
-
- return \array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault();
- }
-
- /**
- * {@inheritdoc}
- */
- public function setOption(string $name, $value)
- {
- if ($this->definition->hasNegation($name)) {
- $this->options[$this->definition->negationToName($name)] = !$value;
-
- return;
- } elseif (!$this->definition->hasOption($name)) {
- throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name));
- }
-
- $this->options[$name] = $value;
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasOption(string $name)
- {
- return $this->definition->hasOption($name) || $this->definition->hasNegation($name);
- }
-
- /**
- * Escapes a token through escapeshellarg if it contains unsafe chars.
- *
- * @return string
- */
- public function escapeToken(string $token)
- {
- return preg_match('{^[\w-]+$}', $token) ? $token : escapeshellarg($token);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setStream($stream)
- {
- $this->stream = $stream;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getStream()
- {
- return $this->stream;
- }
-}
diff --git a/vendor/symfony/console/Input/InputArgument.php b/vendor/symfony/console/Input/InputArgument.php
deleted file mode 100644
index 8a64f7ac8..000000000
--- a/vendor/symfony/console/Input/InputArgument.php
+++ /dev/null
@@ -1,129 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Input;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\LogicException;
-
-/**
- * Represents a command line argument.
- *
- * @author Fabien Potencier
- */
-class InputArgument
-{
- public const REQUIRED = 1;
- public const OPTIONAL = 2;
- public const IS_ARRAY = 4;
-
- private $name;
- private $mode;
- private $default;
- private $description;
-
- /**
- * @param string $name The argument name
- * @param int|null $mode The argument mode: a bit mask of self::REQUIRED, self::OPTIONAL and self::IS_ARRAY
- * @param string $description A description text
- * @param string|bool|int|float|array|null $default The default value (for self::OPTIONAL mode only)
- *
- * @throws InvalidArgumentException When argument mode is not valid
- */
- public function __construct(string $name, int $mode = null, string $description = '', $default = null)
- {
- if (null === $mode) {
- $mode = self::OPTIONAL;
- } elseif ($mode > 7 || $mode < 1) {
- throw new InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode));
- }
-
- $this->name = $name;
- $this->mode = $mode;
- $this->description = $description;
-
- $this->setDefault($default);
- }
-
- /**
- * Returns the argument name.
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Returns true if the argument is required.
- *
- * @return bool true if parameter mode is self::REQUIRED, false otherwise
- */
- public function isRequired()
- {
- return self::REQUIRED === (self::REQUIRED & $this->mode);
- }
-
- /**
- * Returns true if the argument can take multiple values.
- *
- * @return bool true if mode is self::IS_ARRAY, false otherwise
- */
- public function isArray()
- {
- return self::IS_ARRAY === (self::IS_ARRAY & $this->mode);
- }
-
- /**
- * Sets the default value.
- *
- * @param string|bool|int|float|array|null $default
- *
- * @throws LogicException When incorrect default value is given
- */
- public function setDefault($default = null)
- {
- if ($this->isRequired() && null !== $default) {
- throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.');
- }
-
- if ($this->isArray()) {
- if (null === $default) {
- $default = [];
- } elseif (!\is_array($default)) {
- throw new LogicException('A default value for an array argument must be an array.');
- }
- }
-
- $this->default = $default;
- }
-
- /**
- * Returns the default value.
- *
- * @return string|bool|int|float|array|null
- */
- public function getDefault()
- {
- return $this->default;
- }
-
- /**
- * Returns the description text.
- *
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
-}
diff --git a/vendor/symfony/console/Input/InputAwareInterface.php b/vendor/symfony/console/Input/InputAwareInterface.php
deleted file mode 100644
index 5a288de5d..000000000
--- a/vendor/symfony/console/Input/InputAwareInterface.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Input;
-
-/**
- * InputAwareInterface should be implemented by classes that depends on the
- * Console Input.
- *
- * @author Wouter J
- */
-interface InputAwareInterface
-{
- /**
- * Sets the Console Input.
- */
- public function setInput(InputInterface $input);
-}
diff --git a/vendor/symfony/console/Input/InputDefinition.php b/vendor/symfony/console/Input/InputDefinition.php
deleted file mode 100644
index 11f704f0e..000000000
--- a/vendor/symfony/console/Input/InputDefinition.php
+++ /dev/null
@@ -1,424 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Input;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\LogicException;
-
-/**
- * A InputDefinition represents a set of valid command line arguments and options.
- *
- * Usage:
- *
- * $definition = new InputDefinition([
- * new InputArgument('name', InputArgument::REQUIRED),
- * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED),
- * ]);
- *
- * @author Fabien Potencier
- */
-class InputDefinition
-{
- private $arguments;
- private $requiredCount;
- private $lastArrayArgument;
- private $lastOptionalArgument;
- private $options;
- private $negations;
- private $shortcuts;
-
- /**
- * @param array $definition An array of InputArgument and InputOption instance
- */
- public function __construct(array $definition = [])
- {
- $this->setDefinition($definition);
- }
-
- /**
- * Sets the definition of the input.
- */
- public function setDefinition(array $definition)
- {
- $arguments = [];
- $options = [];
- foreach ($definition as $item) {
- if ($item instanceof InputOption) {
- $options[] = $item;
- } else {
- $arguments[] = $item;
- }
- }
-
- $this->setArguments($arguments);
- $this->setOptions($options);
- }
-
- /**
- * Sets the InputArgument objects.
- *
- * @param InputArgument[] $arguments An array of InputArgument objects
- */
- public function setArguments(array $arguments = [])
- {
- $this->arguments = [];
- $this->requiredCount = 0;
- $this->lastOptionalArgument = null;
- $this->lastArrayArgument = null;
- $this->addArguments($arguments);
- }
-
- /**
- * Adds an array of InputArgument objects.
- *
- * @param InputArgument[] $arguments An array of InputArgument objects
- */
- public function addArguments(?array $arguments = [])
- {
- if (null !== $arguments) {
- foreach ($arguments as $argument) {
- $this->addArgument($argument);
- }
- }
- }
-
- /**
- * @throws LogicException When incorrect argument is given
- */
- public function addArgument(InputArgument $argument)
- {
- if (isset($this->arguments[$argument->getName()])) {
- throw new LogicException(sprintf('An argument with name "%s" already exists.', $argument->getName()));
- }
-
- if (null !== $this->lastArrayArgument) {
- throw new LogicException(sprintf('Cannot add a required argument "%s" after an array argument "%s".', $argument->getName(), $this->lastArrayArgument->getName()));
- }
-
- if ($argument->isRequired() && null !== $this->lastOptionalArgument) {
- throw new LogicException(sprintf('Cannot add a required argument "%s" after an optional one "%s".', $argument->getName(), $this->lastOptionalArgument->getName()));
- }
-
- if ($argument->isArray()) {
- $this->lastArrayArgument = $argument;
- }
-
- if ($argument->isRequired()) {
- ++$this->requiredCount;
- } else {
- $this->lastOptionalArgument = $argument;
- }
-
- $this->arguments[$argument->getName()] = $argument;
- }
-
- /**
- * Returns an InputArgument by name or by position.
- *
- * @param string|int $name The InputArgument name or position
- *
- * @return InputArgument
- *
- * @throws InvalidArgumentException When argument given doesn't exist
- */
- public function getArgument($name)
- {
- if (!$this->hasArgument($name)) {
- throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
- }
-
- $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments;
-
- return $arguments[$name];
- }
-
- /**
- * Returns true if an InputArgument object exists by name or position.
- *
- * @param string|int $name The InputArgument name or position
- *
- * @return bool
- */
- public function hasArgument($name)
- {
- $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments;
-
- return isset($arguments[$name]);
- }
-
- /**
- * Gets the array of InputArgument objects.
- *
- * @return InputArgument[]
- */
- public function getArguments()
- {
- return $this->arguments;
- }
-
- /**
- * Returns the number of InputArguments.
- *
- * @return int
- */
- public function getArgumentCount()
- {
- return null !== $this->lastArrayArgument ? \PHP_INT_MAX : \count($this->arguments);
- }
-
- /**
- * Returns the number of required InputArguments.
- *
- * @return int
- */
- public function getArgumentRequiredCount()
- {
- return $this->requiredCount;
- }
-
- /**
- * @return array
- */
- public function getArgumentDefaults()
- {
- $values = [];
- foreach ($this->arguments as $argument) {
- $values[$argument->getName()] = $argument->getDefault();
- }
-
- return $values;
- }
-
- /**
- * Sets the InputOption objects.
- *
- * @param InputOption[] $options An array of InputOption objects
- */
- public function setOptions(array $options = [])
- {
- $this->options = [];
- $this->shortcuts = [];
- $this->negations = [];
- $this->addOptions($options);
- }
-
- /**
- * Adds an array of InputOption objects.
- *
- * @param InputOption[] $options An array of InputOption objects
- */
- public function addOptions(array $options = [])
- {
- foreach ($options as $option) {
- $this->addOption($option);
- }
- }
-
- /**
- * @throws LogicException When option given already exist
- */
- public function addOption(InputOption $option)
- {
- if (isset($this->options[$option->getName()]) && !$option->equals($this->options[$option->getName()])) {
- throw new LogicException(sprintf('An option named "%s" already exists.', $option->getName()));
- }
- if (isset($this->negations[$option->getName()])) {
- throw new LogicException(sprintf('An option named "%s" already exists.', $option->getName()));
- }
-
- if ($option->getShortcut()) {
- foreach (explode('|', $option->getShortcut()) as $shortcut) {
- if (isset($this->shortcuts[$shortcut]) && !$option->equals($this->options[$this->shortcuts[$shortcut]])) {
- throw new LogicException(sprintf('An option with shortcut "%s" already exists.', $shortcut));
- }
- }
- }
-
- $this->options[$option->getName()] = $option;
- if ($option->getShortcut()) {
- foreach (explode('|', $option->getShortcut()) as $shortcut) {
- $this->shortcuts[$shortcut] = $option->getName();
- }
- }
-
- if ($option->isNegatable()) {
- $negatedName = 'no-'.$option->getName();
- if (isset($this->options[$negatedName])) {
- throw new LogicException(sprintf('An option named "%s" already exists.', $negatedName));
- }
- $this->negations[$negatedName] = $option->getName();
- }
- }
-
- /**
- * Returns an InputOption by name.
- *
- * @return InputOption
- *
- * @throws InvalidArgumentException When option given doesn't exist
- */
- public function getOption(string $name)
- {
- if (!$this->hasOption($name)) {
- throw new InvalidArgumentException(sprintf('The "--%s" option does not exist.', $name));
- }
-
- return $this->options[$name];
- }
-
- /**
- * Returns true if an InputOption object exists by name.
- *
- * This method can't be used to check if the user included the option when
- * executing the command (use getOption() instead).
- *
- * @return bool
- */
- public function hasOption(string $name)
- {
- return isset($this->options[$name]);
- }
-
- /**
- * Gets the array of InputOption objects.
- *
- * @return InputOption[]
- */
- public function getOptions()
- {
- return $this->options;
- }
-
- /**
- * Returns true if an InputOption object exists by shortcut.
- *
- * @return bool
- */
- public function hasShortcut(string $name)
- {
- return isset($this->shortcuts[$name]);
- }
-
- /**
- * Returns true if an InputOption object exists by negated name.
- */
- public function hasNegation(string $name): bool
- {
- return isset($this->negations[$name]);
- }
-
- /**
- * Gets an InputOption by shortcut.
- *
- * @return InputOption
- */
- public function getOptionForShortcut(string $shortcut)
- {
- return $this->getOption($this->shortcutToName($shortcut));
- }
-
- /**
- * @return array
- */
- public function getOptionDefaults()
- {
- $values = [];
- foreach ($this->options as $option) {
- $values[$option->getName()] = $option->getDefault();
- }
-
- return $values;
- }
-
- /**
- * Returns the InputOption name given a shortcut.
- *
- * @throws InvalidArgumentException When option given does not exist
- *
- * @internal
- */
- public function shortcutToName(string $shortcut): string
- {
- if (!isset($this->shortcuts[$shortcut])) {
- throw new InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut));
- }
-
- return $this->shortcuts[$shortcut];
- }
-
- /**
- * Returns the InputOption name given a negation.
- *
- * @throws InvalidArgumentException When option given does not exist
- *
- * @internal
- */
- public function negationToName(string $negation): string
- {
- if (!isset($this->negations[$negation])) {
- throw new InvalidArgumentException(sprintf('The "--%s" option does not exist.', $negation));
- }
-
- return $this->negations[$negation];
- }
-
- /**
- * Gets the synopsis.
- *
- * @return string
- */
- public function getSynopsis(bool $short = false)
- {
- $elements = [];
-
- if ($short && $this->getOptions()) {
- $elements[] = '[options]';
- } elseif (!$short) {
- foreach ($this->getOptions() as $option) {
- $value = '';
- if ($option->acceptValue()) {
- $value = sprintf(
- ' %s%s%s',
- $option->isValueOptional() ? '[' : '',
- strtoupper($option->getName()),
- $option->isValueOptional() ? ']' : ''
- );
- }
-
- $shortcut = $option->getShortcut() ? sprintf('-%s|', $option->getShortcut()) : '';
- $negation = $option->isNegatable() ? sprintf('|--no-%s', $option->getName()) : '';
- $elements[] = sprintf('[%s--%s%s%s]', $shortcut, $option->getName(), $value, $negation);
- }
- }
-
- if (\count($elements) && $this->getArguments()) {
- $elements[] = '[--]';
- }
-
- $tail = '';
- foreach ($this->getArguments() as $argument) {
- $element = '<'.$argument->getName().'>';
- if ($argument->isArray()) {
- $element .= '...';
- }
-
- if (!$argument->isRequired()) {
- $element = '['.$element;
- $tail .= ']';
- }
-
- $elements[] = $element;
- }
-
- return implode(' ', $elements).$tail;
- }
-}
diff --git a/vendor/symfony/console/Input/InputInterface.php b/vendor/symfony/console/Input/InputInterface.php
deleted file mode 100644
index 628b6037a..000000000
--- a/vendor/symfony/console/Input/InputInterface.php
+++ /dev/null
@@ -1,151 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Input;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\RuntimeException;
-
-/**
- * InputInterface is the interface implemented by all input classes.
- *
- * @author Fabien Potencier
- */
-interface InputInterface
-{
- /**
- * Returns the first argument from the raw parameters (not parsed).
- *
- * @return string|null
- */
- public function getFirstArgument();
-
- /**
- * Returns true if the raw parameters (not parsed) contain a value.
- *
- * This method is to be used to introspect the input parameters
- * before they have been validated. It must be used carefully.
- * Does not necessarily return the correct result for short options
- * when multiple flags are combined in the same option.
- *
- * @param string|array $values The values to look for in the raw parameters (can be an array)
- * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal
- *
- * @return bool
- */
- public function hasParameterOption($values, bool $onlyParams = false);
-
- /**
- * Returns the value of a raw option (not parsed).
- *
- * This method is to be used to introspect the input parameters
- * before they have been validated. It must be used carefully.
- * Does not necessarily return the correct result for short options
- * when multiple flags are combined in the same option.
- *
- * @param string|array $values The value(s) to look for in the raw parameters (can be an array)
- * @param string|bool|int|float|array|null $default The default value to return if no result is found
- * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal
- *
- * @return mixed
- */
- public function getParameterOption($values, $default = false, bool $onlyParams = false);
-
- /**
- * Binds the current Input instance with the given arguments and options.
- *
- * @throws RuntimeException
- */
- public function bind(InputDefinition $definition);
-
- /**
- * Validates the input.
- *
- * @throws RuntimeException When not enough arguments are given
- */
- public function validate();
-
- /**
- * Returns all the given arguments merged with the default values.
- *
- * @return array
- */
- public function getArguments();
-
- /**
- * Returns the argument value for a given argument name.
- *
- * @return mixed
- *
- * @throws InvalidArgumentException When argument given doesn't exist
- */
- public function getArgument(string $name);
-
- /**
- * Sets an argument value by name.
- *
- * @param mixed $value The argument value
- *
- * @throws InvalidArgumentException When argument given doesn't exist
- */
- public function setArgument(string $name, $value);
-
- /**
- * Returns true if an InputArgument object exists by name or position.
- *
- * @return bool
- */
- public function hasArgument(string $name);
-
- /**
- * Returns all the given options merged with the default values.
- *
- * @return array
- */
- public function getOptions();
-
- /**
- * Returns the option value for a given option name.
- *
- * @return mixed
- *
- * @throws InvalidArgumentException When option given doesn't exist
- */
- public function getOption(string $name);
-
- /**
- * Sets an option value by name.
- *
- * @param mixed $value The option value
- *
- * @throws InvalidArgumentException When option given doesn't exist
- */
- public function setOption(string $name, $value);
-
- /**
- * Returns true if an InputOption object exists by name.
- *
- * @return bool
- */
- public function hasOption(string $name);
-
- /**
- * Is this input means interactive?
- *
- * @return bool
- */
- public function isInteractive();
-
- /**
- * Sets the input interactivity.
- */
- public function setInteractive(bool $interactive);
-}
diff --git a/vendor/symfony/console/Input/InputOption.php b/vendor/symfony/console/Input/InputOption.php
deleted file mode 100644
index 2bec34fe1..000000000
--- a/vendor/symfony/console/Input/InputOption.php
+++ /dev/null
@@ -1,231 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Input;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\LogicException;
-
-/**
- * Represents a command line option.
- *
- * @author Fabien Potencier
- */
-class InputOption
-{
- /**
- * Do not accept input for the option (e.g. --yell). This is the default behavior of options.
- */
- public const VALUE_NONE = 1;
-
- /**
- * A value must be passed when the option is used (e.g. --iterations=5 or -i5).
- */
- public const VALUE_REQUIRED = 2;
-
- /**
- * The option may or may not have a value (e.g. --yell or --yell=loud).
- */
- public const VALUE_OPTIONAL = 4;
-
- /**
- * The option accepts multiple values (e.g. --dir=/foo --dir=/bar).
- */
- public const VALUE_IS_ARRAY = 8;
-
- /**
- * The option may have either positive or negative value (e.g. --ansi or --no-ansi).
- */
- public const VALUE_NEGATABLE = 16;
-
- private $name;
- private $shortcut;
- private $mode;
- private $default;
- private $description;
-
- /**
- * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
- * @param int|null $mode The option mode: One of the VALUE_* constants
- * @param string|bool|int|float|array|null $default The default value (must be null for self::VALUE_NONE)
- *
- * @throws InvalidArgumentException If option mode is invalid or incompatible
- */
- public function __construct(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null)
- {
- if (str_starts_with($name, '--')) {
- $name = substr($name, 2);
- }
-
- if (empty($name)) {
- throw new InvalidArgumentException('An option name cannot be empty.');
- }
-
- if (empty($shortcut)) {
- $shortcut = null;
- }
-
- if (null !== $shortcut) {
- if (\is_array($shortcut)) {
- $shortcut = implode('|', $shortcut);
- }
- $shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-'));
- $shortcuts = array_filter($shortcuts);
- $shortcut = implode('|', $shortcuts);
-
- if (empty($shortcut)) {
- throw new InvalidArgumentException('An option shortcut cannot be empty.');
- }
- }
-
- if (null === $mode) {
- $mode = self::VALUE_NONE;
- } elseif ($mode >= (self::VALUE_NEGATABLE << 1) || $mode < 1) {
- throw new InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode));
- }
-
- $this->name = $name;
- $this->shortcut = $shortcut;
- $this->mode = $mode;
- $this->description = $description;
-
- if ($this->isArray() && !$this->acceptValue()) {
- throw new InvalidArgumentException('Impossible to have an option mode VALUE_IS_ARRAY if the option does not accept a value.');
- }
- if ($this->isNegatable() && $this->acceptValue()) {
- throw new InvalidArgumentException('Impossible to have an option mode VALUE_NEGATABLE if the option also accepts a value.');
- }
-
- $this->setDefault($default);
- }
-
- /**
- * Returns the option shortcut.
- *
- * @return string|null
- */
- public function getShortcut()
- {
- return $this->shortcut;
- }
-
- /**
- * Returns the option name.
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Returns true if the option accepts a value.
- *
- * @return bool true if value mode is not self::VALUE_NONE, false otherwise
- */
- public function acceptValue()
- {
- return $this->isValueRequired() || $this->isValueOptional();
- }
-
- /**
- * Returns true if the option requires a value.
- *
- * @return bool true if value mode is self::VALUE_REQUIRED, false otherwise
- */
- public function isValueRequired()
- {
- return self::VALUE_REQUIRED === (self::VALUE_REQUIRED & $this->mode);
- }
-
- /**
- * Returns true if the option takes an optional value.
- *
- * @return bool true if value mode is self::VALUE_OPTIONAL, false otherwise
- */
- public function isValueOptional()
- {
- return self::VALUE_OPTIONAL === (self::VALUE_OPTIONAL & $this->mode);
- }
-
- /**
- * Returns true if the option can take multiple values.
- *
- * @return bool true if mode is self::VALUE_IS_ARRAY, false otherwise
- */
- public function isArray()
- {
- return self::VALUE_IS_ARRAY === (self::VALUE_IS_ARRAY & $this->mode);
- }
-
- public function isNegatable(): bool
- {
- return self::VALUE_NEGATABLE === (self::VALUE_NEGATABLE & $this->mode);
- }
-
- /**
- * @param string|bool|int|float|array|null $default
- */
- public function setDefault($default = null)
- {
- if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) {
- throw new LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.');
- }
-
- if ($this->isArray()) {
- if (null === $default) {
- $default = [];
- } elseif (!\is_array($default)) {
- throw new LogicException('A default value for an array option must be an array.');
- }
- }
-
- $this->default = $this->acceptValue() || $this->isNegatable() ? $default : false;
- }
-
- /**
- * Returns the default value.
- *
- * @return string|bool|int|float|array|null
- */
- public function getDefault()
- {
- return $this->default;
- }
-
- /**
- * Returns the description text.
- *
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
-
- /**
- * Checks whether the given option equals this one.
- *
- * @return bool
- */
- public function equals(self $option)
- {
- return $option->getName() === $this->getName()
- && $option->getShortcut() === $this->getShortcut()
- && $option->getDefault() === $this->getDefault()
- && $option->isNegatable() === $this->isNegatable()
- && $option->isArray() === $this->isArray()
- && $option->isValueRequired() === $this->isValueRequired()
- && $option->isValueOptional() === $this->isValueOptional()
- ;
- }
-}
diff --git a/vendor/symfony/console/Input/StreamableInputInterface.php b/vendor/symfony/console/Input/StreamableInputInterface.php
deleted file mode 100644
index d7e462f24..000000000
--- a/vendor/symfony/console/Input/StreamableInputInterface.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Input;
-
-/**
- * StreamableInputInterface is the interface implemented by all input classes
- * that have an input stream.
- *
- * @author Robin Chalas
- */
-interface StreamableInputInterface extends InputInterface
-{
- /**
- * Sets the input stream to read from when interacting with the user.
- *
- * This is mainly useful for testing purpose.
- *
- * @param resource $stream The input stream
- */
- public function setStream($stream);
-
- /**
- * Returns the input stream.
- *
- * @return resource|null
- */
- public function getStream();
-}
diff --git a/vendor/symfony/console/Input/StringInput.php b/vendor/symfony/console/Input/StringInput.php
deleted file mode 100644
index 56bb66cbf..000000000
--- a/vendor/symfony/console/Input/StringInput.php
+++ /dev/null
@@ -1,84 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Input;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-
-/**
- * StringInput represents an input provided as a string.
- *
- * Usage:
- *
- * $input = new StringInput('foo --bar="foobar"');
- *
- * @author Fabien Potencier
- */
-class StringInput extends ArgvInput
-{
- public const REGEX_STRING = '([^\s]+?)(?:\s|(?setTokens($this->tokenize($input));
- }
-
- /**
- * Tokenizes a string.
- *
- * @throws InvalidArgumentException When unable to parse input (should never happen)
- */
- private function tokenize(string $input): array
- {
- $tokens = [];
- $length = \strlen($input);
- $cursor = 0;
- $token = null;
- while ($cursor < $length) {
- if ('\\' === $input[$cursor]) {
- $token .= $input[++$cursor] ?? '';
- ++$cursor;
- continue;
- }
-
- if (preg_match('/\s+/A', $input, $match, 0, $cursor)) {
- if (null !== $token) {
- $tokens[] = $token;
- $token = null;
- }
- } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, 0, $cursor)) {
- $token .= $match[1].$match[2].stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, -1)));
- } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, 0, $cursor)) {
- $token .= stripcslashes(substr($match[0], 1, -1));
- } elseif (preg_match('/'.self::REGEX_UNQUOTED_STRING.'/A', $input, $match, 0, $cursor)) {
- $token .= $match[1];
- } else {
- // should never happen
- throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ...".', substr($input, $cursor, 10)));
- }
-
- $cursor += \strlen($match[0]);
- }
-
- if (null !== $token) {
- $tokens[] = $token;
- }
-
- return $tokens;
- }
-}
diff --git a/vendor/symfony/console/LICENSE b/vendor/symfony/console/LICENSE
deleted file mode 100644
index 0138f8f07..000000000
--- a/vendor/symfony/console/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2004-present Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/vendor/symfony/console/Logger/ConsoleLogger.php b/vendor/symfony/console/Logger/ConsoleLogger.php
deleted file mode 100644
index 4a10fa172..000000000
--- a/vendor/symfony/console/Logger/ConsoleLogger.php
+++ /dev/null
@@ -1,126 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Logger;
-
-use Psr\Log\AbstractLogger;
-use Psr\Log\InvalidArgumentException;
-use Psr\Log\LogLevel;
-use Symfony\Component\Console\Output\ConsoleOutputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * PSR-3 compliant console logger.
- *
- * @author Kévin Dunglas
- *
- * @see https://www.php-fig.org/psr/psr-3/
- */
-class ConsoleLogger extends AbstractLogger
-{
- public const INFO = 'info';
- public const ERROR = 'error';
-
- private $output;
- private $verbosityLevelMap = [
- LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL,
- LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL,
- LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL,
- LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL,
- LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL,
- LogLevel::NOTICE => OutputInterface::VERBOSITY_VERBOSE,
- LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE,
- LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG,
- ];
- private $formatLevelMap = [
- LogLevel::EMERGENCY => self::ERROR,
- LogLevel::ALERT => self::ERROR,
- LogLevel::CRITICAL => self::ERROR,
- LogLevel::ERROR => self::ERROR,
- LogLevel::WARNING => self::INFO,
- LogLevel::NOTICE => self::INFO,
- LogLevel::INFO => self::INFO,
- LogLevel::DEBUG => self::INFO,
- ];
- private $errored = false;
-
- public function __construct(OutputInterface $output, array $verbosityLevelMap = [], array $formatLevelMap = [])
- {
- $this->output = $output;
- $this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap;
- $this->formatLevelMap = $formatLevelMap + $this->formatLevelMap;
- }
-
- /**
- * {@inheritdoc}
- *
- * @return void
- */
- public function log($level, $message, array $context = [])
- {
- if (!isset($this->verbosityLevelMap[$level])) {
- throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level));
- }
-
- $output = $this->output;
-
- // Write to the error output if necessary and available
- if (self::ERROR === $this->formatLevelMap[$level]) {
- if ($this->output instanceof ConsoleOutputInterface) {
- $output = $output->getErrorOutput();
- }
- $this->errored = true;
- }
-
- // the if condition check isn't necessary -- it's the same one that $output will do internally anyway.
- // We only do it for efficiency here as the message formatting is relatively expensive.
- if ($output->getVerbosity() >= $this->verbosityLevelMap[$level]) {
- $output->writeln(sprintf('<%1$s>[%2$s] %3$s%1$s>', $this->formatLevelMap[$level], $level, $this->interpolate($message, $context)), $this->verbosityLevelMap[$level]);
- }
- }
-
- /**
- * Returns true when any messages have been logged at error levels.
- *
- * @return bool
- */
- public function hasErrored()
- {
- return $this->errored;
- }
-
- /**
- * Interpolates context values into the message placeholders.
- *
- * @author PHP Framework Interoperability Group
- */
- private function interpolate(string $message, array $context): string
- {
- if (!str_contains($message, '{')) {
- return $message;
- }
-
- $replacements = [];
- foreach ($context as $key => $val) {
- if (null === $val || \is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) {
- $replacements["{{$key}}"] = $val;
- } elseif ($val instanceof \DateTimeInterface) {
- $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339);
- } elseif (\is_object($val)) {
- $replacements["{{$key}}"] = '[object '.\get_class($val).']';
- } else {
- $replacements["{{$key}}"] = '['.\gettype($val).']';
- }
- }
-
- return strtr($message, $replacements);
- }
-}
diff --git a/vendor/symfony/console/Output/BufferedOutput.php b/vendor/symfony/console/Output/BufferedOutput.php
deleted file mode 100644
index d37c6e323..000000000
--- a/vendor/symfony/console/Output/BufferedOutput.php
+++ /dev/null
@@ -1,45 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Output;
-
-/**
- * @author Jean-François Simon
- */
-class BufferedOutput extends Output
-{
- private $buffer = '';
-
- /**
- * Empties buffer and returns its content.
- *
- * @return string
- */
- public function fetch()
- {
- $content = $this->buffer;
- $this->buffer = '';
-
- return $content;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doWrite(string $message, bool $newline)
- {
- $this->buffer .= $message;
-
- if ($newline) {
- $this->buffer .= \PHP_EOL;
- }
- }
-}
diff --git a/vendor/symfony/console/Output/ConsoleOutput.php b/vendor/symfony/console/Output/ConsoleOutput.php
deleted file mode 100644
index f19f9ebf4..000000000
--- a/vendor/symfony/console/Output/ConsoleOutput.php
+++ /dev/null
@@ -1,172 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Output;
-
-use Symfony\Component\Console\Formatter\OutputFormatterInterface;
-
-/**
- * ConsoleOutput is the default class for all CLI output. It uses STDOUT and STDERR.
- *
- * This class is a convenient wrapper around `StreamOutput` for both STDOUT and STDERR.
- *
- * $output = new ConsoleOutput();
- *
- * This is equivalent to:
- *
- * $output = new StreamOutput(fopen('php://stdout', 'w'));
- * $stdErr = new StreamOutput(fopen('php://stderr', 'w'));
- *
- * @author Fabien Potencier
- */
-class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
-{
- private $stderr;
- private $consoleSectionOutputs = [];
-
- /**
- * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
- * @param bool|null $decorated Whether to decorate messages (null for auto-guessing)
- * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
- */
- public function __construct(int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null)
- {
- parent::__construct($this->openOutputStream(), $verbosity, $decorated, $formatter);
-
- if (null === $formatter) {
- // for BC reasons, stdErr has it own Formatter only when user don't inject a specific formatter.
- $this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated);
-
- return;
- }
-
- $actualDecorated = $this->isDecorated();
- $this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated, $this->getFormatter());
-
- if (null === $decorated) {
- $this->setDecorated($actualDecorated && $this->stderr->isDecorated());
- }
- }
-
- /**
- * Creates a new output section.
- */
- public function section(): ConsoleSectionOutput
- {
- return new ConsoleSectionOutput($this->getStream(), $this->consoleSectionOutputs, $this->getVerbosity(), $this->isDecorated(), $this->getFormatter());
- }
-
- /**
- * {@inheritdoc}
- */
- public function setDecorated(bool $decorated)
- {
- parent::setDecorated($decorated);
- $this->stderr->setDecorated($decorated);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setFormatter(OutputFormatterInterface $formatter)
- {
- parent::setFormatter($formatter);
- $this->stderr->setFormatter($formatter);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setVerbosity(int $level)
- {
- parent::setVerbosity($level);
- $this->stderr->setVerbosity($level);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getErrorOutput()
- {
- return $this->stderr;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setErrorOutput(OutputInterface $error)
- {
- $this->stderr = $error;
- }
-
- /**
- * Returns true if current environment supports writing console output to
- * STDOUT.
- *
- * @return bool
- */
- protected function hasStdoutSupport()
- {
- return false === $this->isRunningOS400();
- }
-
- /**
- * Returns true if current environment supports writing console output to
- * STDERR.
- *
- * @return bool
- */
- protected function hasStderrSupport()
- {
- return false === $this->isRunningOS400();
- }
-
- /**
- * Checks if current executing environment is IBM iSeries (OS400), which
- * doesn't properly convert character-encodings between ASCII to EBCDIC.
- */
- private function isRunningOS400(): bool
- {
- $checks = [
- \function_exists('php_uname') ? php_uname('s') : '',
- getenv('OSTYPE'),
- \PHP_OS,
- ];
-
- return false !== stripos(implode(';', $checks), 'OS400');
- }
-
- /**
- * @return resource
- */
- private function openOutputStream()
- {
- if (!$this->hasStdoutSupport()) {
- return fopen('php://output', 'w');
- }
-
- // Use STDOUT when possible to prevent from opening too many file descriptors
- return \defined('STDOUT') ? \STDOUT : (@fopen('php://stdout', 'w') ?: fopen('php://output', 'w'));
- }
-
- /**
- * @return resource
- */
- private function openErrorStream()
- {
- if (!$this->hasStderrSupport()) {
- return fopen('php://output', 'w');
- }
-
- // Use STDERR when possible to prevent from opening too many file descriptors
- return \defined('STDERR') ? \STDERR : (@fopen('php://stderr', 'w') ?: fopen('php://output', 'w'));
- }
-}
diff --git a/vendor/symfony/console/Output/ConsoleOutputInterface.php b/vendor/symfony/console/Output/ConsoleOutputInterface.php
deleted file mode 100644
index 6b6635f58..000000000
--- a/vendor/symfony/console/Output/ConsoleOutputInterface.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Output;
-
-/**
- * ConsoleOutputInterface is the interface implemented by ConsoleOutput class.
- * This adds information about stderr and section output stream.
- *
- * @author Dariusz Górecki
- */
-interface ConsoleOutputInterface extends OutputInterface
-{
- /**
- * Gets the OutputInterface for errors.
- *
- * @return OutputInterface
- */
- public function getErrorOutput();
-
- public function setErrorOutput(OutputInterface $error);
-
- public function section(): ConsoleSectionOutput;
-}
diff --git a/vendor/symfony/console/Output/ConsoleSectionOutput.php b/vendor/symfony/console/Output/ConsoleSectionOutput.php
deleted file mode 100644
index 8f1649758..000000000
--- a/vendor/symfony/console/Output/ConsoleSectionOutput.php
+++ /dev/null
@@ -1,143 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Output;
-
-use Symfony\Component\Console\Formatter\OutputFormatterInterface;
-use Symfony\Component\Console\Helper\Helper;
-use Symfony\Component\Console\Terminal;
-
-/**
- * @author Pierre du Plessis
- * @author Gabriel Ostrolucký
- */
-class ConsoleSectionOutput extends StreamOutput
-{
- private $content = [];
- private $lines = 0;
- private $sections;
- private $terminal;
-
- /**
- * @param resource $stream
- * @param ConsoleSectionOutput[] $sections
- */
- public function __construct($stream, array &$sections, int $verbosity, bool $decorated, OutputFormatterInterface $formatter)
- {
- parent::__construct($stream, $verbosity, $decorated, $formatter);
- array_unshift($sections, $this);
- $this->sections = &$sections;
- $this->terminal = new Terminal();
- }
-
- /**
- * Clears previous output for this section.
- *
- * @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared
- */
- public function clear(int $lines = null)
- {
- if (empty($this->content) || !$this->isDecorated()) {
- return;
- }
-
- if ($lines) {
- array_splice($this->content, -($lines * 2)); // Multiply lines by 2 to cater for each new line added between content
- } else {
- $lines = $this->lines;
- $this->content = [];
- }
-
- $this->lines -= $lines;
-
- parent::doWrite($this->popStreamContentUntilCurrentSection($lines), false);
- }
-
- /**
- * Overwrites the previous output with a new message.
- *
- * @param array|string $message
- */
- public function overwrite($message)
- {
- $this->clear();
- $this->writeln($message);
- }
-
- public function getContent(): string
- {
- return implode('', $this->content);
- }
-
- /**
- * @internal
- */
- public function addContent(string $input)
- {
- foreach (explode(\PHP_EOL, $input) as $lineContent) {
- $this->lines += ceil($this->getDisplayLength($lineContent) / $this->terminal->getWidth()) ?: 1;
- $this->content[] = $lineContent;
- $this->content[] = \PHP_EOL;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doWrite(string $message, bool $newline)
- {
- if (!$this->isDecorated()) {
- parent::doWrite($message, $newline);
-
- return;
- }
-
- $erasedContent = $this->popStreamContentUntilCurrentSection();
-
- $this->addContent($message);
-
- parent::doWrite($message, true);
- parent::doWrite($erasedContent, false);
- }
-
- /**
- * At initial stage, cursor is at the end of stream output. This method makes cursor crawl upwards until it hits
- * current section. Then it erases content it crawled through. Optionally, it erases part of current section too.
- */
- private function popStreamContentUntilCurrentSection(int $numberOfLinesToClearFromCurrentSection = 0): string
- {
- $numberOfLinesToClear = $numberOfLinesToClearFromCurrentSection;
- $erasedContent = [];
-
- foreach ($this->sections as $section) {
- if ($section === $this) {
- break;
- }
-
- $numberOfLinesToClear += $section->lines;
- $erasedContent[] = $section->getContent();
- }
-
- if ($numberOfLinesToClear > 0) {
- // move cursor up n lines
- parent::doWrite(sprintf("\x1b[%dA", $numberOfLinesToClear), false);
- // erase to end of screen
- parent::doWrite("\x1b[0J", false);
- }
-
- return implode('', array_reverse($erasedContent));
- }
-
- private function getDisplayLength(string $text): int
- {
- return Helper::width(Helper::removeDecoration($this->getFormatter(), str_replace("\t", ' ', $text)));
- }
-}
diff --git a/vendor/symfony/console/Output/NullOutput.php b/vendor/symfony/console/Output/NullOutput.php
deleted file mode 100644
index 3bbe63ea0..000000000
--- a/vendor/symfony/console/Output/NullOutput.php
+++ /dev/null
@@ -1,128 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Output;
-
-use Symfony\Component\Console\Formatter\NullOutputFormatter;
-use Symfony\Component\Console\Formatter\OutputFormatterInterface;
-
-/**
- * NullOutput suppresses all output.
- *
- * $output = new NullOutput();
- *
- * @author Fabien Potencier
- * @author Tobias Schultze
- */
-class NullOutput implements OutputInterface
-{
- private $formatter;
-
- /**
- * {@inheritdoc}
- */
- public function setFormatter(OutputFormatterInterface $formatter)
- {
- // do nothing
- }
-
- /**
- * {@inheritdoc}
- */
- public function getFormatter()
- {
- if ($this->formatter) {
- return $this->formatter;
- }
- // to comply with the interface we must return a OutputFormatterInterface
- return $this->formatter = new NullOutputFormatter();
- }
-
- /**
- * {@inheritdoc}
- */
- public function setDecorated(bool $decorated)
- {
- // do nothing
- }
-
- /**
- * {@inheritdoc}
- */
- public function isDecorated()
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setVerbosity(int $level)
- {
- // do nothing
- }
-
- /**
- * {@inheritdoc}
- */
- public function getVerbosity()
- {
- return self::VERBOSITY_QUIET;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isQuiet()
- {
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isVerbose()
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isVeryVerbose()
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isDebug()
- {
- return false;
- }
-
- /**
- * {@inheritdoc}
- */
- public function writeln($messages, int $options = self::OUTPUT_NORMAL)
- {
- // do nothing
- }
-
- /**
- * {@inheritdoc}
- */
- public function write($messages, bool $newline = false, int $options = self::OUTPUT_NORMAL)
- {
- // do nothing
- }
-}
diff --git a/vendor/symfony/console/Output/Output.php b/vendor/symfony/console/Output/Output.php
deleted file mode 100644
index d7c5fb2d1..000000000
--- a/vendor/symfony/console/Output/Output.php
+++ /dev/null
@@ -1,174 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Output;
-
-use Symfony\Component\Console\Formatter\OutputFormatter;
-use Symfony\Component\Console\Formatter\OutputFormatterInterface;
-
-/**
- * Base class for output classes.
- *
- * There are five levels of verbosity:
- *
- * * normal: no option passed (normal output)
- * * verbose: -v (more output)
- * * very verbose: -vv (highly extended output)
- * * debug: -vvv (all debug output)
- * * quiet: -q (no output)
- *
- * @author Fabien Potencier
- */
-abstract class Output implements OutputInterface
-{
- private $verbosity;
- private $formatter;
-
- /**
- * @param int|null $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
- * @param bool $decorated Whether to decorate messages
- * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
- */
- public function __construct(?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null)
- {
- $this->verbosity = $verbosity ?? self::VERBOSITY_NORMAL;
- $this->formatter = $formatter ?? new OutputFormatter();
- $this->formatter->setDecorated($decorated);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setFormatter(OutputFormatterInterface $formatter)
- {
- $this->formatter = $formatter;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getFormatter()
- {
- return $this->formatter;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setDecorated(bool $decorated)
- {
- $this->formatter->setDecorated($decorated);
- }
-
- /**
- * {@inheritdoc}
- */
- public function isDecorated()
- {
- return $this->formatter->isDecorated();
- }
-
- /**
- * {@inheritdoc}
- */
- public function setVerbosity(int $level)
- {
- $this->verbosity = $level;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getVerbosity()
- {
- return $this->verbosity;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isQuiet()
- {
- return self::VERBOSITY_QUIET === $this->verbosity;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isVerbose()
- {
- return self::VERBOSITY_VERBOSE <= $this->verbosity;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isVeryVerbose()
- {
- return self::VERBOSITY_VERY_VERBOSE <= $this->verbosity;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isDebug()
- {
- return self::VERBOSITY_DEBUG <= $this->verbosity;
- }
-
- /**
- * {@inheritdoc}
- */
- public function writeln($messages, int $options = self::OUTPUT_NORMAL)
- {
- $this->write($messages, true, $options);
- }
-
- /**
- * {@inheritdoc}
- */
- public function write($messages, bool $newline = false, int $options = self::OUTPUT_NORMAL)
- {
- if (!is_iterable($messages)) {
- $messages = [$messages];
- }
-
- $types = self::OUTPUT_NORMAL | self::OUTPUT_RAW | self::OUTPUT_PLAIN;
- $type = $types & $options ?: self::OUTPUT_NORMAL;
-
- $verbosities = self::VERBOSITY_QUIET | self::VERBOSITY_NORMAL | self::VERBOSITY_VERBOSE | self::VERBOSITY_VERY_VERBOSE | self::VERBOSITY_DEBUG;
- $verbosity = $verbosities & $options ?: self::VERBOSITY_NORMAL;
-
- if ($verbosity > $this->getVerbosity()) {
- return;
- }
-
- foreach ($messages as $message) {
- switch ($type) {
- case OutputInterface::OUTPUT_NORMAL:
- $message = $this->formatter->format($message);
- break;
- case OutputInterface::OUTPUT_RAW:
- break;
- case OutputInterface::OUTPUT_PLAIN:
- $message = strip_tags($this->formatter->format($message));
- break;
- }
-
- $this->doWrite($message ?? '', $newline);
- }
- }
-
- /**
- * Writes a message to the output.
- */
- abstract protected function doWrite(string $message, bool $newline);
-}
diff --git a/vendor/symfony/console/Output/OutputInterface.php b/vendor/symfony/console/Output/OutputInterface.php
deleted file mode 100644
index 55caab80b..000000000
--- a/vendor/symfony/console/Output/OutputInterface.php
+++ /dev/null
@@ -1,110 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Output;
-
-use Symfony\Component\Console\Formatter\OutputFormatterInterface;
-
-/**
- * OutputInterface is the interface implemented by all Output classes.
- *
- * @author Fabien Potencier
- */
-interface OutputInterface
-{
- public const VERBOSITY_QUIET = 16;
- public const VERBOSITY_NORMAL = 32;
- public const VERBOSITY_VERBOSE = 64;
- public const VERBOSITY_VERY_VERBOSE = 128;
- public const VERBOSITY_DEBUG = 256;
-
- public const OUTPUT_NORMAL = 1;
- public const OUTPUT_RAW = 2;
- public const OUTPUT_PLAIN = 4;
-
- /**
- * Writes a message to the output.
- *
- * @param string|iterable $messages The message as an iterable of strings or a single string
- * @param bool $newline Whether to add a newline
- * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
- */
- public function write($messages, bool $newline = false, int $options = 0);
-
- /**
- * Writes a message to the output and adds a newline at the end.
- *
- * @param string|iterable $messages The message as an iterable of strings or a single string
- * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
- */
- public function writeln($messages, int $options = 0);
-
- /**
- * Sets the verbosity of the output.
- */
- public function setVerbosity(int $level);
-
- /**
- * Gets the current verbosity of the output.
- *
- * @return int
- */
- public function getVerbosity();
-
- /**
- * Returns whether verbosity is quiet (-q).
- *
- * @return bool
- */
- public function isQuiet();
-
- /**
- * Returns whether verbosity is verbose (-v).
- *
- * @return bool
- */
- public function isVerbose();
-
- /**
- * Returns whether verbosity is very verbose (-vv).
- *
- * @return bool
- */
- public function isVeryVerbose();
-
- /**
- * Returns whether verbosity is debug (-vvv).
- *
- * @return bool
- */
- public function isDebug();
-
- /**
- * Sets the decorated flag.
- */
- public function setDecorated(bool $decorated);
-
- /**
- * Gets the decorated flag.
- *
- * @return bool
- */
- public function isDecorated();
-
- public function setFormatter(OutputFormatterInterface $formatter);
-
- /**
- * Returns current output formatter instance.
- *
- * @return OutputFormatterInterface
- */
- public function getFormatter();
-}
diff --git a/vendor/symfony/console/Output/StreamOutput.php b/vendor/symfony/console/Output/StreamOutput.php
deleted file mode 100644
index 7f5551827..000000000
--- a/vendor/symfony/console/Output/StreamOutput.php
+++ /dev/null
@@ -1,115 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Output;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Formatter\OutputFormatterInterface;
-
-/**
- * StreamOutput writes the output to a given stream.
- *
- * Usage:
- *
- * $output = new StreamOutput(fopen('php://stdout', 'w'));
- *
- * As `StreamOutput` can use any stream, you can also use a file:
- *
- * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false));
- *
- * @author Fabien Potencier
- */
-class StreamOutput extends Output
-{
- private $stream;
-
- /**
- * @param resource $stream A stream resource
- * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
- * @param bool|null $decorated Whether to decorate messages (null for auto-guessing)
- * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
- *
- * @throws InvalidArgumentException When first argument is not a real stream
- */
- public function __construct($stream, int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null)
- {
- if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) {
- throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.');
- }
-
- $this->stream = $stream;
-
- if (null === $decorated) {
- $decorated = $this->hasColorSupport();
- }
-
- parent::__construct($verbosity, $decorated, $formatter);
- }
-
- /**
- * Gets the stream attached to this StreamOutput instance.
- *
- * @return resource
- */
- public function getStream()
- {
- return $this->stream;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doWrite(string $message, bool $newline)
- {
- if ($newline) {
- $message .= \PHP_EOL;
- }
-
- @fwrite($this->stream, $message);
-
- fflush($this->stream);
- }
-
- /**
- * Returns true if the stream supports colorization.
- *
- * Colorization is disabled if not supported by the stream:
- *
- * This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo
- * terminals via named pipes, so we can only check the environment.
- *
- * Reference: Composer\XdebugHandler\Process::supportsColor
- * https://github.com/composer/xdebug-handler
- *
- * @return bool true if the stream supports colorization, false otherwise
- */
- protected function hasColorSupport()
- {
- // Follow https://no-color.org/
- if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) {
- return false;
- }
-
- if ('Hyper' === getenv('TERM_PROGRAM')) {
- return true;
- }
-
- if (\DIRECTORY_SEPARATOR === '\\') {
- return (\function_exists('sapi_windows_vt100_support')
- && @sapi_windows_vt100_support($this->stream))
- || false !== getenv('ANSICON')
- || 'ON' === getenv('ConEmuANSI')
- || 'xterm' === getenv('TERM');
- }
-
- return stream_isatty($this->stream);
- }
-}
diff --git a/vendor/symfony/console/Output/TrimmedBufferOutput.php b/vendor/symfony/console/Output/TrimmedBufferOutput.php
deleted file mode 100644
index 3f4d375f4..000000000
--- a/vendor/symfony/console/Output/TrimmedBufferOutput.php
+++ /dev/null
@@ -1,63 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Output;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Formatter\OutputFormatterInterface;
-
-/**
- * A BufferedOutput that keeps only the last N chars.
- *
- * @author Jérémy Derussé
- */
-class TrimmedBufferOutput extends Output
-{
- private $maxLength;
- private $buffer = '';
-
- public function __construct(int $maxLength, ?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null)
- {
- if ($maxLength <= 0) {
- throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive maxLength. Got %d.', __METHOD__, $maxLength));
- }
-
- parent::__construct($verbosity, $decorated, $formatter);
- $this->maxLength = $maxLength;
- }
-
- /**
- * Empties buffer and returns its content.
- *
- * @return string
- */
- public function fetch()
- {
- $content = $this->buffer;
- $this->buffer = '';
-
- return $content;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function doWrite(string $message, bool $newline)
- {
- $this->buffer .= $message;
-
- if ($newline) {
- $this->buffer .= \PHP_EOL;
- }
-
- $this->buffer = substr($this->buffer, 0 - $this->maxLength);
- }
-}
diff --git a/vendor/symfony/console/Question/ChoiceQuestion.php b/vendor/symfony/console/Question/ChoiceQuestion.php
deleted file mode 100644
index bf1f90487..000000000
--- a/vendor/symfony/console/Question/ChoiceQuestion.php
+++ /dev/null
@@ -1,183 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Question;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-
-/**
- * Represents a choice question.
- *
- * @author Fabien Potencier
- */
-class ChoiceQuestion extends Question
-{
- private $choices;
- private $multiselect = false;
- private $prompt = ' > ';
- private $errorMessage = 'Value "%s" is invalid';
-
- /**
- * @param string $question The question to ask to the user
- * @param array $choices The list of available choices
- * @param mixed $default The default answer to return
- */
- public function __construct(string $question, array $choices, $default = null)
- {
- if (!$choices) {
- throw new \LogicException('Choice question must have at least 1 choice available.');
- }
-
- parent::__construct($question, $default);
-
- $this->choices = $choices;
- $this->setValidator($this->getDefaultValidator());
- $this->setAutocompleterValues($choices);
- }
-
- /**
- * Returns available choices.
- *
- * @return array
- */
- public function getChoices()
- {
- return $this->choices;
- }
-
- /**
- * Sets multiselect option.
- *
- * When multiselect is set to true, multiple choices can be answered.
- *
- * @return $this
- */
- public function setMultiselect(bool $multiselect)
- {
- $this->multiselect = $multiselect;
- $this->setValidator($this->getDefaultValidator());
-
- return $this;
- }
-
- /**
- * Returns whether the choices are multiselect.
- *
- * @return bool
- */
- public function isMultiselect()
- {
- return $this->multiselect;
- }
-
- /**
- * Gets the prompt for choices.
- *
- * @return string
- */
- public function getPrompt()
- {
- return $this->prompt;
- }
-
- /**
- * Sets the prompt for choices.
- *
- * @return $this
- */
- public function setPrompt(string $prompt)
- {
- $this->prompt = $prompt;
-
- return $this;
- }
-
- /**
- * Sets the error message for invalid values.
- *
- * The error message has a string placeholder (%s) for the invalid value.
- *
- * @return $this
- */
- public function setErrorMessage(string $errorMessage)
- {
- $this->errorMessage = $errorMessage;
- $this->setValidator($this->getDefaultValidator());
-
- return $this;
- }
-
- private function getDefaultValidator(): callable
- {
- $choices = $this->choices;
- $errorMessage = $this->errorMessage;
- $multiselect = $this->multiselect;
- $isAssoc = $this->isAssoc($choices);
-
- return function ($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) {
- if ($multiselect) {
- // Check for a separated comma values
- if (!preg_match('/^[^,]+(?:,[^,]+)*$/', (string) $selected, $matches)) {
- throw new InvalidArgumentException(sprintf($errorMessage, $selected));
- }
-
- $selectedChoices = explode(',', (string) $selected);
- } else {
- $selectedChoices = [$selected];
- }
-
- if ($this->isTrimmable()) {
- foreach ($selectedChoices as $k => $v) {
- $selectedChoices[$k] = trim((string) $v);
- }
- }
-
- $multiselectChoices = [];
- foreach ($selectedChoices as $value) {
- $results = [];
- foreach ($choices as $key => $choice) {
- if ($choice === $value) {
- $results[] = $key;
- }
- }
-
- if (\count($results) > 1) {
- throw new InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of "%s".', implode('" or "', $results)));
- }
-
- $result = array_search($value, $choices);
-
- if (!$isAssoc) {
- if (false !== $result) {
- $result = $choices[$result];
- } elseif (isset($choices[$value])) {
- $result = $choices[$value];
- }
- } elseif (false === $result && isset($choices[$value])) {
- $result = $value;
- }
-
- if (false === $result) {
- throw new InvalidArgumentException(sprintf($errorMessage, $value));
- }
-
- // For associative choices, consistently return the key as string:
- $multiselectChoices[] = $isAssoc ? (string) $result : $result;
- }
-
- if ($multiselect) {
- return $multiselectChoices;
- }
-
- return current($multiselectChoices);
- };
- }
-}
diff --git a/vendor/symfony/console/Question/ConfirmationQuestion.php b/vendor/symfony/console/Question/ConfirmationQuestion.php
deleted file mode 100644
index 4228521b9..000000000
--- a/vendor/symfony/console/Question/ConfirmationQuestion.php
+++ /dev/null
@@ -1,57 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Question;
-
-/**
- * Represents a yes/no question.
- *
- * @author Fabien Potencier
- */
-class ConfirmationQuestion extends Question
-{
- private $trueAnswerRegex;
-
- /**
- * @param string $question The question to ask to the user
- * @param bool $default The default answer to return, true or false
- * @param string $trueAnswerRegex A regex to match the "yes" answer
- */
- public function __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y/i')
- {
- parent::__construct($question, $default);
-
- $this->trueAnswerRegex = $trueAnswerRegex;
- $this->setNormalizer($this->getDefaultNormalizer());
- }
-
- /**
- * Returns the default answer normalizer.
- */
- private function getDefaultNormalizer(): callable
- {
- $default = $this->getDefault();
- $regex = $this->trueAnswerRegex;
-
- return function ($answer) use ($default, $regex) {
- if (\is_bool($answer)) {
- return $answer;
- }
-
- $answerIsTrue = (bool) preg_match($regex, $answer);
- if (false === $default) {
- return $answer && $answerIsTrue;
- }
-
- return '' === $answer || $answerIsTrue;
- };
- }
-}
diff --git a/vendor/symfony/console/Question/Question.php b/vendor/symfony/console/Question/Question.php
deleted file mode 100644
index 3a73f04b2..000000000
--- a/vendor/symfony/console/Question/Question.php
+++ /dev/null
@@ -1,299 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Question;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\LogicException;
-
-/**
- * Represents a Question.
- *
- * @author Fabien Potencier
- */
-class Question
-{
- private $question;
- private $attempts;
- private $hidden = false;
- private $hiddenFallback = true;
- private $autocompleterCallback;
- private $validator;
- private $default;
- private $normalizer;
- private $trimmable = true;
- private $multiline = false;
-
- /**
- * @param string $question The question to ask to the user
- * @param string|bool|int|float|null $default The default answer to return if the user enters nothing
- */
- public function __construct(string $question, $default = null)
- {
- $this->question = $question;
- $this->default = $default;
- }
-
- /**
- * Returns the question.
- *
- * @return string
- */
- public function getQuestion()
- {
- return $this->question;
- }
-
- /**
- * Returns the default answer.
- *
- * @return string|bool|int|float|null
- */
- public function getDefault()
- {
- return $this->default;
- }
-
- /**
- * Returns whether the user response accepts newline characters.
- */
- public function isMultiline(): bool
- {
- return $this->multiline;
- }
-
- /**
- * Sets whether the user response should accept newline characters.
- *
- * @return $this
- */
- public function setMultiline(bool $multiline): self
- {
- $this->multiline = $multiline;
-
- return $this;
- }
-
- /**
- * Returns whether the user response must be hidden.
- *
- * @return bool
- */
- public function isHidden()
- {
- return $this->hidden;
- }
-
- /**
- * Sets whether the user response must be hidden or not.
- *
- * @return $this
- *
- * @throws LogicException In case the autocompleter is also used
- */
- public function setHidden(bool $hidden)
- {
- if ($this->autocompleterCallback) {
- throw new LogicException('A hidden question cannot use the autocompleter.');
- }
-
- $this->hidden = $hidden;
-
- return $this;
- }
-
- /**
- * In case the response cannot be hidden, whether to fallback on non-hidden question or not.
- *
- * @return bool
- */
- public function isHiddenFallback()
- {
- return $this->hiddenFallback;
- }
-
- /**
- * Sets whether to fallback on non-hidden question if the response cannot be hidden.
- *
- * @return $this
- */
- public function setHiddenFallback(bool $fallback)
- {
- $this->hiddenFallback = $fallback;
-
- return $this;
- }
-
- /**
- * Gets values for the autocompleter.
- *
- * @return iterable|null
- */
- public function getAutocompleterValues()
- {
- $callback = $this->getAutocompleterCallback();
-
- return $callback ? $callback('') : null;
- }
-
- /**
- * Sets values for the autocompleter.
- *
- * @return $this
- *
- * @throws LogicException
- */
- public function setAutocompleterValues(?iterable $values)
- {
- if (\is_array($values)) {
- $values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values);
-
- $callback = static function () use ($values) {
- return $values;
- };
- } elseif ($values instanceof \Traversable) {
- $valueCache = null;
- $callback = static function () use ($values, &$valueCache) {
- return $valueCache ?? $valueCache = iterator_to_array($values, false);
- };
- } else {
- $callback = null;
- }
-
- return $this->setAutocompleterCallback($callback);
- }
-
- /**
- * Gets the callback function used for the autocompleter.
- */
- public function getAutocompleterCallback(): ?callable
- {
- return $this->autocompleterCallback;
- }
-
- /**
- * Sets the callback function used for the autocompleter.
- *
- * The callback is passed the user input as argument and should return an iterable of corresponding suggestions.
- *
- * @return $this
- */
- public function setAutocompleterCallback(callable $callback = null): self
- {
- if ($this->hidden && null !== $callback) {
- throw new LogicException('A hidden question cannot use the autocompleter.');
- }
-
- $this->autocompleterCallback = $callback;
-
- return $this;
- }
-
- /**
- * Sets a validator for the question.
- *
- * @return $this
- */
- public function setValidator(callable $validator = null)
- {
- $this->validator = $validator;
-
- return $this;
- }
-
- /**
- * Gets the validator for the question.
- *
- * @return callable|null
- */
- public function getValidator()
- {
- return $this->validator;
- }
-
- /**
- * Sets the maximum number of attempts.
- *
- * Null means an unlimited number of attempts.
- *
- * @return $this
- *
- * @throws InvalidArgumentException in case the number of attempts is invalid
- */
- public function setMaxAttempts(?int $attempts)
- {
- if (null !== $attempts && $attempts < 1) {
- throw new InvalidArgumentException('Maximum number of attempts must be a positive value.');
- }
-
- $this->attempts = $attempts;
-
- return $this;
- }
-
- /**
- * Gets the maximum number of attempts.
- *
- * Null means an unlimited number of attempts.
- *
- * @return int|null
- */
- public function getMaxAttempts()
- {
- return $this->attempts;
- }
-
- /**
- * Sets a normalizer for the response.
- *
- * The normalizer can be a callable (a string), a closure or a class implementing __invoke.
- *
- * @return $this
- */
- public function setNormalizer(callable $normalizer)
- {
- $this->normalizer = $normalizer;
-
- return $this;
- }
-
- /**
- * Gets the normalizer for the response.
- *
- * The normalizer can ba a callable (a string), a closure or a class implementing __invoke.
- *
- * @return callable|null
- */
- public function getNormalizer()
- {
- return $this->normalizer;
- }
-
- protected function isAssoc(array $array)
- {
- return (bool) \count(array_filter(array_keys($array), 'is_string'));
- }
-
- public function isTrimmable(): bool
- {
- return $this->trimmable;
- }
-
- /**
- * @return $this
- */
- public function setTrimmable(bool $trimmable): self
- {
- $this->trimmable = $trimmable;
-
- return $this;
- }
-}
diff --git a/vendor/symfony/console/README.md b/vendor/symfony/console/README.md
deleted file mode 100644
index c4c129989..000000000
--- a/vendor/symfony/console/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-Console Component
-=================
-
-The Console component eases the creation of beautiful and testable command line
-interfaces.
-
-Sponsor
--------
-
-The Console component for Symfony 5.4/6.0 is [backed][1] by [Les-Tilleuls.coop][2].
-
-Les-Tilleuls.coop is a team of 50+ Symfony experts who can help you design, develop and
-fix your projects. We provide a wide range of professional services including development,
-consulting, coaching, training and audits. We also are highly skilled in JS, Go and DevOps.
-We are a worker cooperative!
-
-Help Symfony by [sponsoring][3] its development!
-
-Resources
----------
-
- * [Documentation](https://symfony.com/doc/current/components/console.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
-
-Credits
--------
-
-`Resources/bin/hiddeninput.exe` is a third party binary provided within this
-component. Find sources and license at https://github.com/Seldaek/hidden-input.
-
-[1]: https://symfony.com/backers
-[2]: https://les-tilleuls.coop
-[3]: https://symfony.com/sponsor
diff --git a/vendor/symfony/console/Resources/bin/hiddeninput.exe b/vendor/symfony/console/Resources/bin/hiddeninput.exe
deleted file mode 100644
index c8cf65e8d819e6e525121cf6b21f1c2429746038..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 9216
zcmeHNe{@sVeZR8hV88~S)=Hp|Mpn({rC^@)BwNOI{ERJXCYlx+k1K6PLHo
z_e!z_fhOzeA3JTX&-Z@s{rFOgjEwBlqjr!)9f
zjyHz`A+ni`!0Taby{Uj5Y>jQq(k5A+X})PLWAi|{IZbtc8n^^trM{GI=P_15U6d?l
zJJ3PW8XjfHpR}6`k{&5@JcEeH_SqQoQbU62o2YS30W)p_t&Fjy*RXQCZt$gCf|ao|
zx&3R}m6|-Lfi@pua=$26n(UlnWo$>K67*|+#(qL_An=?l0M02AhOSJDv3;~?1ORfw
z76EdK#MpSHqACHLcnJLIYlCSiX4eS@Pr8rN)Xwz0dk7O*y^0_C(Yks2Kvg!
z-d-fJ)F9@k?>)m(XqDKIe2OKfhCQde9fpO0ko24yn*4xzX7q+ze`Z*=aJgwV?D?73
zaJ8UkSk|NN>@-|mB*f`EIK7$ElgAB<7p&p`^Vuq$58#;?B^*Bz7&d$B#+AYUC
z(^m|`7{lqx&b^5$;i`j|S!+u|lcaQplp_&Nb)!>r>vGh3wb!tW
zLq6%bkSt8jO|(vWH>LiPV(Xkp%BiGhl1q!PXXNKVKE!>Y5cHc2%cJOJA{-&ZsSn`T
z#8~TA#(HWH4m>uCd+kCMTFgMI*s*n3!iCOwEI`{vGcVhzDu!Lw%-Ea^JATtrF`q3`+#KvvYJ0vM~A}D#LOD
zlw`4ncB0U*Jji=--Wz#>I&5?hy;MgYW2u91d8ob=7MWfY`u;7Xe-J{Qsb0=0p|SM2
zG|=~mERIj4?gi)Ew|{LIN#oAsh20k_khIYjJBBN6rrIJ=eQO=nE;rTnPSiaQS$1$#
z+|JRh0!IbQIa*f1(TZ}QM;|WO0+jTy(e)ggN4>zqp2E>C>hGPLHjHBh--2%@{EZNE
zbUk{<3MABX&20QwK{MxK8`1Vk>^%dO5i@VTfu>NG3$K4NC=hSPsj9UYy`rNO}sBnB9QdKdIk7G+2_amnWstdTYVg
z7HgLJGC~XLZG`63GwH8PdO_+G(k6~?J8Wj5mQos#21kC4W#2)guQXI)!z^{@F)U)5
z*re+r(2dib3D4P~%Z6TL=$PIkpmm<_#isu%t=%DcIwNkJhMeJ|bpahHO%8h|y~Ccf
zUg#xVk+dyu>Q1O7JZ~8KS>tqi0qK**X*y6yHM71`bT=kFZ=@E%oe2!Km1^2sa>v+onZ%x_>aOJF+N0{i~z|<(IzgT*{0PpQq}E
zQpU35@bm;qI?t_znGI&5&4sZV>+%m}w$(4hSDvLk)l<{5XyMlnCl7C%AjM3XnWvVz
z{NoFsX)JB)SoqABZxUa*Yq+^^(cbq4mL%^lO12c${z{pf+)|kTTI~nQywyYF6}6|8
zlsN9&{-vwTrTyu<5^90_AsIU-ID#ZG@6d%poU44<**%xVe?`uxf}_Mr$SLHLS|K_N
zQnw>(Lr2U=%$-<2D~RSzbG)2W2u^KMDnFFE?GmmbQ)V)fty957F`4OvQ_25E68ITr
z5?`suu`|v?r!y=gFOGj$%9IJ
zuTP=&2GcnoZZ0qSe6YL-*-lg>Q#>?Ew`a=GDc4vI#<1sNdKn?n7iSj0Orl$-#FMFi
zykr>X-Xvi>sVr;92+8*H!r|3L$#o~hXa0z>AmF=z
z?|@FF;*S|S0yqsw0j>Z(3mX-HD!|{N-vYc9paC8Ld=|6?00!6(_%lERupO`&um*4k
z0b~W>e*uhTe4;V;mq>(ox$9FB`wLt!*DKj~!aOh|fLPg*b??tm%5~_6M#02wqeC
zS~wO>TWGnSp^r<0&8f2V6W->w=C+p~daC5e5wNQM*(*
z66^}b0(!q3)zq$mu&VnbR#nr3;h5DS*o7{y66=!#;Dy4$pd1ZH<6WEOi0oJ8SxRL*
z*v-9@Z^2w%^S(w5dO{_9Duby%2RT~;ppxaE$l()x6&}>7Wcg=u_&>f`Vs8OJGTy{X
z2HpG=ThJz<{%|4Qq-~ad0qcrc87n88DHpM(nypwXIkZn<{zIT$ul&BQ?{ApCAZtyr
zs2YpNt@x(G*faTU*HCKnAk(G=Tl~>r1QK8LY~J8mFFGoN5iIkYSwlm4Lsj#g4dsE5
zU-4;*Kdh-zv!rT4N$O}Q&n)?v0-9Y)lRFz58^P-KtKonzrfQ1p@0V_10^0||cGRn9
zRG<-#_TEV2nn4{BOh{YVBR4e!V!D?0K%BAlQN!D%M#k1bHypiIHT)5tlj>p0Pp_;+
z!cqC-JIs@JRhB+#teGs$Cib_=(yjRo4OJg^YPg%58aJVsC(LQ?W6%pn!-#aMZwoPcopo^Rn6BE
z3=c5&W5~pP(C(-2r;PnH-S0{F`runM0ERCf3rESX$+S(MKOXmKJL9zXF}9-lf^xUs
z+bb)+P%L&gV@<4q{6w^xEJ>Y>TQFUeoz0o-yq)jUqww=?wjUO8Y{a5G;DJ0Jr!LL+
zWhgsLuzi&eDrGDn$2DJwpFfH-?SGWbr>qRb?v{P`_%)So)CQgzO^HQ%;y#tJ=knH4
z95jX;^bF#BiuTH^%-j}{9VrZD=R%Q%wselH^p>5
z7d>gWB-st&3Fj%Mt*|tR5iK3J=`xhs&G)I7E>`FO@o7L
z@S$B!pYMuzz5DN@X!O4DPm5n@raPJn-Q#o*m*e^5lk$g?0esg%$;>g5QW-|;c=H2GM}bo2tW^D924wmOkrUbWxcQ#
z#v6bP%Tdfe~jtCRzAL;-OahZ=#yvUixu2-9fD2j$*|YY`F?0wF-{a#
ztr<&kZjZ+81}6ZESqtgW)8kP#s@VLTSUR{}6?U^R*x7RE3Rl&n=VnFFqg9Uqz1n@N9N|=9<4}
zuJfy^+}|D9X&vm3MAdqmu0&UMd^=K>b1hLAm_E!$rZC2b;;T~Dl
zI`Eo_yRY76uM})|6wk9->of(=9&4jLv5#p@OzS~Yl>@pG)^>6`R+KtL{<4ly4o9WiM!%p_pfROU354)e8PIeE
z1_s?#;OX6waNvvb&UQRN(WLbR+}&b#jo&WY-LlwCX}Q*$jGuKYuOGoIoyR(>e}}ix
z+t}Q^cEcC8Y{@h}>HmJ^gD!l@gzwHmiBKl26x_lZVZG2UY!`w;RJd122;US&geQdW
z3Qq}R!gIo5;ka;0I4c-Jq5X6A6?VzK&c4y!ZXdAUYu{r}*!SBXw?Aor+J4-A(*COb
zb^CwV-?3k`zi-cX*c`VzL`RLI(b4MgIrGN
z%ojf`E*6)Gg1A9!7q^N##2zsss^V9~-Qt7d!{UDNZ^XY9pA^3@9ui*?e=7c5d`nD;
z?}~R(p>y1Kw!>|X4ycYEAkcZa*n-R%y!
zqi)Up756UpqwfE7=hfigw$k~G@25gaxF9UGTkV>C(7x1Rbx4jb#|}rxq0vQ!n-c#f
J0sQ~1{4brj`U(I5
diff --git a/vendor/symfony/console/Resources/completion.bash b/vendor/symfony/console/Resources/completion.bash
deleted file mode 100644
index 64b87ccf7..000000000
--- a/vendor/symfony/console/Resources/completion.bash
+++ /dev/null
@@ -1,84 +0,0 @@
-# This file is part of the Symfony package.
-#
-# (c) Fabien Potencier
-#
-# For the full copyright and license information, please view
-# https://symfony.com/doc/current/contributing/code/license.html
-
-_sf_{{ COMMAND_NAME }}() {
- # Use newline as only separator to allow space in completion values
- IFS=$'\n'
- local sf_cmd="${COMP_WORDS[0]}"
-
- # for an alias, get the real script behind it
- sf_cmd_type=$(type -t $sf_cmd)
- if [[ $sf_cmd_type == "alias" ]]; then
- sf_cmd=$(alias $sf_cmd | sed -E "s/alias $sf_cmd='(.*)'/\1/")
- elif [[ $sf_cmd_type == "file" ]]; then
- sf_cmd=$(type -p $sf_cmd)
- fi
-
- if [[ $sf_cmd_type != "function" && ! -x $sf_cmd ]]; then
- return 1
- fi
-
- local cur prev words cword
- _get_comp_words_by_ref -n := cur prev words cword
-
- local completecmd=("$sf_cmd" "_complete" "--no-interaction" "-sbash" "-c$cword" "-S{{ VERSION }}")
- for w in ${words[@]}; do
- w=$(printf -- '%b' "$w")
- # remove quotes from typed values
- quote="${w:0:1}"
- if [ "$quote" == \' ]; then
- w="${w%\'}"
- w="${w#\'}"
- elif [ "$quote" == \" ]; then
- w="${w%\"}"
- w="${w#\"}"
- fi
- # empty values are ignored
- if [ ! -z "$w" ]; then
- completecmd+=("-i$w")
- fi
- done
-
- local sfcomplete
- if sfcomplete=$(${completecmd[@]} 2>&1); then
- local quote suggestions
- quote=${cur:0:1}
-
- # Use single quotes by default if suggestions contains backslash (FQCN)
- if [ "$quote" == '' ] && [[ "$sfcomplete" =~ \\ ]]; then
- quote=\'
- fi
-
- if [ "$quote" == \' ]; then
- # single quotes: no additional escaping (does not accept ' in values)
- suggestions=$(for s in $sfcomplete; do printf $'%q%q%q\n' "$quote" "$s" "$quote"; done)
- elif [ "$quote" == \" ]; then
- # double quotes: double escaping for \ $ ` "
- suggestions=$(for s in $sfcomplete; do
- s=${s//\\/\\\\}
- s=${s//\$/\\\$}
- s=${s//\`/\\\`}
- s=${s//\"/\\\"}
- printf $'%q%q%q\n' "$quote" "$s" "$quote";
- done)
- else
- # no quotes: double escaping
- suggestions=$(for s in $sfcomplete; do printf $'%q\n' $(printf '%q' "$s"); done)
- fi
- COMPREPLY=($(IFS=$'\n' compgen -W "$suggestions" -- $(printf -- "%q" "$cur")))
- __ltrim_colon_completions "$cur"
- else
- if [[ "$sfcomplete" != *"Command \"_complete\" is not defined."* ]]; then
- >&2 echo
- >&2 echo $sfcomplete
- fi
-
- return 1
- fi
-}
-
-complete -F _sf_{{ COMMAND_NAME }} {{ COMMAND_NAME }}
diff --git a/vendor/symfony/console/SignalRegistry/SignalRegistry.php b/vendor/symfony/console/SignalRegistry/SignalRegistry.php
deleted file mode 100644
index 6bee24a42..000000000
--- a/vendor/symfony/console/SignalRegistry/SignalRegistry.php
+++ /dev/null
@@ -1,65 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\SignalRegistry;
-
-final class SignalRegistry
-{
- private $signalHandlers = [];
-
- public function __construct()
- {
- if (\function_exists('pcntl_async_signals')) {
- pcntl_async_signals(true);
- }
- }
-
- public function register(int $signal, callable $signalHandler): void
- {
- if (!isset($this->signalHandlers[$signal])) {
- $previousCallback = pcntl_signal_get_handler($signal);
-
- if (\is_callable($previousCallback)) {
- $this->signalHandlers[$signal][] = $previousCallback;
- }
- }
-
- $this->signalHandlers[$signal][] = $signalHandler;
-
- pcntl_signal($signal, [$this, 'handle']);
- }
-
- public static function isSupported(): bool
- {
- if (!\function_exists('pcntl_signal')) {
- return false;
- }
-
- if (\in_array('pcntl_signal', explode(',', \ini_get('disable_functions')))) {
- return false;
- }
-
- return true;
- }
-
- /**
- * @internal
- */
- public function handle(int $signal): void
- {
- $count = \count($this->signalHandlers[$signal]);
-
- foreach ($this->signalHandlers[$signal] as $i => $signalHandler) {
- $hasNext = $i !== $count - 1;
- $signalHandler($signal, $hasNext);
- }
- }
-}
diff --git a/vendor/symfony/console/SingleCommandApplication.php b/vendor/symfony/console/SingleCommandApplication.php
deleted file mode 100644
index e93c1821b..000000000
--- a/vendor/symfony/console/SingleCommandApplication.php
+++ /dev/null
@@ -1,72 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * @author Grégoire Pineau
- */
-class SingleCommandApplication extends Command
-{
- private $version = 'UNKNOWN';
- private $autoExit = true;
- private $running = false;
-
- /**
- * @return $this
- */
- public function setVersion(string $version): self
- {
- $this->version = $version;
-
- return $this;
- }
-
- /**
- * @final
- *
- * @return $this
- */
- public function setAutoExit(bool $autoExit): self
- {
- $this->autoExit = $autoExit;
-
- return $this;
- }
-
- public function run(InputInterface $input = null, OutputInterface $output = null): int
- {
- if ($this->running) {
- return parent::run($input, $output);
- }
-
- // We use the command name as the application name
- $application = new Application($this->getName() ?: 'UNKNOWN', $this->version);
- $application->setAutoExit($this->autoExit);
- // Fix the usage of the command displayed with "--help"
- $this->setName($_SERVER['argv'][0]);
- $application->add($this);
- $application->setDefaultCommand($this->getName(), true);
-
- $this->running = true;
- try {
- $ret = $application->run($input, $output);
- } finally {
- $this->running = false;
- }
-
- return $ret ?? 1;
- }
-}
diff --git a/vendor/symfony/console/Style/OutputStyle.php b/vendor/symfony/console/Style/OutputStyle.php
deleted file mode 100644
index 67a98ff07..000000000
--- a/vendor/symfony/console/Style/OutputStyle.php
+++ /dev/null
@@ -1,153 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Style;
-
-use Symfony\Component\Console\Formatter\OutputFormatterInterface;
-use Symfony\Component\Console\Helper\ProgressBar;
-use Symfony\Component\Console\Output\ConsoleOutputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * Decorates output to add console style guide helpers.
- *
- * @author Kevin Bond
- */
-abstract class OutputStyle implements OutputInterface, StyleInterface
-{
- private $output;
-
- public function __construct(OutputInterface $output)
- {
- $this->output = $output;
- }
-
- /**
- * {@inheritdoc}
- */
- public function newLine(int $count = 1)
- {
- $this->output->write(str_repeat(\PHP_EOL, $count));
- }
-
- /**
- * @return ProgressBar
- */
- public function createProgressBar(int $max = 0)
- {
- return new ProgressBar($this->output, $max);
- }
-
- /**
- * {@inheritdoc}
- */
- public function write($messages, bool $newline = false, int $type = self::OUTPUT_NORMAL)
- {
- $this->output->write($messages, $newline, $type);
- }
-
- /**
- * {@inheritdoc}
- */
- public function writeln($messages, int $type = self::OUTPUT_NORMAL)
- {
- $this->output->writeln($messages, $type);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setVerbosity(int $level)
- {
- $this->output->setVerbosity($level);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getVerbosity()
- {
- return $this->output->getVerbosity();
- }
-
- /**
- * {@inheritdoc}
- */
- public function setDecorated(bool $decorated)
- {
- $this->output->setDecorated($decorated);
- }
-
- /**
- * {@inheritdoc}
- */
- public function isDecorated()
- {
- return $this->output->isDecorated();
- }
-
- /**
- * {@inheritdoc}
- */
- public function setFormatter(OutputFormatterInterface $formatter)
- {
- $this->output->setFormatter($formatter);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getFormatter()
- {
- return $this->output->getFormatter();
- }
-
- /**
- * {@inheritdoc}
- */
- public function isQuiet()
- {
- return $this->output->isQuiet();
- }
-
- /**
- * {@inheritdoc}
- */
- public function isVerbose()
- {
- return $this->output->isVerbose();
- }
-
- /**
- * {@inheritdoc}
- */
- public function isVeryVerbose()
- {
- return $this->output->isVeryVerbose();
- }
-
- /**
- * {@inheritdoc}
- */
- public function isDebug()
- {
- return $this->output->isDebug();
- }
-
- protected function getErrorOutput()
- {
- if (!$this->output instanceof ConsoleOutputInterface) {
- return $this->output;
- }
-
- return $this->output->getErrorOutput();
- }
-}
diff --git a/vendor/symfony/console/Style/StyleInterface.php b/vendor/symfony/console/Style/StyleInterface.php
deleted file mode 100644
index 38d23b77e..000000000
--- a/vendor/symfony/console/Style/StyleInterface.php
+++ /dev/null
@@ -1,132 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Style;
-
-/**
- * Output style helpers.
- *
- * @author Kevin Bond
- */
-interface StyleInterface
-{
- /**
- * Formats a command title.
- */
- public function title(string $message);
-
- /**
- * Formats a section title.
- */
- public function section(string $message);
-
- /**
- * Formats a list.
- */
- public function listing(array $elements);
-
- /**
- * Formats informational text.
- *
- * @param string|array $message
- */
- public function text($message);
-
- /**
- * Formats a success result bar.
- *
- * @param string|array $message
- */
- public function success($message);
-
- /**
- * Formats an error result bar.
- *
- * @param string|array $message
- */
- public function error($message);
-
- /**
- * Formats an warning result bar.
- *
- * @param string|array $message
- */
- public function warning($message);
-
- /**
- * Formats a note admonition.
- *
- * @param string|array $message
- */
- public function note($message);
-
- /**
- * Formats a caution admonition.
- *
- * @param string|array $message
- */
- public function caution($message);
-
- /**
- * Formats a table.
- */
- public function table(array $headers, array $rows);
-
- /**
- * Asks a question.
- *
- * @return mixed
- */
- public function ask(string $question, string $default = null, callable $validator = null);
-
- /**
- * Asks a question with the user input hidden.
- *
- * @return mixed
- */
- public function askHidden(string $question, callable $validator = null);
-
- /**
- * Asks for confirmation.
- *
- * @return bool
- */
- public function confirm(string $question, bool $default = true);
-
- /**
- * Asks a choice question.
- *
- * @param string|int|null $default
- *
- * @return mixed
- */
- public function choice(string $question, array $choices, $default = null);
-
- /**
- * Add newline(s).
- */
- public function newLine(int $count = 1);
-
- /**
- * Starts the progress output.
- */
- public function progressStart(int $max = 0);
-
- /**
- * Advances the progress output X steps.
- */
- public function progressAdvance(int $step = 1);
-
- /**
- * Finishes the progress output.
- */
- public function progressFinish();
-}
diff --git a/vendor/symfony/console/Style/SymfonyStyle.php b/vendor/symfony/console/Style/SymfonyStyle.php
deleted file mode 100644
index e3c5ac8e7..000000000
--- a/vendor/symfony/console/Style/SymfonyStyle.php
+++ /dev/null
@@ -1,518 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Style;
-
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\RuntimeException;
-use Symfony\Component\Console\Formatter\OutputFormatter;
-use Symfony\Component\Console\Helper\Helper;
-use Symfony\Component\Console\Helper\ProgressBar;
-use Symfony\Component\Console\Helper\SymfonyQuestionHelper;
-use Symfony\Component\Console\Helper\Table;
-use Symfony\Component\Console\Helper\TableCell;
-use Symfony\Component\Console\Helper\TableSeparator;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\ConsoleOutputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Output\TrimmedBufferOutput;
-use Symfony\Component\Console\Question\ChoiceQuestion;
-use Symfony\Component\Console\Question\ConfirmationQuestion;
-use Symfony\Component\Console\Question\Question;
-use Symfony\Component\Console\Terminal;
-
-/**
- * Output decorator helpers for the Symfony Style Guide.
- *
- * @author Kevin Bond
- */
-class SymfonyStyle extends OutputStyle
-{
- public const MAX_LINE_LENGTH = 120;
-
- private $input;
- private $output;
- private $questionHelper;
- private $progressBar;
- private $lineLength;
- private $bufferedOutput;
-
- public function __construct(InputInterface $input, OutputInterface $output)
- {
- $this->input = $input;
- $this->bufferedOutput = new TrimmedBufferOutput(\DIRECTORY_SEPARATOR === '\\' ? 4 : 2, $output->getVerbosity(), false, clone $output->getFormatter());
- // Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not.
- $width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH;
- $this->lineLength = min($width - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
-
- parent::__construct($this->output = $output);
- }
-
- /**
- * Formats a message as a block of text.
- *
- * @param string|array $messages The message to write in the block
- */
- public function block($messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true)
- {
- $messages = \is_array($messages) ? array_values($messages) : [$messages];
-
- $this->autoPrependBlock();
- $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape));
- $this->newLine();
- }
-
- /**
- * {@inheritdoc}
- */
- public function title(string $message)
- {
- $this->autoPrependBlock();
- $this->writeln([
- sprintf('%s>', OutputFormatter::escapeTrailingBackslash($message)),
- sprintf('%s>', str_repeat('=', Helper::width(Helper::removeDecoration($this->getFormatter(), $message)))),
- ]);
- $this->newLine();
- }
-
- /**
- * {@inheritdoc}
- */
- public function section(string $message)
- {
- $this->autoPrependBlock();
- $this->writeln([
- sprintf('%s>', OutputFormatter::escapeTrailingBackslash($message)),
- sprintf('%s>', str_repeat('-', Helper::width(Helper::removeDecoration($this->getFormatter(), $message)))),
- ]);
- $this->newLine();
- }
-
- /**
- * {@inheritdoc}
- */
- public function listing(array $elements)
- {
- $this->autoPrependText();
- $elements = array_map(function ($element) {
- return sprintf(' * %s', $element);
- }, $elements);
-
- $this->writeln($elements);
- $this->newLine();
- }
-
- /**
- * {@inheritdoc}
- */
- public function text($message)
- {
- $this->autoPrependText();
-
- $messages = \is_array($message) ? array_values($message) : [$message];
- foreach ($messages as $message) {
- $this->writeln(sprintf(' %s', $message));
- }
- }
-
- /**
- * Formats a command comment.
- *
- * @param string|array $message
- */
- public function comment($message)
- {
- $this->block($message, null, null, ' // >', false, false);
- }
-
- /**
- * {@inheritdoc}
- */
- public function success($message)
- {
- $this->block($message, 'OK', 'fg=black;bg=green', ' ', true);
- }
-
- /**
- * {@inheritdoc}
- */
- public function error($message)
- {
- $this->block($message, 'ERROR', 'fg=white;bg=red', ' ', true);
- }
-
- /**
- * {@inheritdoc}
- */
- public function warning($message)
- {
- $this->block($message, 'WARNING', 'fg=black;bg=yellow', ' ', true);
- }
-
- /**
- * {@inheritdoc}
- */
- public function note($message)
- {
- $this->block($message, 'NOTE', 'fg=yellow', ' ! ');
- }
-
- /**
- * Formats an info message.
- *
- * @param string|array $message
- */
- public function info($message)
- {
- $this->block($message, 'INFO', 'fg=green', ' ', true);
- }
-
- /**
- * {@inheritdoc}
- */
- public function caution($message)
- {
- $this->block($message, 'CAUTION', 'fg=white;bg=red', ' ! ', true);
- }
-
- /**
- * {@inheritdoc}
- */
- public function table(array $headers, array $rows)
- {
- $this->createTable()
- ->setHeaders($headers)
- ->setRows($rows)
- ->render()
- ;
-
- $this->newLine();
- }
-
- /**
- * Formats a horizontal table.
- */
- public function horizontalTable(array $headers, array $rows)
- {
- $this->createTable()
- ->setHorizontal(true)
- ->setHeaders($headers)
- ->setRows($rows)
- ->render()
- ;
-
- $this->newLine();
- }
-
- /**
- * Formats a list of key/value horizontally.
- *
- * Each row can be one of:
- * * 'A title'
- * * ['key' => 'value']
- * * new TableSeparator()
- *
- * @param string|array|TableSeparator ...$list
- */
- public function definitionList(...$list)
- {
- $headers = [];
- $row = [];
- foreach ($list as $value) {
- if ($value instanceof TableSeparator) {
- $headers[] = $value;
- $row[] = $value;
- continue;
- }
- if (\is_string($value)) {
- $headers[] = new TableCell($value, ['colspan' => 2]);
- $row[] = null;
- continue;
- }
- if (!\is_array($value)) {
- throw new InvalidArgumentException('Value should be an array, string, or an instance of TableSeparator.');
- }
- $headers[] = key($value);
- $row[] = current($value);
- }
-
- $this->horizontalTable($headers, [$row]);
- }
-
- /**
- * {@inheritdoc}
- */
- public function ask(string $question, string $default = null, callable $validator = null)
- {
- $question = new Question($question, $default);
- $question->setValidator($validator);
-
- return $this->askQuestion($question);
- }
-
- /**
- * {@inheritdoc}
- */
- public function askHidden(string $question, callable $validator = null)
- {
- $question = new Question($question);
-
- $question->setHidden(true);
- $question->setValidator($validator);
-
- return $this->askQuestion($question);
- }
-
- /**
- * {@inheritdoc}
- */
- public function confirm(string $question, bool $default = true)
- {
- return $this->askQuestion(new ConfirmationQuestion($question, $default));
- }
-
- /**
- * {@inheritdoc}
- */
- public function choice(string $question, array $choices, $default = null)
- {
- if (null !== $default) {
- $values = array_flip($choices);
- $default = $values[$default] ?? $default;
- }
-
- return $this->askQuestion(new ChoiceQuestion($question, $choices, $default));
- }
-
- /**
- * {@inheritdoc}
- */
- public function progressStart(int $max = 0)
- {
- $this->progressBar = $this->createProgressBar($max);
- $this->progressBar->start();
- }
-
- /**
- * {@inheritdoc}
- */
- public function progressAdvance(int $step = 1)
- {
- $this->getProgressBar()->advance($step);
- }
-
- /**
- * {@inheritdoc}
- */
- public function progressFinish()
- {
- $this->getProgressBar()->finish();
- $this->newLine(2);
- $this->progressBar = null;
- }
-
- /**
- * {@inheritdoc}
- */
- public function createProgressBar(int $max = 0)
- {
- $progressBar = parent::createProgressBar($max);
-
- if ('\\' !== \DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) {
- $progressBar->setEmptyBarCharacter('░'); // light shade character \u2591
- $progressBar->setProgressCharacter('');
- $progressBar->setBarCharacter('▓'); // dark shade character \u2593
- }
-
- return $progressBar;
- }
-
- /**
- * @see ProgressBar::iterate()
- */
- public function progressIterate(iterable $iterable, int $max = null): iterable
- {
- yield from $this->createProgressBar()->iterate($iterable, $max);
-
- $this->newLine(2);
- }
-
- /**
- * @return mixed
- */
- public function askQuestion(Question $question)
- {
- if ($this->input->isInteractive()) {
- $this->autoPrependBlock();
- }
-
- if (!$this->questionHelper) {
- $this->questionHelper = new SymfonyQuestionHelper();
- }
-
- $answer = $this->questionHelper->ask($this->input, $this, $question);
-
- if ($this->input->isInteractive()) {
- $this->newLine();
- $this->bufferedOutput->write("\n");
- }
-
- return $answer;
- }
-
- /**
- * {@inheritdoc}
- */
- public function writeln($messages, int $type = self::OUTPUT_NORMAL)
- {
- if (!is_iterable($messages)) {
- $messages = [$messages];
- }
-
- foreach ($messages as $message) {
- parent::writeln($message, $type);
- $this->writeBuffer($message, true, $type);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function write($messages, bool $newline = false, int $type = self::OUTPUT_NORMAL)
- {
- if (!is_iterable($messages)) {
- $messages = [$messages];
- }
-
- foreach ($messages as $message) {
- parent::write($message, $newline, $type);
- $this->writeBuffer($message, $newline, $type);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function newLine(int $count = 1)
- {
- parent::newLine($count);
- $this->bufferedOutput->write(str_repeat("\n", $count));
- }
-
- /**
- * Returns a new instance which makes use of stderr if available.
- *
- * @return self
- */
- public function getErrorStyle()
- {
- return new self($this->input, $this->getErrorOutput());
- }
-
- public function createTable(): Table
- {
- $output = $this->output instanceof ConsoleOutputInterface ? $this->output->section() : $this->output;
- $style = clone Table::getStyleDefinition('symfony-style-guide');
- $style->setCellHeaderFormat('%s');
-
- return (new Table($output))->setStyle($style);
- }
-
- private function getProgressBar(): ProgressBar
- {
- if (!$this->progressBar) {
- throw new RuntimeException('The ProgressBar is not started.');
- }
-
- return $this->progressBar;
- }
-
- private function autoPrependBlock(): void
- {
- $chars = substr(str_replace(\PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2);
-
- if (!isset($chars[0])) {
- $this->newLine(); // empty history, so we should start with a new line.
-
- return;
- }
- // Prepend new line for each non LF chars (This means no blank line was output before)
- $this->newLine(2 - substr_count($chars, "\n"));
- }
-
- private function autoPrependText(): void
- {
- $fetched = $this->bufferedOutput->fetch();
- // Prepend new line if last char isn't EOL:
- if (!str_ends_with($fetched, "\n")) {
- $this->newLine();
- }
- }
-
- private function writeBuffer(string $message, bool $newLine, int $type): void
- {
- // We need to know if the last chars are PHP_EOL
- $this->bufferedOutput->write($message, $newLine, $type);
- }
-
- private function createBlock(iterable $messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false): array
- {
- $indentLength = 0;
- $prefixLength = Helper::width(Helper::removeDecoration($this->getFormatter(), $prefix));
- $lines = [];
-
- if (null !== $type) {
- $type = sprintf('[%s] ', $type);
- $indentLength = \strlen($type);
- $lineIndentation = str_repeat(' ', $indentLength);
- }
-
- // wrap and add newlines for each element
- foreach ($messages as $key => $message) {
- if ($escape) {
- $message = OutputFormatter::escape($message);
- }
-
- $decorationLength = Helper::width($message) - Helper::width(Helper::removeDecoration($this->getFormatter(), $message));
- $messageLineLength = min($this->lineLength - $prefixLength - $indentLength + $decorationLength, $this->lineLength);
- $messageLines = explode(\PHP_EOL, wordwrap($message, $messageLineLength, \PHP_EOL, true));
- foreach ($messageLines as $messageLine) {
- $lines[] = $messageLine;
- }
-
- if (\count($messages) > 1 && $key < \count($messages) - 1) {
- $lines[] = '';
- }
- }
-
- $firstLineIndex = 0;
- if ($padding && $this->isDecorated()) {
- $firstLineIndex = 1;
- array_unshift($lines, '');
- $lines[] = '';
- }
-
- foreach ($lines as $i => &$line) {
- if (null !== $type) {
- $line = $firstLineIndex === $i ? $type.$line : $lineIndentation.$line;
- }
-
- $line = $prefix.$line;
- $line .= str_repeat(' ', max($this->lineLength - Helper::width(Helper::removeDecoration($this->getFormatter(), $line)), 0));
-
- if ($style) {
- $line = sprintf('<%s>%s>', $style, $line);
- }
- }
-
- return $lines;
- }
-}
diff --git a/vendor/symfony/console/Terminal.php b/vendor/symfony/console/Terminal.php
deleted file mode 100644
index b91e8afc5..000000000
--- a/vendor/symfony/console/Terminal.php
+++ /dev/null
@@ -1,177 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console;
-
-class Terminal
-{
- private static $width;
- private static $height;
- private static $stty;
-
- /**
- * Gets the terminal width.
- *
- * @return int
- */
- public function getWidth()
- {
- $width = getenv('COLUMNS');
- if (false !== $width) {
- return (int) trim($width);
- }
-
- if (null === self::$width) {
- self::initDimensions();
- }
-
- return self::$width ?: 80;
- }
-
- /**
- * Gets the terminal height.
- *
- * @return int
- */
- public function getHeight()
- {
- $height = getenv('LINES');
- if (false !== $height) {
- return (int) trim($height);
- }
-
- if (null === self::$height) {
- self::initDimensions();
- }
-
- return self::$height ?: 50;
- }
-
- /**
- * @internal
- */
- public static function hasSttyAvailable(): bool
- {
- if (null !== self::$stty) {
- return self::$stty;
- }
-
- // skip check if shell_exec function is disabled
- if (!\function_exists('shell_exec')) {
- return false;
- }
-
- return self::$stty = (bool) shell_exec('stty 2> '.('\\' === \DIRECTORY_SEPARATOR ? 'NUL' : '/dev/null'));
- }
-
- private static function initDimensions()
- {
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $ansicon = getenv('ANSICON');
- if (false !== $ansicon && preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim($ansicon), $matches)) {
- // extract [w, H] from "wxh (WxH)"
- // or [w, h] from "wxh"
- self::$width = (int) $matches[1];
- self::$height = isset($matches[4]) ? (int) $matches[4] : (int) $matches[2];
- } elseif (!self::hasVt100Support() && self::hasSttyAvailable()) {
- // only use stty on Windows if the terminal does not support vt100 (e.g. Windows 7 + git-bash)
- // testing for stty in a Windows 10 vt100-enabled console will implicitly disable vt100 support on STDOUT
- self::initDimensionsUsingStty();
- } elseif (null !== $dimensions = self::getConsoleMode()) {
- // extract [w, h] from "wxh"
- self::$width = (int) $dimensions[0];
- self::$height = (int) $dimensions[1];
- }
- } else {
- self::initDimensionsUsingStty();
- }
- }
-
- /**
- * Returns whether STDOUT has vt100 support (some Windows 10+ configurations).
- */
- private static function hasVt100Support(): bool
- {
- return \function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(fopen('php://stdout', 'w'));
- }
-
- /**
- * Initializes dimensions using the output of an stty columns line.
- */
- private static function initDimensionsUsingStty()
- {
- if ($sttyString = self::getSttyColumns()) {
- if (preg_match('/rows.(\d+);.columns.(\d+);/i', $sttyString, $matches)) {
- // extract [w, h] from "rows h; columns w;"
- self::$width = (int) $matches[2];
- self::$height = (int) $matches[1];
- } elseif (preg_match('/;.(\d+).rows;.(\d+).columns/i', $sttyString, $matches)) {
- // extract [w, h] from "; h rows; w columns"
- self::$width = (int) $matches[2];
- self::$height = (int) $matches[1];
- }
- }
- }
-
- /**
- * Runs and parses mode CON if it's available, suppressing any error output.
- *
- * @return int[]|null An array composed of the width and the height or null if it could not be parsed
- */
- private static function getConsoleMode(): ?array
- {
- $info = self::readFromProcess('mode CON');
-
- if (null === $info || !preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) {
- return null;
- }
-
- return [(int) $matches[2], (int) $matches[1]];
- }
-
- /**
- * Runs and parses stty -a if it's available, suppressing any error output.
- */
- private static function getSttyColumns(): ?string
- {
- return self::readFromProcess('stty -a | grep columns');
- }
-
- private static function readFromProcess(string $command): ?string
- {
- if (!\function_exists('proc_open')) {
- return null;
- }
-
- $descriptorspec = [
- 1 => ['pipe', 'w'],
- 2 => ['pipe', 'w'],
- ];
-
- $cp = \function_exists('sapi_windows_cp_set') ? sapi_windows_cp_get() : 0;
-
- $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]);
- if (!\is_resource($process)) {
- return null;
- }
-
- $info = stream_get_contents($pipes[1]);
- fclose($pipes[1]);
- fclose($pipes[2]);
- proc_close($process);
-
- if ($cp) {
- sapi_windows_cp_set($cp);
- }
-
- return $info;
- }
-}
diff --git a/vendor/symfony/console/Tester/ApplicationTester.php b/vendor/symfony/console/Tester/ApplicationTester.php
deleted file mode 100644
index 3a262e81c..000000000
--- a/vendor/symfony/console/Tester/ApplicationTester.php
+++ /dev/null
@@ -1,85 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Tester;
-
-use Symfony\Component\Console\Application;
-use Symfony\Component\Console\Input\ArrayInput;
-
-/**
- * Eases the testing of console applications.
- *
- * When testing an application, don't forget to disable the auto exit flag:
- *
- * $application = new Application();
- * $application->setAutoExit(false);
- *
- * @author Fabien Potencier
- */
-class ApplicationTester
-{
- use TesterTrait;
-
- private $application;
-
- public function __construct(Application $application)
- {
- $this->application = $application;
- }
-
- /**
- * Executes the application.
- *
- * Available options:
- *
- * * interactive: Sets the input interactive flag
- * * decorated: Sets the output decorated flag
- * * verbosity: Sets the output verbosity flag
- * * capture_stderr_separately: Make output of stdOut and stdErr separately available
- *
- * @return int The command exit code
- */
- public function run(array $input, array $options = [])
- {
- $prevShellVerbosity = getenv('SHELL_VERBOSITY');
-
- try {
- $this->input = new ArrayInput($input);
- if (isset($options['interactive'])) {
- $this->input->setInteractive($options['interactive']);
- }
-
- if ($this->inputs) {
- $this->input->setStream(self::createStream($this->inputs));
- }
-
- $this->initOutput($options);
-
- return $this->statusCode = $this->application->run($this->input, $this->output);
- } finally {
- // SHELL_VERBOSITY is set by Application::configureIO so we need to unset/reset it
- // to its previous value to avoid one test's verbosity to spread to the following tests
- if (false === $prevShellVerbosity) {
- if (\function_exists('putenv')) {
- @putenv('SHELL_VERBOSITY');
- }
- unset($_ENV['SHELL_VERBOSITY']);
- unset($_SERVER['SHELL_VERBOSITY']);
- } else {
- if (\function_exists('putenv')) {
- @putenv('SHELL_VERBOSITY='.$prevShellVerbosity);
- }
- $_ENV['SHELL_VERBOSITY'] = $prevShellVerbosity;
- $_SERVER['SHELL_VERBOSITY'] = $prevShellVerbosity;
- }
- }
- }
-}
diff --git a/vendor/symfony/console/Tester/CommandCompletionTester.php b/vendor/symfony/console/Tester/CommandCompletionTester.php
deleted file mode 100644
index ade732752..000000000
--- a/vendor/symfony/console/Tester/CommandCompletionTester.php
+++ /dev/null
@@ -1,56 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Tester;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Completion\CompletionInput;
-use Symfony\Component\Console\Completion\CompletionSuggestions;
-
-/**
- * Eases the testing of command completion.
- *
- * @author Jérôme Tamarelle
- */
-class CommandCompletionTester
-{
- private $command;
-
- public function __construct(Command $command)
- {
- $this->command = $command;
- }
-
- /**
- * Create completion suggestions from input tokens.
- */
- public function complete(array $input): array
- {
- $currentIndex = \count($input);
- if ('' === end($input)) {
- array_pop($input);
- }
- array_unshift($input, $this->command->getName());
-
- $completionInput = CompletionInput::fromTokens($input, $currentIndex);
- $completionInput->bind($this->command->getDefinition());
- $suggestions = new CompletionSuggestions();
-
- $this->command->complete($completionInput, $suggestions);
-
- $options = [];
- foreach ($suggestions->getOptionSuggestions() as $option) {
- $options[] = '--'.$option->getName();
- }
-
- return array_map('strval', array_merge($options, $suggestions->getValueSuggestions()));
- }
-}
diff --git a/vendor/symfony/console/Tester/CommandTester.php b/vendor/symfony/console/Tester/CommandTester.php
deleted file mode 100644
index 6c15c25fb..000000000
--- a/vendor/symfony/console/Tester/CommandTester.php
+++ /dev/null
@@ -1,76 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Tester;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\ArrayInput;
-
-/**
- * Eases the testing of console commands.
- *
- * @author Fabien Potencier
- * @author Robin Chalas
- */
-class CommandTester
-{
- use TesterTrait;
-
- private $command;
-
- public function __construct(Command $command)
- {
- $this->command = $command;
- }
-
- /**
- * Executes the command.
- *
- * Available execution options:
- *
- * * interactive: Sets the input interactive flag
- * * decorated: Sets the output decorated flag
- * * verbosity: Sets the output verbosity flag
- * * capture_stderr_separately: Make output of stdOut and stdErr separately available
- *
- * @param array $input An array of command arguments and options
- * @param array $options An array of execution options
- *
- * @return int The command exit code
- */
- public function execute(array $input, array $options = [])
- {
- // set the command name automatically if the application requires
- // this argument and no command name was passed
- if (!isset($input['command'])
- && (null !== $application = $this->command->getApplication())
- && $application->getDefinition()->hasArgument('command')
- ) {
- $input = array_merge(['command' => $this->command->getName()], $input);
- }
-
- $this->input = new ArrayInput($input);
- // Use an in-memory input stream even if no inputs are set so that QuestionHelper::ask() does not rely on the blocking STDIN.
- $this->input->setStream(self::createStream($this->inputs));
-
- if (isset($options['interactive'])) {
- $this->input->setInteractive($options['interactive']);
- }
-
- if (!isset($options['decorated'])) {
- $options['decorated'] = false;
- }
-
- $this->initOutput($options);
-
- return $this->statusCode = $this->command->run($this->input, $this->output);
- }
-}
diff --git a/vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php b/vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php
deleted file mode 100644
index a47324237..000000000
--- a/vendor/symfony/console/Tester/Constraint/CommandIsSuccessful.php
+++ /dev/null
@@ -1,55 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Tester\Constraint;
-
-use PHPUnit\Framework\Constraint\Constraint;
-use Symfony\Component\Console\Command\Command;
-
-final class CommandIsSuccessful extends Constraint
-{
- /**
- * {@inheritdoc}
- */
- public function toString(): string
- {
- return 'is successful';
- }
-
- /**
- * {@inheritdoc}
- */
- protected function matches($other): bool
- {
- return Command::SUCCESS === $other;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function failureDescription($other): string
- {
- return 'the command '.$this->toString();
- }
-
- /**
- * {@inheritdoc}
- */
- protected function additionalFailureDescription($other): string
- {
- $mapping = [
- Command::FAILURE => 'Command failed.',
- Command::INVALID => 'Command was invalid.',
- ];
-
- return $mapping[$other] ?? sprintf('Command returned exit status %d.', $other);
- }
-}
diff --git a/vendor/symfony/console/Tester/TesterTrait.php b/vendor/symfony/console/Tester/TesterTrait.php
deleted file mode 100644
index f454bbf9d..000000000
--- a/vendor/symfony/console/Tester/TesterTrait.php
+++ /dev/null
@@ -1,197 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Tester;
-
-use PHPUnit\Framework\Assert;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\ConsoleOutput;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Output\StreamOutput;
-use Symfony\Component\Console\Tester\Constraint\CommandIsSuccessful;
-
-/**
- * @author Amrouche Hamza
- */
-trait TesterTrait
-{
- /** @var StreamOutput */
- private $output;
- private $inputs = [];
- private $captureStreamsIndependently = false;
- /** @var InputInterface */
- private $input;
- /** @var int */
- private $statusCode;
-
- /**
- * Gets the display returned by the last execution of the command or application.
- *
- * @return string
- *
- * @throws \RuntimeException If it's called before the execute method
- */
- public function getDisplay(bool $normalize = false)
- {
- if (null === $this->output) {
- throw new \RuntimeException('Output not initialized, did you execute the command before requesting the display?');
- }
-
- rewind($this->output->getStream());
-
- $display = stream_get_contents($this->output->getStream());
-
- if ($normalize) {
- $display = str_replace(\PHP_EOL, "\n", $display);
- }
-
- return $display;
- }
-
- /**
- * Gets the output written to STDERR by the application.
- *
- * @param bool $normalize Whether to normalize end of lines to \n or not
- *
- * @return string
- */
- public function getErrorOutput(bool $normalize = false)
- {
- if (!$this->captureStreamsIndependently) {
- throw new \LogicException('The error output is not available when the tester is run without "capture_stderr_separately" option set.');
- }
-
- rewind($this->output->getErrorOutput()->getStream());
-
- $display = stream_get_contents($this->output->getErrorOutput()->getStream());
-
- if ($normalize) {
- $display = str_replace(\PHP_EOL, "\n", $display);
- }
-
- return $display;
- }
-
- /**
- * Gets the input instance used by the last execution of the command or application.
- *
- * @return InputInterface
- */
- public function getInput()
- {
- return $this->input;
- }
-
- /**
- * Gets the output instance used by the last execution of the command or application.
- *
- * @return OutputInterface
- */
- public function getOutput()
- {
- return $this->output;
- }
-
- /**
- * Gets the status code returned by the last execution of the command or application.
- *
- * @return int
- *
- * @throws \RuntimeException If it's called before the execute method
- */
- public function getStatusCode()
- {
- if (null === $this->statusCode) {
- throw new \RuntimeException('Status code not initialized, did you execute the command before requesting the status code?');
- }
-
- return $this->statusCode;
- }
-
- public function assertCommandIsSuccessful(string $message = ''): void
- {
- Assert::assertThat($this->statusCode, new CommandIsSuccessful(), $message);
- }
-
- /**
- * Sets the user inputs.
- *
- * @param array $inputs An array of strings representing each input
- * passed to the command input stream
- *
- * @return $this
- */
- public function setInputs(array $inputs)
- {
- $this->inputs = $inputs;
-
- return $this;
- }
-
- /**
- * Initializes the output property.
- *
- * Available options:
- *
- * * decorated: Sets the output decorated flag
- * * verbosity: Sets the output verbosity flag
- * * capture_stderr_separately: Make output of stdOut and stdErr separately available
- */
- private function initOutput(array $options)
- {
- $this->captureStreamsIndependently = \array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately'];
- if (!$this->captureStreamsIndependently) {
- $this->output = new StreamOutput(fopen('php://memory', 'w', false));
- if (isset($options['decorated'])) {
- $this->output->setDecorated($options['decorated']);
- }
- if (isset($options['verbosity'])) {
- $this->output->setVerbosity($options['verbosity']);
- }
- } else {
- $this->output = new ConsoleOutput(
- $options['verbosity'] ?? ConsoleOutput::VERBOSITY_NORMAL,
- $options['decorated'] ?? null
- );
-
- $errorOutput = new StreamOutput(fopen('php://memory', 'w', false));
- $errorOutput->setFormatter($this->output->getFormatter());
- $errorOutput->setVerbosity($this->output->getVerbosity());
- $errorOutput->setDecorated($this->output->isDecorated());
-
- $reflectedOutput = new \ReflectionObject($this->output);
- $strErrProperty = $reflectedOutput->getProperty('stderr');
- $strErrProperty->setAccessible(true);
- $strErrProperty->setValue($this->output, $errorOutput);
-
- $reflectedParent = $reflectedOutput->getParentClass();
- $streamProperty = $reflectedParent->getProperty('stream');
- $streamProperty->setAccessible(true);
- $streamProperty->setValue($this->output, fopen('php://memory', 'w', false));
- }
- }
-
- /**
- * @return resource
- */
- private static function createStream(array $inputs)
- {
- $stream = fopen('php://memory', 'r+', false);
-
- foreach ($inputs as $input) {
- fwrite($stream, $input.\PHP_EOL);
- }
-
- rewind($stream);
-
- return $stream;
- }
-}
diff --git a/vendor/symfony/console/composer.json b/vendor/symfony/console/composer.json
deleted file mode 100644
index 4fa4964a1..000000000
--- a/vendor/symfony/console/composer.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "name": "symfony/console",
- "type": "library",
- "description": "Eases the creation of beautiful and testable command line interfaces",
- "keywords": ["console", "cli", "command-line", "terminal"],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1|^3",
- "symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php73": "^1.9",
- "symfony/polyfill-php80": "^1.16",
- "symfony/service-contracts": "^1.1|^2|^3",
- "symfony/string": "^5.1|^6.0"
- },
- "require-dev": {
- "symfony/config": "^4.4|^5.0|^6.0",
- "symfony/event-dispatcher": "^4.4|^5.0|^6.0",
- "symfony/dependency-injection": "^4.4|^5.0|^6.0",
- "symfony/lock": "^4.4|^5.0|^6.0",
- "symfony/process": "^4.4|^5.0|^6.0",
- "symfony/var-dumper": "^4.4|^5.0|^6.0",
- "psr/log": "^1|^2"
- },
- "provide": {
- "psr/log-implementation": "1.0|2.0"
- },
- "suggest": {
- "symfony/event-dispatcher": "",
- "symfony/lock": "",
- "symfony/process": "",
- "psr/log": "For using the console logger"
- },
- "conflict": {
- "psr/log": ">=3",
- "symfony/dependency-injection": "<4.4",
- "symfony/dotenv": "<5.1",
- "symfony/event-dispatcher": "<4.4",
- "symfony/lock": "<4.4",
- "symfony/process": "<4.4"
- },
- "autoload": {
- "psr-4": { "Symfony\\Component\\Console\\": "" },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "minimum-stability": "dev"
-}
diff --git a/vendor/symfony/deprecation-contracts/CHANGELOG.md b/vendor/symfony/deprecation-contracts/CHANGELOG.md
deleted file mode 100644
index 7932e2613..000000000
--- a/vendor/symfony/deprecation-contracts/CHANGELOG.md
+++ /dev/null
@@ -1,5 +0,0 @@
-CHANGELOG
-=========
-
-The changelog is maintained for all Symfony contracts at the following URL:
-https://github.com/symfony/contracts/blob/main/CHANGELOG.md
diff --git a/vendor/symfony/deprecation-contracts/README.md b/vendor/symfony/deprecation-contracts/README.md
deleted file mode 100644
index 9814864c0..000000000
--- a/vendor/symfony/deprecation-contracts/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-Symfony Deprecation Contracts
-=============================
-
-A generic function and convention to trigger deprecation notices.
-
-This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices.
-
-By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component,
-the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments.
-
-The function requires at least 3 arguments:
- - the name of the Composer package that is triggering the deprecation
- - the version of the package that introduced the deprecation
- - the message of the deprecation
- - more arguments can be provided: they will be inserted in the message using `printf()` formatting
-
-Example:
-```php
-trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin');
-```
-
-This will generate the following message:
-`Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.`
-
-While not recommended, the deprecation notices can be completely ignored by declaring an empty
-`function trigger_deprecation() {}` in your application.
diff --git a/vendor/symfony/deprecation-contracts/composer.json b/vendor/symfony/deprecation-contracts/composer.json
deleted file mode 100644
index c6d02d874..000000000
--- a/vendor/symfony/deprecation-contracts/composer.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "symfony/deprecation-contracts",
- "type": "library",
- "description": "A generic function and convention to trigger deprecation notices",
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=8.1"
- },
- "autoload": {
- "files": [
- "function.php"
- ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-main": "3.4-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
- }
- }
-}
diff --git a/vendor/symfony/deprecation-contracts/function.php b/vendor/symfony/deprecation-contracts/function.php
deleted file mode 100644
index 2d56512ba..000000000
--- a/vendor/symfony/deprecation-contracts/function.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (!function_exists('trigger_deprecation')) {
- /**
- * Triggers a silenced deprecation notice.
- *
- * @param string $package The name of the Composer package that is triggering the deprecation
- * @param string $version The version of the package that introduced the deprecation
- * @param string $message The message of the deprecation
- * @param mixed ...$args Values to insert in the message using printf() formatting
- *
- * @author Nicolas Grekas
- */
- function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void
- {
- @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
- }
-}
diff --git a/vendor/symfony/finder/CHANGELOG.md b/vendor/symfony/finder/CHANGELOG.md
deleted file mode 100644
index 6a44e87c2..000000000
--- a/vendor/symfony/finder/CHANGELOG.md
+++ /dev/null
@@ -1,87 +0,0 @@
-CHANGELOG
-=========
-
-5.4.0
------
-
- * Deprecate `Comparator::setTarget()` and `Comparator::setOperator()`
- * Add a constructor to `Comparator` that allows setting target and operator
- * Finder's iterator has now `Symfony\Component\Finder\SplFileInfo` inner type specified
- * Add recursive .gitignore files support
-
-5.0.0
------
-
- * added `$useNaturalSort` argument to `Finder::sortByName()`
-
-4.3.0
------
-
- * added Finder::ignoreVCSIgnored() to ignore files based on rules listed in .gitignore
-
-4.2.0
------
-
- * added $useNaturalSort option to Finder::sortByName() method
- * the `Finder::sortByName()` method will have a new `$useNaturalSort`
- argument in version 5.0, not defining it is deprecated
- * added `Finder::reverseSorting()` to reverse the sorting
-
-4.0.0
------
-
- * removed `ExceptionInterface`
- * removed `Symfony\Component\Finder\Iterator\FilterIterator`
-
-3.4.0
------
-
- * deprecated `Symfony\Component\Finder\Iterator\FilterIterator`
- * added Finder::hasResults() method to check if any results were found
-
-3.3.0
------
-
- * added double-star matching to Glob::toRegex()
-
-3.0.0
------
-
- * removed deprecated classes
-
-2.8.0
------
-
- * deprecated adapters and related classes
-
-2.5.0
------
- * added support for GLOB_BRACE in the paths passed to Finder::in()
-
-2.3.0
------
-
- * added a way to ignore unreadable directories (via Finder::ignoreUnreadableDirs())
- * unified the way subfolders that are not executable are handled by always throwing an AccessDeniedException exception
-
-2.2.0
------
-
- * added Finder::path() and Finder::notPath() methods
- * added finder adapters to improve performance on specific platforms
- * added support for wildcard characters (glob patterns) in the paths passed
- to Finder::in()
-
-2.1.0
------
-
- * added Finder::sortByAccessedTime(), Finder::sortByChangedTime(), and
- Finder::sortByModifiedTime()
- * added Countable to Finder
- * added support for an array of directories as an argument to
- Finder::exclude()
- * added searching based on the file content via Finder::contains() and
- Finder::notContains()
- * added support for the != operator in the Comparator
- * [BC BREAK] filter expressions (used for file name and content) are no more
- considered as regexps but glob patterns when they are enclosed in '*' or '?'
diff --git a/vendor/symfony/finder/Comparator/Comparator.php b/vendor/symfony/finder/Comparator/Comparator.php
deleted file mode 100644
index 3af551f4c..000000000
--- a/vendor/symfony/finder/Comparator/Comparator.php
+++ /dev/null
@@ -1,117 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Comparator;
-
-/**
- * @author Fabien Potencier
- */
-class Comparator
-{
- private $target;
- private $operator = '==';
-
- public function __construct(string $target = null, string $operator = '==')
- {
- if (null === $target) {
- trigger_deprecation('symfony/finder', '5.4', 'Constructing a "%s" without setting "$target" is deprecated.', __CLASS__);
- }
-
- $this->target = $target;
- $this->doSetOperator($operator);
- }
-
- /**
- * Gets the target value.
- *
- * @return string
- */
- public function getTarget()
- {
- if (null === $this->target) {
- trigger_deprecation('symfony/finder', '5.4', 'Calling "%s" without initializing the target is deprecated.', __METHOD__);
- }
-
- return $this->target;
- }
-
- /**
- * @deprecated set the target via the constructor instead
- */
- public function setTarget(string $target)
- {
- trigger_deprecation('symfony/finder', '5.4', '"%s" is deprecated. Set the target via the constructor instead.', __METHOD__);
-
- $this->target = $target;
- }
-
- /**
- * Gets the comparison operator.
- *
- * @return string
- */
- public function getOperator()
- {
- return $this->operator;
- }
-
- /**
- * Sets the comparison operator.
- *
- * @throws \InvalidArgumentException
- *
- * @deprecated set the operator via the constructor instead
- */
- public function setOperator(string $operator)
- {
- trigger_deprecation('symfony/finder', '5.4', '"%s" is deprecated. Set the operator via the constructor instead.', __METHOD__);
-
- $this->doSetOperator('' === $operator ? '==' : $operator);
- }
-
- /**
- * Tests against the target.
- *
- * @param mixed $test A test value
- *
- * @return bool
- */
- public function test($test)
- {
- if (null === $this->target) {
- trigger_deprecation('symfony/finder', '5.4', 'Calling "%s" without initializing the target is deprecated.', __METHOD__);
- }
-
- switch ($this->operator) {
- case '>':
- return $test > $this->target;
- case '>=':
- return $test >= $this->target;
- case '<':
- return $test < $this->target;
- case '<=':
- return $test <= $this->target;
- case '!=':
- return $test != $this->target;
- }
-
- return $test == $this->target;
- }
-
- private function doSetOperator(string $operator): void
- {
- if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) {
- throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator));
- }
-
- $this->operator = $operator;
- }
-}
diff --git a/vendor/symfony/finder/Comparator/DateComparator.php b/vendor/symfony/finder/Comparator/DateComparator.php
deleted file mode 100644
index 8f651e148..000000000
--- a/vendor/symfony/finder/Comparator/DateComparator.php
+++ /dev/null
@@ -1,50 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Comparator;
-
-/**
- * DateCompare compiles date comparisons.
- *
- * @author Fabien Potencier
- */
-class DateComparator extends Comparator
-{
- /**
- * @param string $test A comparison string
- *
- * @throws \InvalidArgumentException If the test is not understood
- */
- public function __construct(string $test)
- {
- if (!preg_match('#^\s*(==|!=|[<>]=?|after|since|before|until)?\s*(.+?)\s*$#i', $test, $matches)) {
- throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a date test.', $test));
- }
-
- try {
- $date = new \DateTime($matches[2]);
- $target = $date->format('U');
- } catch (\Exception $e) {
- throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2]));
- }
-
- $operator = $matches[1] ?? '==';
- if ('since' === $operator || 'after' === $operator) {
- $operator = '>';
- }
-
- if ('until' === $operator || 'before' === $operator) {
- $operator = '<';
- }
-
- parent::__construct($target, $operator);
- }
-}
diff --git a/vendor/symfony/finder/Comparator/NumberComparator.php b/vendor/symfony/finder/Comparator/NumberComparator.php
deleted file mode 100644
index dd3082077..000000000
--- a/vendor/symfony/finder/Comparator/NumberComparator.php
+++ /dev/null
@@ -1,78 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Comparator;
-
-/**
- * NumberComparator compiles a simple comparison to an anonymous
- * subroutine, which you can call with a value to be tested again.
- *
- * Now this would be very pointless, if NumberCompare didn't understand
- * magnitudes.
- *
- * The target value may use magnitudes of kilobytes (k, ki),
- * megabytes (m, mi), or gigabytes (g, gi). Those suffixed
- * with an i use the appropriate 2**n version in accordance with the
- * IEC standard: http://physics.nist.gov/cuu/Units/binary.html
- *
- * Based on the Perl Number::Compare module.
- *
- * @author Fabien Potencier PHP port
- * @author Richard Clamp Perl version
- * @copyright 2004-2005 Fabien Potencier
- * @copyright 2002 Richard Clamp
- *
- * @see http://physics.nist.gov/cuu/Units/binary.html
- */
-class NumberComparator extends Comparator
-{
- /**
- * @param string|null $test A comparison string or null
- *
- * @throws \InvalidArgumentException If the test is not understood
- */
- public function __construct(?string $test)
- {
- if (null === $test || !preg_match('#^\s*(==|!=|[<>]=?)?\s*([0-9\.]+)\s*([kmg]i?)?\s*$#i', $test, $matches)) {
- throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a number test.', $test ?? 'null'));
- }
-
- $target = $matches[2];
- if (!is_numeric($target)) {
- throw new \InvalidArgumentException(sprintf('Invalid number "%s".', $target));
- }
- if (isset($matches[3])) {
- // magnitude
- switch (strtolower($matches[3])) {
- case 'k':
- $target *= 1000;
- break;
- case 'ki':
- $target *= 1024;
- break;
- case 'm':
- $target *= 1000000;
- break;
- case 'mi':
- $target *= 1024 * 1024;
- break;
- case 'g':
- $target *= 1000000000;
- break;
- case 'gi':
- $target *= 1024 * 1024 * 1024;
- break;
- }
- }
-
- parent::__construct($target, $matches[1] ?: '==');
- }
-}
diff --git a/vendor/symfony/finder/Exception/AccessDeniedException.php b/vendor/symfony/finder/Exception/AccessDeniedException.php
deleted file mode 100644
index ee195ea8d..000000000
--- a/vendor/symfony/finder/Exception/AccessDeniedException.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Exception;
-
-/**
- * @author Jean-François Simon
- */
-class AccessDeniedException extends \UnexpectedValueException
-{
-}
diff --git a/vendor/symfony/finder/Exception/DirectoryNotFoundException.php b/vendor/symfony/finder/Exception/DirectoryNotFoundException.php
deleted file mode 100644
index c6cc0f273..000000000
--- a/vendor/symfony/finder/Exception/DirectoryNotFoundException.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Exception;
-
-/**
- * @author Andreas Erhard
- */
-class DirectoryNotFoundException extends \InvalidArgumentException
-{
-}
diff --git a/vendor/symfony/finder/Finder.php b/vendor/symfony/finder/Finder.php
deleted file mode 100644
index 8cc564cd6..000000000
--- a/vendor/symfony/finder/Finder.php
+++ /dev/null
@@ -1,806 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder;
-
-use Symfony\Component\Finder\Comparator\DateComparator;
-use Symfony\Component\Finder\Comparator\NumberComparator;
-use Symfony\Component\Finder\Exception\DirectoryNotFoundException;
-use Symfony\Component\Finder\Iterator\CustomFilterIterator;
-use Symfony\Component\Finder\Iterator\DateRangeFilterIterator;
-use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator;
-use Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator;
-use Symfony\Component\Finder\Iterator\FilecontentFilterIterator;
-use Symfony\Component\Finder\Iterator\FilenameFilterIterator;
-use Symfony\Component\Finder\Iterator\LazyIterator;
-use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator;
-use Symfony\Component\Finder\Iterator\SortableIterator;
-
-/**
- * Finder allows to build rules to find files and directories.
- *
- * It is a thin wrapper around several specialized iterator classes.
- *
- * All rules may be invoked several times.
- *
- * All methods return the current Finder object to allow chaining:
- *
- * $finder = Finder::create()->files()->name('*.php')->in(__DIR__);
- *
- * @author Fabien Potencier
- *
- * @implements \IteratorAggregate
- */
-class Finder implements \IteratorAggregate, \Countable
-{
- public const IGNORE_VCS_FILES = 1;
- public const IGNORE_DOT_FILES = 2;
- public const IGNORE_VCS_IGNORED_FILES = 4;
-
- private $mode = 0;
- private $names = [];
- private $notNames = [];
- private $exclude = [];
- private $filters = [];
- private $depths = [];
- private $sizes = [];
- private $followLinks = false;
- private $reverseSorting = false;
- private $sort = false;
- private $ignore = 0;
- private $dirs = [];
- private $dates = [];
- private $iterators = [];
- private $contains = [];
- private $notContains = [];
- private $paths = [];
- private $notPaths = [];
- private $ignoreUnreadableDirs = false;
-
- private static $vcsPatterns = ['.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'];
-
- public function __construct()
- {
- $this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES;
- }
-
- /**
- * Creates a new Finder.
- *
- * @return static
- */
- public static function create()
- {
- return new static();
- }
-
- /**
- * Restricts the matching to directories only.
- *
- * @return $this
- */
- public function directories()
- {
- $this->mode = Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES;
-
- return $this;
- }
-
- /**
- * Restricts the matching to files only.
- *
- * @return $this
- */
- public function files()
- {
- $this->mode = Iterator\FileTypeFilterIterator::ONLY_FILES;
-
- return $this;
- }
-
- /**
- * Adds tests for the directory depth.
- *
- * Usage:
- *
- * $finder->depth('> 1') // the Finder will start matching at level 1.
- * $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point.
- * $finder->depth(['>= 1', '< 3'])
- *
- * @param string|int|string[]|int[] $levels The depth level expression or an array of depth levels
- *
- * @return $this
- *
- * @see DepthRangeFilterIterator
- * @see NumberComparator
- */
- public function depth($levels)
- {
- foreach ((array) $levels as $level) {
- $this->depths[] = new Comparator\NumberComparator($level);
- }
-
- return $this;
- }
-
- /**
- * Adds tests for file dates (last modified).
- *
- * The date must be something that strtotime() is able to parse:
- *
- * $finder->date('since yesterday');
- * $finder->date('until 2 days ago');
- * $finder->date('> now - 2 hours');
- * $finder->date('>= 2005-10-15');
- * $finder->date(['>= 2005-10-15', '<= 2006-05-27']);
- *
- * @param string|string[] $dates A date range string or an array of date ranges
- *
- * @return $this
- *
- * @see strtotime
- * @see DateRangeFilterIterator
- * @see DateComparator
- */
- public function date($dates)
- {
- foreach ((array) $dates as $date) {
- $this->dates[] = new Comparator\DateComparator($date);
- }
-
- return $this;
- }
-
- /**
- * Adds rules that files must match.
- *
- * You can use patterns (delimited with / sign), globs or simple strings.
- *
- * $finder->name('*.php')
- * $finder->name('/\.php$/') // same as above
- * $finder->name('test.php')
- * $finder->name(['test.py', 'test.php'])
- *
- * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns
- *
- * @return $this
- *
- * @see FilenameFilterIterator
- */
- public function name($patterns)
- {
- $this->names = array_merge($this->names, (array) $patterns);
-
- return $this;
- }
-
- /**
- * Adds rules that files must not match.
- *
- * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns
- *
- * @return $this
- *
- * @see FilenameFilterIterator
- */
- public function notName($patterns)
- {
- $this->notNames = array_merge($this->notNames, (array) $patterns);
-
- return $this;
- }
-
- /**
- * Adds tests that file contents must match.
- *
- * Strings or PCRE patterns can be used:
- *
- * $finder->contains('Lorem ipsum')
- * $finder->contains('/Lorem ipsum/i')
- * $finder->contains(['dolor', '/ipsum/i'])
- *
- * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns
- *
- * @return $this
- *
- * @see FilecontentFilterIterator
- */
- public function contains($patterns)
- {
- $this->contains = array_merge($this->contains, (array) $patterns);
-
- return $this;
- }
-
- /**
- * Adds tests that file contents must not match.
- *
- * Strings or PCRE patterns can be used:
- *
- * $finder->notContains('Lorem ipsum')
- * $finder->notContains('/Lorem ipsum/i')
- * $finder->notContains(['lorem', '/dolor/i'])
- *
- * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns
- *
- * @return $this
- *
- * @see FilecontentFilterIterator
- */
- public function notContains($patterns)
- {
- $this->notContains = array_merge($this->notContains, (array) $patterns);
-
- return $this;
- }
-
- /**
- * Adds rules that filenames must match.
- *
- * You can use patterns (delimited with / sign) or simple strings.
- *
- * $finder->path('some/special/dir')
- * $finder->path('/some\/special\/dir/') // same as above
- * $finder->path(['some dir', 'another/dir'])
- *
- * Use only / as dirname separator.
- *
- * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns
- *
- * @return $this
- *
- * @see FilenameFilterIterator
- */
- public function path($patterns)
- {
- $this->paths = array_merge($this->paths, (array) $patterns);
-
- return $this;
- }
-
- /**
- * Adds rules that filenames must not match.
- *
- * You can use patterns (delimited with / sign) or simple strings.
- *
- * $finder->notPath('some/special/dir')
- * $finder->notPath('/some\/special\/dir/') // same as above
- * $finder->notPath(['some/file.txt', 'another/file.log'])
- *
- * Use only / as dirname separator.
- *
- * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns
- *
- * @return $this
- *
- * @see FilenameFilterIterator
- */
- public function notPath($patterns)
- {
- $this->notPaths = array_merge($this->notPaths, (array) $patterns);
-
- return $this;
- }
-
- /**
- * Adds tests for file sizes.
- *
- * $finder->size('> 10K');
- * $finder->size('<= 1Ki');
- * $finder->size(4);
- * $finder->size(['> 10K', '< 20K'])
- *
- * @param string|int|string[]|int[] $sizes A size range string or an integer or an array of size ranges
- *
- * @return $this
- *
- * @see SizeRangeFilterIterator
- * @see NumberComparator
- */
- public function size($sizes)
- {
- foreach ((array) $sizes as $size) {
- $this->sizes[] = new Comparator\NumberComparator($size);
- }
-
- return $this;
- }
-
- /**
- * Excludes directories.
- *
- * Directories passed as argument must be relative to the ones defined with the `in()` method. For example:
- *
- * $finder->in(__DIR__)->exclude('ruby');
- *
- * @param string|array $dirs A directory path or an array of directories
- *
- * @return $this
- *
- * @see ExcludeDirectoryFilterIterator
- */
- public function exclude($dirs)
- {
- $this->exclude = array_merge($this->exclude, (array) $dirs);
-
- return $this;
- }
-
- /**
- * Excludes "hidden" directories and files (starting with a dot).
- *
- * This option is enabled by default.
- *
- * @return $this
- *
- * @see ExcludeDirectoryFilterIterator
- */
- public function ignoreDotFiles(bool $ignoreDotFiles)
- {
- if ($ignoreDotFiles) {
- $this->ignore |= static::IGNORE_DOT_FILES;
- } else {
- $this->ignore &= ~static::IGNORE_DOT_FILES;
- }
-
- return $this;
- }
-
- /**
- * Forces the finder to ignore version control directories.
- *
- * This option is enabled by default.
- *
- * @return $this
- *
- * @see ExcludeDirectoryFilterIterator
- */
- public function ignoreVCS(bool $ignoreVCS)
- {
- if ($ignoreVCS) {
- $this->ignore |= static::IGNORE_VCS_FILES;
- } else {
- $this->ignore &= ~static::IGNORE_VCS_FILES;
- }
-
- return $this;
- }
-
- /**
- * Forces Finder to obey .gitignore and ignore files based on rules listed there.
- *
- * This option is disabled by default.
- *
- * @return $this
- */
- public function ignoreVCSIgnored(bool $ignoreVCSIgnored)
- {
- if ($ignoreVCSIgnored) {
- $this->ignore |= static::IGNORE_VCS_IGNORED_FILES;
- } else {
- $this->ignore &= ~static::IGNORE_VCS_IGNORED_FILES;
- }
-
- return $this;
- }
-
- /**
- * Adds VCS patterns.
- *
- * @see ignoreVCS()
- *
- * @param string|string[] $pattern VCS patterns to ignore
- */
- public static function addVCSPattern($pattern)
- {
- foreach ((array) $pattern as $p) {
- self::$vcsPatterns[] = $p;
- }
-
- self::$vcsPatterns = array_unique(self::$vcsPatterns);
- }
-
- /**
- * Sorts files and directories by an anonymous function.
- *
- * The anonymous function receives two \SplFileInfo instances to compare.
- *
- * This can be slow as all the matching files and directories must be retrieved for comparison.
- *
- * @return $this
- *
- * @see SortableIterator
- */
- public function sort(\Closure $closure)
- {
- $this->sort = $closure;
-
- return $this;
- }
-
- /**
- * Sorts files and directories by name.
- *
- * This can be slow as all the matching files and directories must be retrieved for comparison.
- *
- * @return $this
- *
- * @see SortableIterator
- */
- public function sortByName(bool $useNaturalSort = false)
- {
- $this->sort = $useNaturalSort ? Iterator\SortableIterator::SORT_BY_NAME_NATURAL : Iterator\SortableIterator::SORT_BY_NAME;
-
- return $this;
- }
-
- /**
- * Sorts files and directories by type (directories before files), then by name.
- *
- * This can be slow as all the matching files and directories must be retrieved for comparison.
- *
- * @return $this
- *
- * @see SortableIterator
- */
- public function sortByType()
- {
- $this->sort = Iterator\SortableIterator::SORT_BY_TYPE;
-
- return $this;
- }
-
- /**
- * Sorts files and directories by the last accessed time.
- *
- * This is the time that the file was last accessed, read or written to.
- *
- * This can be slow as all the matching files and directories must be retrieved for comparison.
- *
- * @return $this
- *
- * @see SortableIterator
- */
- public function sortByAccessedTime()
- {
- $this->sort = Iterator\SortableIterator::SORT_BY_ACCESSED_TIME;
-
- return $this;
- }
-
- /**
- * Reverses the sorting.
- *
- * @return $this
- */
- public function reverseSorting()
- {
- $this->reverseSorting = true;
-
- return $this;
- }
-
- /**
- * Sorts files and directories by the last inode changed time.
- *
- * This is the time that the inode information was last modified (permissions, owner, group or other metadata).
- *
- * On Windows, since inode is not available, changed time is actually the file creation time.
- *
- * This can be slow as all the matching files and directories must be retrieved for comparison.
- *
- * @return $this
- *
- * @see SortableIterator
- */
- public function sortByChangedTime()
- {
- $this->sort = Iterator\SortableIterator::SORT_BY_CHANGED_TIME;
-
- return $this;
- }
-
- /**
- * Sorts files and directories by the last modified time.
- *
- * This is the last time the actual contents of the file were last modified.
- *
- * This can be slow as all the matching files and directories must be retrieved for comparison.
- *
- * @return $this
- *
- * @see SortableIterator
- */
- public function sortByModifiedTime()
- {
- $this->sort = Iterator\SortableIterator::SORT_BY_MODIFIED_TIME;
-
- return $this;
- }
-
- /**
- * Filters the iterator with an anonymous function.
- *
- * The anonymous function receives a \SplFileInfo and must return false
- * to remove files.
- *
- * @return $this
- *
- * @see CustomFilterIterator
- */
- public function filter(\Closure $closure)
- {
- $this->filters[] = $closure;
-
- return $this;
- }
-
- /**
- * Forces the following of symlinks.
- *
- * @return $this
- */
- public function followLinks()
- {
- $this->followLinks = true;
-
- return $this;
- }
-
- /**
- * Tells finder to ignore unreadable directories.
- *
- * By default, scanning unreadable directories content throws an AccessDeniedException.
- *
- * @return $this
- */
- public function ignoreUnreadableDirs(bool $ignore = true)
- {
- $this->ignoreUnreadableDirs = $ignore;
-
- return $this;
- }
-
- /**
- * Searches files and directories which match defined rules.
- *
- * @param string|string[] $dirs A directory path or an array of directories
- *
- * @return $this
- *
- * @throws DirectoryNotFoundException if one of the directories does not exist
- */
- public function in($dirs)
- {
- $resolvedDirs = [];
-
- foreach ((array) $dirs as $dir) {
- if (is_dir($dir)) {
- $resolvedDirs[] = [$this->normalizeDir($dir)];
- } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) {
- sort($glob);
- $resolvedDirs[] = array_map([$this, 'normalizeDir'], $glob);
- } else {
- throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir));
- }
- }
-
- $this->dirs = array_merge($this->dirs, ...$resolvedDirs);
-
- return $this;
- }
-
- /**
- * Returns an Iterator for the current Finder configuration.
- *
- * This method implements the IteratorAggregate interface.
- *
- * @return \Iterator
- *
- * @throws \LogicException if the in() method has not been called
- */
- #[\ReturnTypeWillChange]
- public function getIterator()
- {
- if (0 === \count($this->dirs) && 0 === \count($this->iterators)) {
- throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.');
- }
-
- if (1 === \count($this->dirs) && 0 === \count($this->iterators)) {
- $iterator = $this->searchInDirectory($this->dirs[0]);
-
- if ($this->sort || $this->reverseSorting) {
- $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator();
- }
-
- return $iterator;
- }
-
- $iterator = new \AppendIterator();
- foreach ($this->dirs as $dir) {
- $iterator->append(new \IteratorIterator(new LazyIterator(function () use ($dir) {
- return $this->searchInDirectory($dir);
- })));
- }
-
- foreach ($this->iterators as $it) {
- $iterator->append($it);
- }
-
- if ($this->sort || $this->reverseSorting) {
- $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator();
- }
-
- return $iterator;
- }
-
- /**
- * Appends an existing set of files/directories to the finder.
- *
- * The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array.
- *
- * @return $this
- *
- * @throws \InvalidArgumentException when the given argument is not iterable
- */
- public function append(iterable $iterator)
- {
- if ($iterator instanceof \IteratorAggregate) {
- $this->iterators[] = $iterator->getIterator();
- } elseif ($iterator instanceof \Iterator) {
- $this->iterators[] = $iterator;
- } elseif (is_iterable($iterator)) {
- $it = new \ArrayIterator();
- foreach ($iterator as $file) {
- $file = $file instanceof \SplFileInfo ? $file : new \SplFileInfo($file);
- $it[$file->getPathname()] = $file;
- }
- $this->iterators[] = $it;
- } else {
- throw new \InvalidArgumentException('Finder::append() method wrong argument type.');
- }
-
- return $this;
- }
-
- /**
- * Check if any results were found.
- *
- * @return bool
- */
- public function hasResults()
- {
- foreach ($this->getIterator() as $_) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Counts all the results collected by the iterators.
- *
- * @return int
- */
- #[\ReturnTypeWillChange]
- public function count()
- {
- return iterator_count($this->getIterator());
- }
-
- private function searchInDirectory(string $dir): \Iterator
- {
- $exclude = $this->exclude;
- $notPaths = $this->notPaths;
-
- if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) {
- $exclude = array_merge($exclude, self::$vcsPatterns);
- }
-
- if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) {
- $notPaths[] = '#(^|/)\..+(/|$)#';
- }
-
- $minDepth = 0;
- $maxDepth = \PHP_INT_MAX;
-
- foreach ($this->depths as $comparator) {
- switch ($comparator->getOperator()) {
- case '>':
- $minDepth = $comparator->getTarget() + 1;
- break;
- case '>=':
- $minDepth = $comparator->getTarget();
- break;
- case '<':
- $maxDepth = $comparator->getTarget() - 1;
- break;
- case '<=':
- $maxDepth = $comparator->getTarget();
- break;
- default:
- $minDepth = $maxDepth = $comparator->getTarget();
- }
- }
-
- $flags = \RecursiveDirectoryIterator::SKIP_DOTS;
-
- if ($this->followLinks) {
- $flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS;
- }
-
- $iterator = new Iterator\RecursiveDirectoryIterator($dir, $flags, $this->ignoreUnreadableDirs);
-
- if ($exclude) {
- $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $exclude);
- }
-
- $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST);
-
- if ($minDepth > 0 || $maxDepth < \PHP_INT_MAX) {
- $iterator = new Iterator\DepthRangeFilterIterator($iterator, $minDepth, $maxDepth);
- }
-
- if ($this->mode) {
- $iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode);
- }
-
- if ($this->names || $this->notNames) {
- $iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames);
- }
-
- if ($this->contains || $this->notContains) {
- $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains);
- }
-
- if ($this->sizes) {
- $iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes);
- }
-
- if ($this->dates) {
- $iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates);
- }
-
- if ($this->filters) {
- $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters);
- }
-
- if ($this->paths || $notPaths) {
- $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $notPaths);
- }
-
- if (static::IGNORE_VCS_IGNORED_FILES === (static::IGNORE_VCS_IGNORED_FILES & $this->ignore)) {
- $iterator = new Iterator\VcsIgnoredFilterIterator($iterator, $dir);
- }
-
- return $iterator;
- }
-
- /**
- * Normalizes given directory names by removing trailing slashes.
- *
- * Excluding: (s)ftp:// or ssh2.(s)ftp:// wrapper
- */
- private function normalizeDir(string $dir): string
- {
- if ('/' === $dir) {
- return $dir;
- }
-
- $dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
-
- if (preg_match('#^(ssh2\.)?s?ftp://#', $dir)) {
- $dir .= '/';
- }
-
- return $dir;
- }
-}
diff --git a/vendor/symfony/finder/Gitignore.php b/vendor/symfony/finder/Gitignore.php
deleted file mode 100644
index d42cca1dc..000000000
--- a/vendor/symfony/finder/Gitignore.php
+++ /dev/null
@@ -1,93 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder;
-
-/**
- * Gitignore matches against text.
- *
- * @author Michael Voříšek
- * @author Ahmed Abdou
- */
-class Gitignore
-{
- /**
- * Returns a regexp which is the equivalent of the gitignore pattern.
- *
- * Format specification: https://git-scm.com/docs/gitignore#_pattern_format
- */
- public static function toRegex(string $gitignoreFileContent): string
- {
- return self::buildRegex($gitignoreFileContent, false);
- }
-
- public static function toRegexMatchingNegatedPatterns(string $gitignoreFileContent): string
- {
- return self::buildRegex($gitignoreFileContent, true);
- }
-
- private static function buildRegex(string $gitignoreFileContent, bool $inverted): string
- {
- $gitignoreFileContent = preg_replace('~(?
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder;
-
-/**
- * Glob matches globbing patterns against text.
- *
- * if match_glob("foo.*", "foo.bar") echo "matched\n";
- *
- * // prints foo.bar and foo.baz
- * $regex = glob_to_regex("foo.*");
- * for (['foo.bar', 'foo.baz', 'foo', 'bar'] as $t)
- * {
- * if (/$regex/) echo "matched: $car\n";
- * }
- *
- * Glob implements glob(3) style matching that can be used to match
- * against text, rather than fetching names from a filesystem.
- *
- * Based on the Perl Text::Glob module.
- *
- * @author Fabien Potencier PHP port
- * @author Richard Clamp Perl version
- * @copyright 2004-2005 Fabien Potencier
- * @copyright 2002 Richard Clamp
- */
-class Glob
-{
- /**
- * Returns a regexp which is the equivalent of the glob pattern.
- *
- * @return string
- */
- public static function toRegex(string $glob, bool $strictLeadingDot = true, bool $strictWildcardSlash = true, string $delimiter = '#')
- {
- $firstByte = true;
- $escaping = false;
- $inCurlies = 0;
- $regex = '';
- $sizeGlob = \strlen($glob);
- for ($i = 0; $i < $sizeGlob; ++$i) {
- $car = $glob[$i];
- if ($firstByte && $strictLeadingDot && '.' !== $car) {
- $regex .= '(?=[^\.])';
- }
-
- $firstByte = '/' === $car;
-
- if ($firstByte && $strictWildcardSlash && isset($glob[$i + 2]) && '**' === $glob[$i + 1].$glob[$i + 2] && (!isset($glob[$i + 3]) || '/' === $glob[$i + 3])) {
- $car = '[^/]++/';
- if (!isset($glob[$i + 3])) {
- $car .= '?';
- }
-
- if ($strictLeadingDot) {
- $car = '(?=[^\.])'.$car;
- }
-
- $car = '/(?:'.$car.')*';
- $i += 2 + isset($glob[$i + 3]);
-
- if ('/' === $delimiter) {
- $car = str_replace('/', '\\/', $car);
- }
- }
-
- if ($delimiter === $car || '.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) {
- $regex .= "\\$car";
- } elseif ('*' === $car) {
- $regex .= $escaping ? '\\*' : ($strictWildcardSlash ? '[^/]*' : '.*');
- } elseif ('?' === $car) {
- $regex .= $escaping ? '\\?' : ($strictWildcardSlash ? '[^/]' : '.');
- } elseif ('{' === $car) {
- $regex .= $escaping ? '\\{' : '(';
- if (!$escaping) {
- ++$inCurlies;
- }
- } elseif ('}' === $car && $inCurlies) {
- $regex .= $escaping ? '}' : ')';
- if (!$escaping) {
- --$inCurlies;
- }
- } elseif (',' === $car && $inCurlies) {
- $regex .= $escaping ? ',' : '|';
- } elseif ('\\' === $car) {
- if ($escaping) {
- $regex .= '\\\\';
- $escaping = false;
- } else {
- $escaping = true;
- }
-
- continue;
- } else {
- $regex .= $car;
- }
- $escaping = false;
- }
-
- return $delimiter.'^'.$regex.'$'.$delimiter;
- }
-}
diff --git a/vendor/symfony/finder/Iterator/CustomFilterIterator.php b/vendor/symfony/finder/Iterator/CustomFilterIterator.php
deleted file mode 100644
index f7bf19b87..000000000
--- a/vendor/symfony/finder/Iterator/CustomFilterIterator.php
+++ /dev/null
@@ -1,64 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * CustomFilterIterator filters files by applying anonymous functions.
- *
- * The anonymous function receives a \SplFileInfo and must return false
- * to remove files.
- *
- * @author Fabien Potencier
- *
- * @extends \FilterIterator
- */
-class CustomFilterIterator extends \FilterIterator
-{
- private $filters = [];
-
- /**
- * @param \Iterator $iterator The Iterator to filter
- * @param callable[] $filters An array of PHP callbacks
- *
- * @throws \InvalidArgumentException
- */
- public function __construct(\Iterator $iterator, array $filters)
- {
- foreach ($filters as $filter) {
- if (!\is_callable($filter)) {
- throw new \InvalidArgumentException('Invalid PHP callback.');
- }
- }
- $this->filters = $filters;
-
- parent::__construct($iterator);
- }
-
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- $fileinfo = $this->current();
-
- foreach ($this->filters as $filter) {
- if (false === $filter($fileinfo)) {
- return false;
- }
- }
-
- return true;
- }
-}
diff --git a/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php b/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php
deleted file mode 100644
index f592e1913..000000000
--- a/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php
+++ /dev/null
@@ -1,61 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-use Symfony\Component\Finder\Comparator\DateComparator;
-
-/**
- * DateRangeFilterIterator filters out files that are not in the given date range (last modified dates).
- *
- * @author Fabien Potencier
- *
- * @extends \FilterIterator
- */
-class DateRangeFilterIterator extends \FilterIterator
-{
- private $comparators = [];
-
- /**
- * @param \Iterator $iterator
- * @param DateComparator[] $comparators
- */
- public function __construct(\Iterator $iterator, array $comparators)
- {
- $this->comparators = $comparators;
-
- parent::__construct($iterator);
- }
-
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- $fileinfo = $this->current();
-
- if (!file_exists($fileinfo->getPathname())) {
- return false;
- }
-
- $filedate = $fileinfo->getMTime();
- foreach ($this->comparators as $compare) {
- if (!$compare->test($filedate)) {
- return false;
- }
- }
-
- return true;
- }
-}
diff --git a/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php b/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php
deleted file mode 100644
index f593a3f08..000000000
--- a/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php
+++ /dev/null
@@ -1,51 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * DepthRangeFilterIterator limits the directory depth.
- *
- * @author Fabien Potencier
- *
- * @template-covariant TKey
- * @template-covariant TValue
- *
- * @extends \FilterIterator
- */
-class DepthRangeFilterIterator extends \FilterIterator
-{
- private $minDepth = 0;
-
- /**
- * @param \RecursiveIteratorIterator<\RecursiveIterator> $iterator The Iterator to filter
- * @param int $minDepth The min depth
- * @param int $maxDepth The max depth
- */
- public function __construct(\RecursiveIteratorIterator $iterator, int $minDepth = 0, int $maxDepth = \PHP_INT_MAX)
- {
- $this->minDepth = $minDepth;
- $iterator->setMaxDepth(\PHP_INT_MAX === $maxDepth ? -1 : $maxDepth);
-
- parent::__construct($iterator);
- }
-
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- return $this->getInnerIterator()->getDepth() >= $this->minDepth;
- }
-}
diff --git a/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php b/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php
deleted file mode 100644
index 39797c82c..000000000
--- a/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php
+++ /dev/null
@@ -1,97 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * ExcludeDirectoryFilterIterator filters out directories.
- *
- * @author Fabien Potencier
- *
- * @extends \FilterIterator
- *
- * @implements \RecursiveIterator
- */
-class ExcludeDirectoryFilterIterator extends \FilterIterator implements \RecursiveIterator
-{
- private $iterator;
- private $isRecursive;
- private $excludedDirs = [];
- private $excludedPattern;
-
- /**
- * @param \Iterator $iterator The Iterator to filter
- * @param string[] $directories An array of directories to exclude
- */
- public function __construct(\Iterator $iterator, array $directories)
- {
- $this->iterator = $iterator;
- $this->isRecursive = $iterator instanceof \RecursiveIterator;
- $patterns = [];
- foreach ($directories as $directory) {
- $directory = rtrim($directory, '/');
- if (!$this->isRecursive || str_contains($directory, '/')) {
- $patterns[] = preg_quote($directory, '#');
- } else {
- $this->excludedDirs[$directory] = true;
- }
- }
- if ($patterns) {
- $this->excludedPattern = '#(?:^|/)(?:'.implode('|', $patterns).')(?:/|$)#';
- }
-
- parent::__construct($iterator);
- }
-
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) {
- return false;
- }
-
- if ($this->excludedPattern) {
- $path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath();
- $path = str_replace('\\', '/', $path);
-
- return !preg_match($this->excludedPattern, $path);
- }
-
- return true;
- }
-
- /**
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function hasChildren()
- {
- return $this->isRecursive && $this->iterator->hasChildren();
- }
-
- /**
- * @return self
- */
- #[\ReturnTypeWillChange]
- public function getChildren()
- {
- $children = new self($this->iterator->getChildren(), []);
- $children->excludedDirs = $this->excludedDirs;
- $children->excludedPattern = $this->excludedPattern;
-
- return $children;
- }
-}
diff --git a/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php b/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php
deleted file mode 100644
index 793ae3509..000000000
--- a/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php
+++ /dev/null
@@ -1,56 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * FileTypeFilterIterator only keeps files, directories, or both.
- *
- * @author Fabien Potencier
- *
- * @extends \FilterIterator
- */
-class FileTypeFilterIterator extends \FilterIterator
-{
- public const ONLY_FILES = 1;
- public const ONLY_DIRECTORIES = 2;
-
- private $mode;
-
- /**
- * @param \Iterator $iterator The Iterator to filter
- * @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES)
- */
- public function __construct(\Iterator $iterator, int $mode)
- {
- $this->mode = $mode;
-
- parent::__construct($iterator);
- }
-
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- $fileinfo = $this->current();
- if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES & $this->mode) && $fileinfo->isFile()) {
- return false;
- } elseif (self::ONLY_FILES === (self::ONLY_FILES & $this->mode) && $fileinfo->isDir()) {
- return false;
- }
-
- return true;
- }
-}
diff --git a/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php b/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php
deleted file mode 100644
index 79f8c29d3..000000000
--- a/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php
+++ /dev/null
@@ -1,61 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * FilecontentFilterIterator filters files by their contents using patterns (regexps or strings).
- *
- * @author Fabien Potencier
- * @author Włodzimierz Gajda
- *
- * @extends MultiplePcreFilterIterator
- */
-class FilecontentFilterIterator extends MultiplePcreFilterIterator
-{
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- if (!$this->matchRegexps && !$this->noMatchRegexps) {
- return true;
- }
-
- $fileinfo = $this->current();
-
- if ($fileinfo->isDir() || !$fileinfo->isReadable()) {
- return false;
- }
-
- $content = $fileinfo->getContents();
- if (!$content) {
- return false;
- }
-
- return $this->isAccepted($content);
- }
-
- /**
- * Converts string to regexp if necessary.
- *
- * @param string $str Pattern: string or regexp
- *
- * @return string
- */
- protected function toRegex(string $str)
- {
- return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/';
- }
-}
diff --git a/vendor/symfony/finder/Iterator/FilenameFilterIterator.php b/vendor/symfony/finder/Iterator/FilenameFilterIterator.php
deleted file mode 100644
index 77b3b2419..000000000
--- a/vendor/symfony/finder/Iterator/FilenameFilterIterator.php
+++ /dev/null
@@ -1,50 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-use Symfony\Component\Finder\Glob;
-
-/**
- * FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string).
- *
- * @author Fabien Potencier
- *
- * @extends MultiplePcreFilterIterator
- */
-class FilenameFilterIterator extends MultiplePcreFilterIterator
-{
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- return $this->isAccepted($this->current()->getFilename());
- }
-
- /**
- * Converts glob to regexp.
- *
- * PCRE patterns are left unchanged.
- * Glob strings are transformed with Glob::toRegex().
- *
- * @param string $str Pattern: glob or regexp
- *
- * @return string
- */
- protected function toRegex(string $str)
- {
- return $this->isRegex($str) ? $str : Glob::toRegex($str);
- }
-}
diff --git a/vendor/symfony/finder/Iterator/LazyIterator.php b/vendor/symfony/finder/Iterator/LazyIterator.php
deleted file mode 100644
index 32cc37ff1..000000000
--- a/vendor/symfony/finder/Iterator/LazyIterator.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * @author Jérémy Derussé
- *
- * @internal
- */
-class LazyIterator implements \IteratorAggregate
-{
- private $iteratorFactory;
-
- public function __construct(callable $iteratorFactory)
- {
- $this->iteratorFactory = $iteratorFactory;
- }
-
- public function getIterator(): \Traversable
- {
- yield from ($this->iteratorFactory)();
- }
-}
diff --git a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php b/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php
deleted file mode 100644
index 564765d8f..000000000
--- a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php
+++ /dev/null
@@ -1,117 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings).
- *
- * @author Fabien Potencier
- *
- * @template-covariant TKey
- * @template-covariant TValue
- *
- * @extends \FilterIterator
- */
-abstract class MultiplePcreFilterIterator extends \FilterIterator
-{
- protected $matchRegexps = [];
- protected $noMatchRegexps = [];
-
- /**
- * @param \Iterator $iterator The Iterator to filter
- * @param string[] $matchPatterns An array of patterns that need to match
- * @param string[] $noMatchPatterns An array of patterns that need to not match
- */
- public function __construct(\Iterator $iterator, array $matchPatterns, array $noMatchPatterns)
- {
- foreach ($matchPatterns as $pattern) {
- $this->matchRegexps[] = $this->toRegex($pattern);
- }
-
- foreach ($noMatchPatterns as $pattern) {
- $this->noMatchRegexps[] = $this->toRegex($pattern);
- }
-
- parent::__construct($iterator);
- }
-
- /**
- * Checks whether the string is accepted by the regex filters.
- *
- * If there is no regexps defined in the class, this method will accept the string.
- * Such case can be handled by child classes before calling the method if they want to
- * apply a different behavior.
- *
- * @return bool
- */
- protected function isAccepted(string $string)
- {
- // should at least not match one rule to exclude
- foreach ($this->noMatchRegexps as $regex) {
- if (preg_match($regex, $string)) {
- return false;
- }
- }
-
- // should at least match one rule
- if ($this->matchRegexps) {
- foreach ($this->matchRegexps as $regex) {
- if (preg_match($regex, $string)) {
- return true;
- }
- }
-
- return false;
- }
-
- // If there is no match rules, the file is accepted
- return true;
- }
-
- /**
- * Checks whether the string is a regex.
- *
- * @return bool
- */
- protected function isRegex(string $str)
- {
- $availableModifiers = 'imsxuADU';
-
- if (\PHP_VERSION_ID >= 80200) {
- $availableModifiers .= 'n';
- }
-
- if (preg_match('/^(.{3,}?)['.$availableModifiers.']*$/', $str, $m)) {
- $start = substr($m[1], 0, 1);
- $end = substr($m[1], -1);
-
- if ($start === $end) {
- return !preg_match('/[*?[:alnum:] \\\\]/', $start);
- }
-
- foreach ([['{', '}'], ['(', ')'], ['[', ']'], ['<', '>']] as $delimiters) {
- if ($start === $delimiters[0] && $end === $delimiters[1]) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * Converts string into regexp.
- *
- * @return string
- */
- abstract protected function toRegex(string $str);
-}
diff --git a/vendor/symfony/finder/Iterator/PathFilterIterator.php b/vendor/symfony/finder/Iterator/PathFilterIterator.php
deleted file mode 100644
index 7974c4ee3..000000000
--- a/vendor/symfony/finder/Iterator/PathFilterIterator.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-/**
- * PathFilterIterator filters files by path patterns (e.g. some/special/dir).
- *
- * @author Fabien Potencier
- * @author Włodzimierz Gajda
- *
- * @extends MultiplePcreFilterIterator
- */
-class PathFilterIterator extends MultiplePcreFilterIterator
-{
- /**
- * Filters the iterator values.
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function accept()
- {
- $filename = $this->current()->getRelativePathname();
-
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $filename = str_replace('\\', '/', $filename);
- }
-
- return $this->isAccepted($filename);
- }
-
- /**
- * Converts strings to regexp.
- *
- * PCRE patterns are left unchanged.
- *
- * Default conversion:
- * 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/'
- *
- * Use only / as directory separator (on Windows also).
- *
- * @param string $str Pattern: regexp or dirname
- *
- * @return string
- */
- protected function toRegex(string $str)
- {
- return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/';
- }
-}
diff --git a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php b/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php
deleted file mode 100644
index 27589cdd5..000000000
--- a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php
+++ /dev/null
@@ -1,168 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-use Symfony\Component\Finder\Exception\AccessDeniedException;
-use Symfony\Component\Finder\SplFileInfo;
-
-/**
- * Extends the \RecursiveDirectoryIterator to support relative paths.
- *
- * @author Victor Berchet
- */
-class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
-{
- /**
- * @var bool
- */
- private $ignoreUnreadableDirs;
-
- /**
- * @var bool
- */
- private $rewindable;
-
- // these 3 properties take part of the performance optimization to avoid redoing the same work in all iterations
- private $rootPath;
- private $subPath;
- private $directorySeparator = '/';
-
- /**
- * @throws \RuntimeException
- */
- public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = false)
- {
- if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) {
- throw new \RuntimeException('This iterator only support returning current as fileinfo.');
- }
-
- parent::__construct($path, $flags);
- $this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
- $this->rootPath = $path;
- if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
- $this->directorySeparator = \DIRECTORY_SEPARATOR;
- }
- }
-
- /**
- * Return an instance of SplFileInfo with support for relative paths.
- *
- * @return SplFileInfo
- */
- #[\ReturnTypeWillChange]
- public function current()
- {
- // the logic here avoids redoing the same work in all iterations
-
- if (null === $subPathname = $this->subPath) {
- $subPathname = $this->subPath = $this->getSubPath();
- }
- if ('' !== $subPathname) {
- $subPathname .= $this->directorySeparator;
- }
- $subPathname .= $this->getFilename();
-
- if ('/' !== $basePath = $this->rootPath) {
- $basePath .= $this->directorySeparator;
- }
-
- return new SplFileInfo($basePath.$subPathname, $this->subPath, $subPathname);
- }
-
- /**
- * @param bool $allowLinks
- *
- * @return bool
- */
- #[\ReturnTypeWillChange]
- public function hasChildren($allowLinks = false)
- {
- $hasChildren = parent::hasChildren($allowLinks);
-
- if (!$hasChildren || !$this->ignoreUnreadableDirs) {
- return $hasChildren;
- }
-
- try {
- parent::getChildren();
-
- return true;
- } catch (\UnexpectedValueException $e) {
- // If directory is unreadable and finder is set to ignore it, skip children
- return false;
- }
- }
-
- /**
- * @return \RecursiveDirectoryIterator
- *
- * @throws AccessDeniedException
- */
- #[\ReturnTypeWillChange]
- public function getChildren()
- {
- try {
- $children = parent::getChildren();
-
- if ($children instanceof self) {
- // parent method will call the constructor with default arguments, so unreadable dirs won't be ignored anymore
- $children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs;
-
- // performance optimization to avoid redoing the same work in all children
- $children->rewindable = &$this->rewindable;
- $children->rootPath = $this->rootPath;
- }
-
- return $children;
- } catch (\UnexpectedValueException $e) {
- throw new AccessDeniedException($e->getMessage(), $e->getCode(), $e);
- }
- }
-
- /**
- * Do nothing for non rewindable stream.
- *
- * @return void
- */
- #[\ReturnTypeWillChange]
- public function rewind()
- {
- if (false === $this->isRewindable()) {
- return;
- }
-
- parent::rewind();
- }
-
- /**
- * Checks if the stream is rewindable.
- *
- * @return bool
- */
- public function isRewindable()
- {
- if (null !== $this->rewindable) {
- return $this->rewindable;
- }
-
- if (false !== $stream = @opendir($this->getPath())) {
- $infos = stream_get_meta_data($stream);
- closedir($stream);
-
- if ($infos['seekable']) {
- return $this->rewindable = true;
- }
- }
-
- return $this->rewindable = false;
- }
-}
diff --git a/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php b/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php
deleted file mode 100644
index 575bf29b7..000000000
--- a/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php
+++ /dev/null
@@ -1,60 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Finder\Iterator;
-
-use Symfony\Component\Finder\Comparator\NumberComparator;
-
-/**
- * SizeRangeFilterIterator filters out files that are not in the given size range.
- *
- * @author Fabien Potencier
- *
- * @extends \FilterIterator