diff --git a/README.md b/README.md
index d5fed7e..df2de2e 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,13 @@
=== Best Watermark - Protect images on your site with iLoveIMG ===
Plugin Name: Best Watermark - Protect images on your site with iLoveIMG
-Version: 2.1.0
+Version: 2.2.0
Author: iLovePDF
Author URI: https://www.iloveimg.com/
Contributors: iLovePDF
Tags: watermark, image protection, photography, picture, e-commerce
Requires at least: 5.3
-Tested up to: 6.5.3
-Stable tag: 2.1.0
+Tested up to: 6.6
+Stable tag: 2.2.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -38,7 +38,7 @@ Trust reliable developers. **Best Watermark - Protect images on your site with i
- **Good for eCommerce** - Works great for eCommerce websites using WooCommerce, NextGen Gallery and other plugins for e-commerce.
- **Security first** - Your data is not stored nor collected on our services. We are GDPR compliant.
- **Frequent updates** - Get a stable and frequently updated image compression plugin.
-- **Freemium service** - Freely process up to 500 images per month. Need more? Subscribe our Premium plan o buy a prepaid package to use at your convenience.
+- **Freemium service** - Freely up to 2500 credits per month. Need more? Subscribe our [Premium plan](https://iloveapi.com/pricing) or buy a [prepaid package](https://iloveapi.com/pricing) to use at your convenience.
With online images being shared and re-shared all over the Internet, it's easy to lose track of the original author. iLoveIMG Watermark plugin helps you protect the rights of your online photos.
@@ -52,7 +52,7 @@ With online images being shared and re-shared all over the Internet, it's easy t
**Can I use the plugin for free?**
-Absolutely. As a free user, you can optimise a maximum of 500 images per month. Once this limit is reached, you cannot compress new images until next month unless you purchase credits.
+Absolutely. As a free user, we let you process your first 2500 monthly credits. Once this limit is reached, you cannot watermark new images until next month unless you purchase credits.
**Can I make a one-time payment?**
@@ -76,7 +76,7 @@ iLoveIMG Watermark plugin can optimize images in JPG, PNG and GIF format.
**Do you have an API REST?**
-Yes, in fact this plugin is powered by our API. And you can integrate our image optimization tools into your software apps too! Learn more about [iLoveIMG API for developers](https://developer.iloveimg.com).
+Yes, in fact this plugin is powered by our API. And you can integrate our image optimization tools into your software apps too! Learn more about [iLoveIMG API for developers](https://iloveapi.com).
**Do you care about the privacy of my images?**
@@ -86,6 +86,16 @@ Moreover, all processed files are automatically deleted from our servers after b
== Changelog ==
+== 2.2.0 ==
+Improved
+* Update Libraries.
+* Now IloveIMG will use credits to process the files.
+* Now iloveimg accounts have been migrated to ilovepdf.
+* Improved the function to restore all files.
+
+Fixed
+* When autowatermark is activated and you wanted to restore a specific file, it was watermarked again.
+
== 2.1.0 ==
Added
* Functionality to restore images individually.
diff --git a/README.txt b/README.txt
index 9011562..da6324b 100644
--- a/README.txt
+++ b/README.txt
@@ -1,13 +1,13 @@
=== Best Watermark - Protect images on your site with iLoveIMG ===
Plugin Name: Best Watermark - Protect images on your site with iLoveIMG
-Version: 2.1.0
+Version: 2.2.0
Author: iLovePDF
Author URI: https://www.iloveimg.com/
Contributors: iLovePDF
Tags: watermark, image protection, photography, picture, e-commerce
Requires at least: 5.3
-Tested up to: 6.5.3
-Stable tag: 2.1.0
+Tested up to: 6.6
+Stable tag: 2.2.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -38,7 +38,7 @@ Trust reliable developers. **Best Watermark - Protect images on your site with i
- **Good for eCommerce** - Works great for eCommerce websites using WooCommerce, NextGen Gallery and other plugins for e-commerce.
- **Security first** - Your data is not stored nor collected on our services. We are GDPR compliant.
- **Frequent updates** - Get a stable and frequently updated image compression plugin.
-- **Freemium service** - Freely process up to 500 images per month. Need more? Subscribe our Premium plan o buy a prepaid package to use at your convenience.
+- **Freemium service** - Freely up to 2500 credits per month. Need more? Subscribe our Premium plan (https://iloveapi.com/pricing) or buy a prepaid package (https://iloveapi.com/pricing) to use at your convenience.
With online images being shared and re-shared all over the Internet, it's easy to lose track of the original author. iLoveIMG Watermark plugin helps you protect the rights of your online photos.
@@ -52,7 +52,7 @@ With online images being shared and re-shared all over the Internet, it's easy t
**Can I use the plugin for free?**
-Absolutely. As a free user, you can optimise a maximum of 500 images per month. Once this limit is reached, you cannot compress new images until next month unless you purchase credits.
+Absolutely. As a free user, we let you process your first 2500 monthly credits. Once this limit is reached, you cannot compress new images until next month unless you purchase credits.
**Can I make a one-time payment?**
@@ -76,7 +76,7 @@ iLoveIMG Watermark plugin can optimize images in JPG, PNG and GIF format.
**Do you have an API REST?**
-Yes, in fact this plugin is powered by our API. And you can integrate our image optimization tools into your software apps too! Learn more about [iLoveIMG API for developers](https://developer.iloveimg.com).
+Yes, in fact this plugin is powered by our API. And you can integrate our image optimization tools into your software apps too! Learn more about [iLoveIMG API for developers](https://iloveapi.com).
**Do you care about the privacy of my images?**
@@ -86,6 +86,16 @@ Moreover, all processed files are automatically deleted from our servers after b
== Changelog ==
+== 2.2.0 ==
+Improved
+* Update Libraries.
+* Now IloveIMG will use credits to process the files.
+* Now iloveimg accounts have been migrated to ilovepdf.
+* Improved the function to restore all files.
+
+Fixed
+* When autowatermark is activated and you wanted to restore a specific file, it was watermarked again.
+
== 2.1.0 ==
Added
* Functionality to restore images individually.
diff --git a/admin/Ilove_Img_Wm_Plugin.php b/admin/Ilove_Img_Wm_Plugin.php
index 003df47..1dd855e 100644
--- a/admin/Ilove_Img_Wm_Plugin.php
+++ b/admin/Ilove_Img_Wm_Plugin.php
@@ -18,7 +18,7 @@ class Ilove_Img_Wm_Plugin {
* @access public
* @var string VERSION The current version of the plugin.
*/
- const VERSION = '2.1.0';
+ const VERSION = '2.2.0';
/**
* The unique identifier of this plugin.
@@ -158,21 +158,16 @@ public function ilove_img_wm_library() {
public function ilove_img_wm_restore_all() {
if ( is_dir( ILOVE_IMG_WM_BACKUP_FOLDER ) ) {
- $folders = array_diff( scandir( ILOVE_IMG_WM_BACKUP_FOLDER ), array( '..', '.' ) );
-
- foreach ( $folders as $key => $folder ) {
- Ilove_Img_Wm_Resources::rcopy( ILOVE_IMG_WM_BACKUP_FOLDER . $folder, ILOVE_IMG_WM_UPLOAD_FOLDER . '/' . $folder );
- }
-
- Ilove_Img_Wm_Resources::rrmdir( ILOVE_IMG_WM_BACKUP_FOLDER );
-
$images_restore = json_decode( get_option( 'iloveimg_images_to_restore' ), true );
foreach ( $images_restore as $key => $value ) {
+ Ilove_Img_Wm_Resources::rcopy( ILOVE_IMG_WM_BACKUP_FOLDER . basename( get_attached_file( $value ) ), get_attached_file( $value ) );
+
delete_post_meta( $value, 'iloveimg_status_watermark' );
delete_post_meta( $value, 'iloveimg_watermark' );
delete_post_meta( $value, 'iloveimg_status_compress' );
delete_post_meta( $value, 'iloveimg_compress' );
+ wp_delete_file( ILOVE_IMG_WM_BACKUP_FOLDER . basename( get_attached_file( $value ) ) );
delete_option( 'iloveimg_images_to_restore' );
}
}
@@ -261,7 +256,9 @@ public function column_id_row( $column_name, $column_id ) {
public function process_attachment( $metadata, $attachment_id ) {
update_post_meta( $attachment_id, 'iloveimg_status_watermark', 0 ); // status no watermarked
- if ( (int) Ilove_Img_Wm_Resources::is_auto_watermark() === 1 && Ilove_Img_Wm_Resources::is_loggued() && (int) Ilove_Img_Wm_Resources::is_activated() === 1 ) {
+ $images_restore = null !== get_option( 'iloveimg_images_to_restore', null ) ? json_decode( get_option( 'iloveimg_images_to_restore' ), true ) : array();
+
+ if ( (int) Ilove_Img_Wm_Resources::is_auto_watermark() === 1 && Ilove_Img_Wm_Resources::is_loggued() && (int) Ilove_Img_Wm_Resources::is_activated() === 1 && ! in_array( $attachment_id, $images_restore, true ) ) {
wp_update_attachment_metadata( $attachment_id, $metadata );
$this->async_watermark( $attachment_id );
@@ -397,7 +394,7 @@ public function show_notices() {
if ( $account['files_used'] >= $account['free_files_limit'] && $account['package_files_used'] >= $account['package_files_limit'] && (int) $account['subscription_files_used'] >= $account['subscription_files_limit'] ) {
?>
/ processed files this month. Free Tier.
+ / credits used this month. Free Tier.
/ processed files this month.
+ / credits used this month.
/ processed files this month.
+ / credits used this month.
diff --git a/admin/views/compress.php b/admin/views/compress.php
index 27c1b13..56df57c 100644
--- a/admin/views/compress.php
+++ b/admin/views/compress.php
@@ -9,7 +9,7 @@
The power of iLoveIMG in your WordPress!
Compress all your Media image files and Stamp other Images or text into your WordPress pictures. This is the Official iLoveIMG plugin for WordPress. You can optimize all your Images and stamp them automatically as you do in iloveimg.com.
-
Register now to get 500 free uses and start working with iLoveIMG plugin now!
+
Register now to get 2500 free credits uses and start working with iLoveIMG plugin now!
diff --git a/admin/views/watermark.php b/admin/views/watermark.php
index 6e309ef..f0c13b6 100644
--- a/admin/views/watermark.php
+++ b/admin/views/watermark.php
@@ -12,7 +12,7 @@
The power of iLoveIMG in your WordPress!
Compress all your Media image files and Stamp other Images or text into your WordPress pictures. This is the Official iLoveIMG plugin for WordPress. You can optimize all your Images and stamp them automatically as you do in iloveimg.com.
-
Register now to get 500 free uses and start working with iLoveIMG plugin now!
+
Register now to get 2500 free credits uses and start working with iLoveIMG plugin now!
diff --git a/ilove-img-watermark.php b/ilove-img-watermark.php
index c718a17..8631153 100644
--- a/ilove-img-watermark.php
+++ b/ilove-img-watermark.php
@@ -13,9 +13,9 @@
*
* @wordpress-plugin
* Plugin Name: Best Watermark - Protect images on your site with iLoveIMG
- * Plugin URI: https://developer.iloveimg.com/
+ * Plugin URI: https://iloveapi.com/
* Description: Protect your site from image theft with our reliable and easy-to-use watermark plugin. Effective protection for your images.
- * Version: 2.1.0
+ * Version: 2.2.0
* Requires at least: 5.3
* Requires PHP: 7.4
* Author: iLoveIMG
@@ -38,9 +38,9 @@
$ilove_img_wm_upload_path = wp_upload_dir();
-define( 'ILOVE_IMG_WM_REGISTER_URL', 'https://api.iloveimg.com/v1/user' );
-define( 'ILOVE_IMG_WM_LOGIN_URL', 'https://api.iloveimg.com/v1/user/login' );
-define( 'ILOVE_IMG_WM_USER_URL', 'https://api.iloveimg.com/v1/user' );
+define( 'ILOVE_IMG_WM_REGISTER_URL', 'https://api.ilovepdf.com/v1/user' );
+define( 'ILOVE_IMG_WM_LOGIN_URL', 'https://api.ilovepdf.com/v1/user/login' );
+define( 'ILOVE_IMG_WM_USER_URL', 'https://api.ilovepdf.com/v1/user' );
define( 'ILOVE_IMG_WM_NUM_MAX_FILES', 2 );
define( 'ILOVE_IMG_WM_COMPRESS_DB_VERSION', '1.0' );
define( 'ILOVE_IMG_WM_UPLOAD_FOLDER', $ilove_img_wm_upload_path['basedir'] );
diff --git a/package.json b/package.json
index 0dabe31..778306c 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,6 @@
"gulp-sass": "^5.1.0",
"gulp-uglify": "^3.0.2",
"merge-stream": "^2.0.0",
- "sass": "^1.77.2"
+ "sass": "^1.77.8"
}
}
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
new file mode 100644
index 0000000..ff3bac2
--- /dev/null
+++ b/vendor/composer/autoload_files.php
@@ -0,0 +1,12 @@
+ $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
+ '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
+ '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
+);
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index eb18842..3ad3c00 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -6,6 +6,12 @@
$baseDir = dirname($vendorDir);
return array(
+ 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
+ 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
'Iloveimg\\' => array($vendorDir . '/ilovepdf/iloveimg-php/src'),
'Ilove_Img_Wm\\' => array($baseDir . '/admin'),
+ 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
+ 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
+ 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
+ 'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
);
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index 91d48a1..c03ad4e 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -33,6 +33,18 @@ public static function getLoader()
$loader->register(true);
+ $filesToLoad = \Composer\Autoload\ComposerStaticInit6791c7d4b4eb3dd124bba8a8bf1cffa8::$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 2a6b471..8c3849e 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -6,15 +6,45 @@
class ComposerStaticInit6791c7d4b4eb3dd124bba8a8bf1cffa8
{
+ public static $files = array (
+ '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
+ '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
+ '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
+ );
+
public static $prefixLengthsPsr4 = array (
+ 'P' =>
+ array (
+ 'Psr\\Http\\Message\\' => 17,
+ 'Psr\\Http\\Client\\' => 16,
+ ),
'I' =>
array (
'Iloveimg\\' => 9,
'Ilove_Img_Wm\\' => 13,
),
+ 'G' =>
+ array (
+ 'GuzzleHttp\\Psr7\\' => 16,
+ 'GuzzleHttp\\Promise\\' => 19,
+ 'GuzzleHttp\\' => 11,
+ ),
+ 'F' =>
+ array (
+ 'Firebase\\JWT\\' => 13,
+ ),
);
public static $prefixDirsPsr4 = array (
+ 'Psr\\Http\\Message\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/psr/http-factory/src',
+ 1 => __DIR__ . '/..' . '/psr/http-message/src',
+ ),
+ 'Psr\\Http\\Client\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/psr/http-client/src',
+ ),
'Iloveimg\\' =>
array (
0 => __DIR__ . '/..' . '/ilovepdf/iloveimg-php/src',
@@ -23,6 +53,22 @@ class ComposerStaticInit6791c7d4b4eb3dd124bba8a8bf1cffa8
array (
0 => __DIR__ . '/../..' . '/admin',
),
+ 'GuzzleHttp\\Psr7\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
+ ),
+ 'GuzzleHttp\\Promise\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
+ ),
+ 'GuzzleHttp\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
+ ),
+ 'Firebase\\JWT\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
+ ),
);
public static $classMap = array (
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index a5a2fe9..eba1376 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1,5 +1,405 @@
{
"packages": [
+ {
+ "name": "firebase/php-jwt",
+ "version": "v6.10.1",
+ "version_normalized": "6.10.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/firebase/php-jwt.git",
+ "reference": "500501c2ce893c824c801da135d02661199f60c5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/firebase/php-jwt/zipball/500501c2ce893c824c801da135d02661199f60c5",
+ "reference": "500501c2ce893c824c801da135d02661199f60c5",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^8.0"
+ },
+ "require-dev": {
+ "guzzlehttp/guzzle": "^7.4",
+ "phpspec/prophecy-phpunit": "^2.0",
+ "phpunit/phpunit": "^9.5",
+ "psr/cache": "^2.0||^3.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": "2024-05-18T18:05:11+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.10.1"
+ },
+ "install-path": "../firebase/php-jwt"
+ },
+ {
+ "name": "guzzlehttp/guzzle",
+ "version": "7.8.1",
+ "version_normalized": "7.8.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/guzzle.git",
+ "reference": "41042bc7ab002487b876a0683fc8dce04ddce104"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104",
+ "reference": "41042bc7ab002487b876a0683fc8dce04ddce104",
+ "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.2",
+ "ext-curl": "*",
+ "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
+ "php-http/message-factory": "^1.1",
+ "phpunit/phpunit": "^8.5.36 || ^9.6.15",
+ "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-12-03T20:35:24+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.1"
+ },
+ "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.2",
+ "version_normalized": "2.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/promises.git",
+ "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223",
+ "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2.5 || ^8.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.8.2",
+ "phpunit/phpunit": "^8.5.36 || ^9.6.15"
+ },
+ "time": "2023-12-03T20:19:20+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.2"
+ },
+ "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.2",
+ "version_normalized": "2.6.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221",
+ "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221",
+ "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.2",
+ "http-interop/http-factory-tests": "^0.9",
+ "phpunit/phpunit": "^8.5.36 || ^9.6.15"
+ },
+ "suggest": {
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
+ },
+ "time": "2023-12-03T20:05:35+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.2"
+ },
+ "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": "ilovepdf/iloveimg-php",
"version": "dev-master",
@@ -7,22 +407,25 @@
"source": {
"type": "git",
"url": "https://github.com/ilovepdf/iloveimg-php.git",
- "reference": "3ddd914564e2e0fd398cbf12436f149a07c8ad96"
+ "reference": "9535a46c3285e96fd3b5e5aa5d5d01c1afa64a94"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ilovepdf/iloveimg-php/zipball/3ddd914564e2e0fd398cbf12436f149a07c8ad96",
- "reference": "3ddd914564e2e0fd398cbf12436f149a07c8ad96",
+ "url": "https://api.github.com/repos/ilovepdf/iloveimg-php/zipball/9535a46c3285e96fd3b5e5aa5d5d01c1afa64a94",
+ "reference": "9535a46c3285e96fd3b5e5aa5d5d01c1afa64a94",
"shasum": ""
},
"require": {
- "ext-curl": "*",
- "php": ">=7.1"
+ "ext-json": "*",
+ "firebase/php-jwt": "^6.0",
+ "guzzlehttp/guzzle": "^7.4",
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^7.1"
+ "phpunit/phpunit": "^9.5",
+ "vimeo/psalm": "^4.21"
},
- "time": "2023-12-08T10:05:51+00:00",
+ "time": "2024-06-20T12:49:32+00:00",
"default-branch": true,
"type": "library",
"installation-source": "source",
@@ -45,7 +448,7 @@
"homepage": "https://iloveimg.com/",
"support": {
"issues": "https://github.com/ilovepdf/iloveimg-php/issues",
- "source": "https://github.com/ilovepdf/iloveimg-php/tree/master"
+ "source": "https://github.com/ilovepdf/iloveimg-php/tree/v1.1.16"
},
"install-path": "../ilovepdf/iloveimg-php"
},
@@ -101,17 +504,17 @@
},
{
"name": "phpstan/extension-installer",
- "version": "1.3.1",
- "version_normalized": "1.3.1.0",
+ "version": "1.4.1",
+ "version_normalized": "1.4.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/extension-installer.git",
- "reference": "f45734bfb9984c6c56c4486b71230355f066a58a"
+ "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f45734bfb9984c6c56c4486b71230355f066a58a",
- "reference": "f45734bfb9984c6c56c4486b71230355f066a58a",
+ "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f6b87faf9fc7978eab2f7919a8760bc9f58f9203",
+ "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203",
"shasum": ""
},
"require": {
@@ -124,7 +527,7 @@
"php-parallel-lint/php-parallel-lint": "^1.2.0",
"phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0"
},
- "time": "2023-05-24T08:59:17+00:00",
+ "time": "2024-06-10T08:20:49+00:00",
"type": "composer-plugin",
"extra": {
"class": "PHPStan\\ExtensionInstaller\\Plugin"
@@ -142,23 +545,23 @@
"description": "Composer plugin for automatic installation of PHPStan extensions",
"support": {
"issues": "https://github.com/phpstan/extension-installer/issues",
- "source": "https://github.com/phpstan/extension-installer/tree/1.3.1"
+ "source": "https://github.com/phpstan/extension-installer/tree/1.4.1"
},
"install-path": "../phpstan/extension-installer"
},
{
"name": "phpstan/phpstan",
- "version": "1.11.1",
- "version_normalized": "1.11.1.0",
+ "version": "1.11.7",
+ "version_normalized": "1.11.7.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b"
+ "reference": "52d2bbfdcae7f895915629e4694e9497d0f8e28d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e524358f930e41a2b4cca1320e3b04fc26b39e0b",
- "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/52d2bbfdcae7f895915629e4694e9497d0f8e28d",
+ "reference": "52d2bbfdcae7f895915629e4694e9497d0f8e28d",
"shasum": ""
},
"require": {
@@ -167,7 +570,7 @@
"conflict": {
"phpstan/phpstan-shim": "*"
},
- "time": "2024-05-15T08:00:59+00:00",
+ "time": "2024-07-06T11:17:41+00:00",
"bin": [
"phpstan",
"phpstan.phar"
@@ -207,25 +610,311 @@
],
"install-path": "../phpstan/phpstan"
},
+ {
+ "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.1.0",
+ "version_normalized": "1.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-factory.git",
+ "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
+ "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1",
+ "psr/http-message": "^1.0 || ^2.0"
+ },
+ "time": "2024-04-15T12:06:14+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": "PSR-17: 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"
+ },
+ "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": "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": "symfony/deprecation-contracts",
+ "version": "v3.5.0",
+ "version_normalized": "3.5.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
+ "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1"
+ },
+ "time": "2024-04-18T09:32:20+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.5-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.5.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/deprecation-contracts"
+ },
{
"name": "symfony/polyfill-php73",
- "version": "v1.29.0",
- "version_normalized": "1.29.0.0",
+ "version": "v1.30.0",
+ "version_normalized": "1.30.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "21bd091060673a1177ae842c0ef8fe30893114d2"
+ "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2",
- "reference": "21bd091060673a1177ae842c0ef8fe30893114d2",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/ec444d3f3f6505bb28d11afa41e75faadebc10a1",
+ "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
- "time": "2024-01-29T20:11:03+00:00",
+ "time": "2024-05-31T15:07:36+00:00",
"type": "library",
"extra": {
"thanks": {
@@ -268,7 +957,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0"
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.30.0"
},
"funding": [
{
@@ -288,17 +977,17 @@
},
{
"name": "szepeviktor/phpstan-wordpress",
- "version": "v1.3.4",
- "version_normalized": "1.3.4.0",
+ "version": "v1.3.5",
+ "version_normalized": "1.3.5.0",
"source": {
"type": "git",
"url": "https://github.com/szepeviktor/phpstan-wordpress.git",
- "reference": "891d0767855a32c886a439efae090408cc1fa156"
+ "reference": "7f8cfe992faa96b6a33bbd75c7bace98864161e7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/891d0767855a32c886a439efae090408cc1fa156",
- "reference": "891d0767855a32c886a439efae090408cc1fa156",
+ "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/7f8cfe992faa96b6a33bbd75c7bace98864161e7",
+ "reference": "7f8cfe992faa96b6a33bbd75c7bace98864161e7",
"shasum": ""
},
"require": {
@@ -313,12 +1002,13 @@
"php-parallel-lint/php-parallel-lint": "^1.1",
"phpstan/phpstan-strict-rules": "^1.2",
"phpunit/phpunit": "^8.0 || ^9.0",
- "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.8"
+ "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.0",
+ "wp-coding-standards/wpcs": "3.1.0 as 2.3.0"
},
"suggest": {
"swissspidy/phpstan-no-private": "Detect usage of internal core functions, classes and methods"
},
- "time": "2024-03-21T16:32:59+00:00",
+ "time": "2024-06-28T22:27:19+00:00",
"type": "phpstan-extension",
"extra": {
"phpstan": {
@@ -347,7 +1037,7 @@
],
"support": {
"issues": "https://github.com/szepeviktor/phpstan-wordpress/issues",
- "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.3.4"
+ "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.3.5"
},
"install-path": "../szepeviktor/phpstan-wordpress"
}
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index 48c5bba..0297c72 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -3,17 +3,53 @@
'name' => 'ilovepdf/iloveimg-wp-watermark',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
- 'reference' => '80f356f567d0d8a0e5faf3c1aa199f01ba94ded5',
+ 'reference' => '5252aeac3967ac73f942ff7c80bd503951eddecd',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => true,
),
'versions' => array(
+ 'firebase/php-jwt' => array(
+ 'pretty_version' => 'v6.10.1',
+ 'version' => '6.10.1.0',
+ 'reference' => '500501c2ce893c824c801da135d02661199f60c5',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../firebase/php-jwt',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'guzzlehttp/guzzle' => array(
+ 'pretty_version' => '7.8.1',
+ 'version' => '7.8.1.0',
+ 'reference' => '41042bc7ab002487b876a0683fc8dce04ddce104',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'guzzlehttp/promises' => array(
+ 'pretty_version' => '2.0.2',
+ 'version' => '2.0.2.0',
+ 'reference' => 'bbff78d96034045e58e13dedd6ad91b5d1253223',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../guzzlehttp/promises',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'guzzlehttp/psr7' => array(
+ 'pretty_version' => '2.6.2',
+ 'version' => '2.6.2.0',
+ 'reference' => '45b30f99ac27b5ca93cb4831afe16285f57b8221',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../guzzlehttp/psr7',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
'ilovepdf/iloveimg-php' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => '3ddd914564e2e0fd398cbf12436f149a07c8ad96',
+ 'reference' => '9535a46c3285e96fd3b5e5aa5d5d01c1afa64a94',
'type' => 'library',
'install_path' => __DIR__ . '/../ilovepdf/iloveimg-php',
'aliases' => array(
@@ -24,7 +60,7 @@
'ilovepdf/iloveimg-wp-watermark' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
- 'reference' => '80f356f567d0d8a0e5faf3c1aa199f01ba94ded5',
+ 'reference' => '5252aeac3967ac73f942ff7c80bd503951eddecd',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -40,36 +76,99 @@
'dev_requirement' => true,
),
'phpstan/extension-installer' => array(
- 'pretty_version' => '1.3.1',
- 'version' => '1.3.1.0',
- 'reference' => 'f45734bfb9984c6c56c4486b71230355f066a58a',
+ 'pretty_version' => '1.4.1',
+ 'version' => '1.4.1.0',
+ 'reference' => 'f6b87faf9fc7978eab2f7919a8760bc9f58f9203',
'type' => 'composer-plugin',
'install_path' => __DIR__ . '/../phpstan/extension-installer',
'aliases' => array(),
'dev_requirement' => true,
),
'phpstan/phpstan' => array(
- 'pretty_version' => '1.11.1',
- 'version' => '1.11.1.0',
- 'reference' => 'e524358f930e41a2b4cca1320e3b04fc26b39e0b',
+ 'pretty_version' => '1.11.7',
+ 'version' => '1.11.7.0',
+ 'reference' => '52d2bbfdcae7f895915629e4694e9497d0f8e28d',
'type' => 'library',
'install_path' => __DIR__ . '/../phpstan/phpstan',
'aliases' => array(),
'dev_requirement' => true,
),
+ '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.1.0',
+ 'version' => '1.1.0.0',
+ 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
+ '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',
+ ),
+ ),
+ '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,
+ ),
+ 'symfony/deprecation-contracts' => array(
+ 'pretty_version' => 'v3.5.0',
+ 'version' => '3.5.0.0',
+ 'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
'symfony/polyfill-php73' => array(
- 'pretty_version' => 'v1.29.0',
- 'version' => '1.29.0.0',
- 'reference' => '21bd091060673a1177ae842c0ef8fe30893114d2',
+ 'pretty_version' => 'v1.30.0',
+ 'version' => '1.30.0.0',
+ 'reference' => 'ec444d3f3f6505bb28d11afa41e75faadebc10a1',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php73',
'aliases' => array(),
'dev_requirement' => true,
),
'szepeviktor/phpstan-wordpress' => array(
- 'pretty_version' => 'v1.3.4',
- 'version' => '1.3.4.0',
- 'reference' => '891d0767855a32c886a439efae090408cc1fa156',
+ 'pretty_version' => 'v1.3.5',
+ 'version' => '1.3.5.0',
+ 'reference' => '7f8cfe992faa96b6a33bbd75c7bace98864161e7',
'type' => 'phpstan-extension',
'install_path' => __DIR__ . '/../szepeviktor/phpstan-wordpress',
'aliases' => array(),
diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php
index 6d3407d..4c3a5d6 100644
--- a/vendor/composer/platform_check.php
+++ b/vendor/composer/platform_check.php
@@ -4,8 +4,8 @@
$issues = array();
-if (!(PHP_VERSION_ID >= 70100)) {
- $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.';
+if (!(PHP_VERSION_ID >= 80100)) {
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
diff --git a/vendor/ilovepdf/iloveimg-php/composer.json b/vendor/ilovepdf/iloveimg-php/composer.json
index b86eacb..f51088c 100644
--- a/vendor/ilovepdf/iloveimg-php/composer.json
+++ b/vendor/ilovepdf/iloveimg-php/composer.json
@@ -21,10 +21,13 @@
}
},
"require": {
- "php": ">=7.1",
- "ext-curl": "*"
+ "php": ">=7.3",
+ "firebase/php-jwt": "^6.0",
+ "guzzlehttp/guzzle": "^7.4",
+ "ext-json": "*"
},
"require-dev": {
- "phpunit/phpunit": "^7.1"
+ "phpunit/phpunit": "^9.5",
+ "vimeo/psalm": "^4.21"
}
}
diff --git a/vendor/ilovepdf/iloveimg-php/phpunit.no_autoload.xml b/vendor/ilovepdf/iloveimg-php/phpunit.no_autoload.xml
deleted file mode 100644
index 713b0cd..0000000
--- a/vendor/ilovepdf/iloveimg-php/phpunit.no_autoload.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- tests
-
-
-
-
- lib
-
-
-
-
-
-
\ No newline at end of file
diff --git a/vendor/ilovepdf/iloveimg-php/phpunit.xml b/vendor/ilovepdf/iloveimg-php/phpunit.xml
index 4e4ddaa..53ae3da 100644
--- a/vendor/ilovepdf/iloveimg-php/phpunit.xml
+++ b/vendor/ilovepdf/iloveimg-php/phpunit.xml
@@ -1,13 +1,14 @@
-
+
+
+
+
+ src/
+
+
tests
+ ./tests/TestCase.php
-
-
- src
- ./tests/TestCase.php
-
-
-
+
\ No newline at end of file
diff --git a/vendor/ilovepdf/iloveimg-php/psalm.xml b/vendor/ilovepdf/iloveimg-php/psalm.xml
new file mode 100644
index 0000000..7c0333d
--- /dev/null
+++ b/vendor/ilovepdf/iloveimg-php/psalm.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/vendor/ilovepdf/iloveimg-php/readme.md b/vendor/ilovepdf/iloveimg-php/readme.md
index 09a64e0..a7813e5 100644
--- a/vendor/ilovepdf/iloveimg-php/readme.md
+++ b/vendor/ilovepdf/iloveimg-php/readme.md
@@ -14,7 +14,7 @@ Develop and automate PDF processing tasks like Compress PDF, Merge PDF, Split PD
## Requirements
-PHP 7.1 and later.
+PHP 7.3 and later.
## Install
diff --git a/vendor/ilovepdf/iloveimg-php/samples/removebackground_advanced.php b/vendor/ilovepdf/iloveimg-php/samples/removebackground_advanced.php
new file mode 100644
index 0000000..22bf54c
--- /dev/null
+++ b/vendor/ilovepdf/iloveimg-php/samples/removebackground_advanced.php
@@ -0,0 +1,28 @@
+addFile('/path/to/file/image.jpg');
+
+
+// and set name for output file.
+// the task will set the correct file extension for you.
+$myTask->setOutputFilename('image_without_background');
+
+// process files
+$myTask->execute();
+
+// and finally download file. If no path is set, it will be downloaded on current folder
+$myTask->download('path/to/download');
\ No newline at end of file
diff --git a/vendor/ilovepdf/iloveimg-php/samples/removebackground_basic.php b/vendor/ilovepdf/iloveimg-php/samples/removebackground_basic.php
new file mode 100644
index 0000000..22524d6
--- /dev/null
+++ b/vendor/ilovepdf/iloveimg-php/samples/removebackground_basic.php
@@ -0,0 +1,22 @@
+addFile('/path/to/file/image.jpg');
+
+// process files
+$myTask->execute();
+
+// and finally download file. If no path is set, it will be downloaded on current folder
+$myTask->download();
diff --git a/vendor/ilovepdf/iloveimg-php/samples/upscale_advanced.php b/vendor/ilovepdf/iloveimg-php/samples/upscale_advanced.php
new file mode 100644
index 0000000..33d5e9d
--- /dev/null
+++ b/vendor/ilovepdf/iloveimg-php/samples/upscale_advanced.php
@@ -0,0 +1,31 @@
+addFile('/path/to/file/image.jpg');
+
+// set the scale
+$file->setMultiplier(4);
+
+
+// and set name for output file.
+// the task will set the correct file extension for you.
+$myTask->setOutputFilename('image_upscaled_x4');
+
+// process files
+$myTask->execute();
+
+// and finally download file. If no path is set, it will be downloaded on current folder
+$myTask->download('path/to/download');
\ No newline at end of file
diff --git a/vendor/ilovepdf/iloveimg-php/samples/upscale_basic.php b/vendor/ilovepdf/iloveimg-php/samples/upscale_basic.php
new file mode 100644
index 0000000..ca7bd13
--- /dev/null
+++ b/vendor/ilovepdf/iloveimg-php/samples/upscale_basic.php
@@ -0,0 +1,22 @@
+addFile('/path/to/file/image.jpg');
+
+// process files
+$myTask->execute();
+
+// and finally download file. If no path is set, it will be downloaded on current folder
+$myTask->download();
diff --git a/vendor/ilovepdf/iloveimg-php/src/ConvertImageTask.php b/vendor/ilovepdf/iloveimg-php/src/ConvertImageTask.php
index f8fe005..2c2e8c6 100644
--- a/vendor/ilovepdf/iloveimg-php/src/ConvertImageTask.php
+++ b/vendor/ilovepdf/iloveimg-php/src/ConvertImageTask.php
@@ -11,7 +11,7 @@ class ConvertImageTask extends ImageTask
/**
* @var string
*/
- public $to = 'jpg';
+ public $convert_to = 'jpg';
private $toValues = ["jpg", "png", "gif", "gif_animation"];
@@ -45,13 +45,23 @@ function __construct($publicKey, $secretKey, $makeStart = true)
* values: ["jpg"|"png"|"gif"]
* default: "jpg"
*/
- public function setTo(string $to)
+ public function setConvertTo(string $convertTo)
{
- $this->checkValues($to, $this->toValues);
- $this->to = $to;
+ $this->checkValues($convertTo, $this->toValues);
+ $this->convert_to = $convertTo;
return $this;
}
+ /**
+ * Alias for setConvertTo
+ * @param string $convertTo
+ * @return $this
+ */
+ public function setTo(string $convertTo)
+ {
+ return $this->setConvertTo($convertTo);
+ }
+
/**
* @param int $gif_time
* @return $this
diff --git a/vendor/ilovepdf/iloveimg-php/src/Exceptions/ExtendedException.php b/vendor/ilovepdf/iloveimg-php/src/Exceptions/ExtendedException.php
index b488379..8f86dfa 100644
--- a/vendor/ilovepdf/iloveimg-php/src/Exceptions/ExtendedException.php
+++ b/vendor/ilovepdf/iloveimg-php/src/Exceptions/ExtendedException.php
@@ -7,59 +7,70 @@
class ExtendedException extends Exception
{
+ /**
+ * @var mixed|null
+ */
private $params;
+
+ /**
+ * @var string|null
+ */
private $type;
/**
* ExtendedException constructor.
+ *
* @param string $message
+ * @param mixed $responseBody
* @param int $code
- * @param Exception|null $previous
- * @param $response
+ * @param \Throwable $previous
*/
- public function __construct($message, $code = 0, Exception $previous = null, $response)
+ public function __construct($message, $responseBody = null, $code = 0, $previous = null)
{
- if (isset($response->body->error) && $response->body->error->type) {
- $this->type = $response->body->error->type;
+ if (!$code) {
+ $code = 0;
+ }
+ if ($responseBody && isset($responseBody->error) && $responseBody->error->type) {
+ $this->type = $responseBody->error->type;
}
- if (isset($response->body->error->param)) {
- $this->params = $response->body->error->param;
+ if ($responseBody && isset($responseBody->error) && isset($responseBody->error->param)) {
+ $this->params = $responseBody->error->param;
}
if ($this->params) {
if (is_array($this->params)) {
- if(is_object($this->params[0])){
+ if (is_object($this->params[0])) {
$firstError = $this->params[0]->error; //test unlock fail
- }
- else{
+ } else {
$firstError = $this->params[0];
}
} else {
$params = json_decode(json_encode($this->params), true);
-
- if(is_string($params)){
- $firstError = $params; //download exception
- }
- else{
- $error = array_values($params);
- if (is_array($error[0])) {
- $error[0] = array_values($error[0]);
- $firstError = $error[0][0]; //task deleted before execute
- } else {
- $firstError = $error[0];
- }
- }
+ $firstError = $this->getFirstErrorString($params);
}
parent::__construct($message . ' (' . $firstError . ')', $code, $previous);
} else {
+ if ($responseBody && isset($responseBody->message)) {
+ $message .= ' (' . $responseBody->message . ')';
+ }
parent::__construct($message, $code, $previous);
}
}
+ private function getFirstErrorString($error){
+ if (!is_string($error)) {
+ return $this->getFirstErrorString(array_values($error)[0]);
+ }
+ return $error;
+ }
+
/**
* @return mixed
*/
public function getErrors()
{
+ if (!is_countable($this->params)) {
+ return [];
+ }
return $this->params;
}
diff --git a/vendor/ilovepdf/iloveimg-php/src/Exceptions/NotImplementedException.php b/vendor/ilovepdf/iloveimg-php/src/Exceptions/NotImplementedException.php
new file mode 100644
index 0000000..5321a4c
--- /dev/null
+++ b/vendor/ilovepdf/iloveimg-php/src/Exceptions/NotImplementedException.php
@@ -0,0 +1,7 @@
+ self::$allowRedirects,
+ 'http_errors' => false,
+ 'verify' => self::$verify,
+ ];
+
+ $this->client = new \GuzzleHttp\Client(array_merge_recursive($defaultParams, $params));
+ }
+
+ /**
+ * @param string $method
+ * @param string $uri
+ * @param array $options
+ * @return ResponseInterface
+ * @throws \GuzzleHttp\Exception\GuzzleException
+ */
+ public function request(string $method, string $uri = '', array $options = []): ResponseInterface
+ {
+ return $this->client->request($method, $uri, $options);
+ }
+
+ /**
+ * @param bool $follow
+ * @return void
+ */
+ public static function setAllowRedirects(bool $follow): void
+ {
+ self::$allowRedirects = $follow;
+ }
+
+ /**
+ * @param bool $verify
+ */
+ public static function setVerify(bool $verify): void
+ {
+ self::$verify = $verify;
+ }
+}
\ No newline at end of file
diff --git a/vendor/ilovepdf/iloveimg-php/src/Http/ClientException.php b/vendor/ilovepdf/iloveimg-php/src/Http/ClientException.php
new file mode 100644
index 0000000..415d880
--- /dev/null
+++ b/vendor/ilovepdf/iloveimg-php/src/Http/ClientException.php
@@ -0,0 +1,7 @@
+setApiKeys($publicKey, $secretKey);
@@ -156,55 +161,94 @@ public static function getTokenAlgorithm()
/**
* @param string $method
* @param string $endpoint
- * @param string $body
+ * @param array $params
+ * @param bool $start
*
- * @return mixed response from server
+ * @return ResponseInterface response from server
*
- * @throws AuthException
+ * @throws \Iloveimg\Exceptions\AuthException
* @throws ProcessException
* @throws UploadException
*/
- public function sendRequest($method, $endpoint, $body = null, $start = false)
+ public function sendRequest(string $method, string $endpoint, array $params = [], bool $start = false): ResponseInterface
{
- $to_server = self::$startServer;
+ $to_server = self::getStartServer();
if (!$start && !is_null($this->getWorkerServer())) {
$to_server = $this->workerServer;
}
- if ($endpoint == 'process' || $endpoint == 'upload' || strpos($endpoint, 'download/') === 0) {
- Request::timeout($this->timeoutLarge);
- } else {
- Request::timeout($this->timeout);
+ /** @psalm-suppress PossiblyNullOperand */
+ $timeout = ($endpoint == 'process' || $endpoint == 'upload' || strpos($endpoint, 'download/') === 0) ? $this->timeoutLarge : $this->timeout;
+ $requestConfig = [
+ 'connect_timeout' => $timeout,
+ 'headers' => [
+ 'Authorization' => 'Bearer ' . $this->getJWT(),
+ 'Accept' => 'application/json'
+ ],
+ ];
+
+ $requestParams = $requestConfig;
+ if ($params) {
+ $requestParams = array_merge($requestConfig, $params);
}
- $response = Request::$method($to_server . '/v1/' . $endpoint, array(
- 'Accept' => 'application/json',
- 'Authorization' => 'Bearer ' . $this->getJWT()
- ), $body);
+ $client = new Client($params);
+ $error = null;
+
+ try {
+ /** @psalm-suppress PossiblyNullOperand */
+ $response = $client->request($method, $to_server . '/v1/' . $endpoint, $requestParams);
+ } catch (ClientException $e) {
+ $response = $e->getResponse();
+ $error = $e;
+ }
+ $responseCode = $response->getStatusCode();
- if ($response->code != '200' && $response->code != '201') {
- if ($response->code == 401) {
- throw new AuthException($response->body->name, $response->code, null, $response);
+ if ($responseCode != 200 && $responseCode != 201) {
+ $responseBody = json_decode((string)$response->getBody());
+ if ($responseCode == 401) {
+ throw new AuthException($responseBody->name, $responseBody, $responseCode);
}
if ($endpoint == 'upload') {
- if(is_string($response->body)){
- throw new UploadException("Upload error", $response->code, null, $response);
+ if (is_string($responseBody)) {
+ throw new UploadException("Upload error", $responseBody, $responseCode);
}
- throw new UploadException($response->body->error->message, $response->code, null, $response);
+ throw new UploadException($responseBody->error->message, $responseBody, $responseCode);
} elseif ($endpoint == 'process') {
- throw new ProcessException($response->body->error->message, $response->code, null, $response);
+ throw new ProcessException($responseBody->error->message, $responseBody, $responseCode);
} elseif (strpos($endpoint, 'download') === 0) {
- throw new DownloadException($response->body->error->message, $response->code, null, $response);
+ throw new DownloadException($responseBody->error->message, $responseBody, $responseCode);
+ } elseif (strpos($endpoint, 'start') === 0) {
+ if (isset($responseBody->error) && isset($responseBody->error->type)) {
+ throw new StartException($responseBody->error->message, $responseBody, $responseCode);
+ }
+ throw new \Exception('Bad Request');
} else {
- if ($response->code == 400) {
- if (strpos($endpoint, 'task') != -1) {
+ if ($response->getStatusCode() == 429) {
+ throw new \Exception('Too Many Requests');
+ }
+ if ($response->getStatusCode() == 400) {
+ //common process exception
+ if (strpos($endpoint, 'task') !== false) {
throw new TaskException('Invalid task id');
}
+ //signature exception
+ if(strpos($endpoint, 'signature') !== false){
+ throw new ProcessException($responseBody->error->type, $responseBody, $response->getStatusCode());
+ }
+
+ if (isset($responseBody->error) && isset($responseBody->error->type)) {
+ throw new \Exception($responseBody->error->message);
+ }
throw new \Exception('Bad Request');
}
- throw new \Exception($response->body->error->message);
+ if (isset($responseBody->error) && isset($responseBody->error->message)) {
+ throw new \Exception($responseBody->error->message);
+ }
+ throw new \Exception('Bad Request');
}
}
+
return $response;
}
@@ -313,27 +357,26 @@ public function getStatus($server, $taskId)
/**
* @param $verify
*/
- public function verifySsl($verify)
+ public function verifySsl(bool $verify): void
{
- Request::verifyPeer($verify);
- Request::verifyHost($verify);
+ Client::setVerify($verify);
}
-
/**
* @param $follow
*/
- public function followLocation($follow){
- Request::followLocation($follow);
+ public function followLocation(bool $follow): void
+ {
+ Client::setAllowRedirects($follow);
}
- private function getUpdatedInfo()
+ private function getUpdatedInfo(): object
{
$data = array('v' => self::VERSION);
- $body = Body::Form($data);
+ $body = ['form_params' => $data];
$response = self::sendRequest('get', 'info', $body);
- $this->info = $response->body;
+ $this->info = json_decode($response->getBody());
return $this->info;
}
diff --git a/vendor/ilovepdf/iloveimg-php/src/ImageTask.php b/vendor/ilovepdf/iloveimg-php/src/ImageTask.php
index 485d11d..f3c2fa2 100644
--- a/vendor/ilovepdf/iloveimg-php/src/ImageTask.php
+++ b/vendor/ilovepdf/iloveimg-php/src/ImageTask.php
@@ -4,7 +4,12 @@
use Iloveimg\Exceptions\StartException;
use Iloveimg\Exceptions\PathException;
-use Iloveimg\Request\Body;
+use Iloveimg\Exceptions\AuthException;
+use Iloveimg\Exceptions\DownloadException;
+use Iloveimg\Exceptions\ProcessException;
+use Iloveimg\Exceptions\UploadException;
+use Iloveimg\File;
+use Psr\Http\Message\ResponseInterface;
/**
* Class Iloveimg
@@ -46,11 +51,29 @@ class ImageTask extends Iloveimg
public $result;
//downloaded file
+
+ /**
+ * @var string
+ */
public $outputFile;
+
+ /**
+ * @var string
+ */
public $outputFileName;
+
+ /**
+ * @var string
+ */
public $outputFileType;
+ /**
+ * @var int|null
+ */
+ public $remainingFiles;
+
+
/**
* Task constructor.
*
@@ -67,31 +90,40 @@ function __construct($publicKey, $secretKey, $makeStart = false)
}
}
- public function start()
+ public function start(): void
{
- $data = array('v' => self::VERSION);
- $body = Body::Form($data);
+ if ($this->tool == null) {
+ throw new StartException('Tool must be set');
+ }
+ $data = ['v' => self::VERSION];
+ $body = ['form_params' => $data];
$response = parent::sendRequest('get', 'start/' . $this->tool, $body);
- if (empty($response->body->server)) {
+ try {
+ $responseBody = json_decode($response->getBody());
+ } catch (\Exception $e) {
+ throw new StartException('Invalid response');
+ }
+ if (empty($responseBody->server)) {
throw new StartException('no server assigned on start');
};
- $this->setWorkerServer('https://' . $response->body->server);
- $this->setTask($response->body->task);
+ $this->_setRemainingFiles($responseBody->remaining_files ?? null);
+ $this->setWorkerServer('https://' . $responseBody->server);
+ $this->setTask($responseBody->task);
}
- public function next($nextTool): ImageTask
+ public function next(string $nextTool): self
{
$data = [
'v' => self::VERSION,
'task' => $this->getTaskId(),
'tool' => $nextTool
];
- $body = Body::Form($data);
+ $body = ['form_params' => $data];
try {
$response = parent::sendRequest('post', 'task/next', $body);
-
- if (empty($response->body->task)) {
+ $responseBody = json_decode($response->getBody());
+ if (empty($responseBody->task)) {
throw new StartException('No task assigned on chained start');
};
} catch (\Exception $e) {
@@ -100,10 +132,11 @@ public function next($nextTool): ImageTask
$next = $this->newTask($nextTool);
$next->setWorkerServer($this->getWorkerServer());
- $next->setTask($response->body->task);
+
+ $next->setTask($responseBody->task);
//add files chained
- foreach ($response->body->files as $serverFilename => $fileName) {
+ foreach ($responseBody->files as $serverFilename => $fileName) {
$next->files[] = new File($serverFilename, $fileName);
}
@@ -177,18 +210,32 @@ public function addFileFromUrl($url)
* @throws Exceptions\ProcessException
* @throws UploadException
*/
- public function uploadFile($task, $filepath)
+ public function uploadFile(string $task, string $filepath)
{
- if(!file_exists($filepath)){
- throw new \InvalidArgumentException('File '.$filepath.' does not exists');
+ if (!file_exists($filepath)) {
+ throw new \InvalidArgumentException('File ' . $filepath . ' does not exists');
}
- $data = array('task' => $task, 'v' => self::VERSION);
- $files = array('file' => $filepath);
- $body = Request\Body::multipart($data, $files);
+ $body = [
+ 'multipart' => [
+ [
+ 'Content-type' => 'multipart/form-data',
+ 'name' => 'file',
+ 'contents' => fopen($filepath, 'r'),
+ 'filename' => basename($filepath)
+ ],
+ ['name' => 'task', 'contents' => $task],
+ ['name' => 'v', 'contents' => self::VERSION]
+ ],
+ ];
$response = $this->sendRequest('post', 'upload', $body);
- return new File($response->body->server_filename, basename($filepath));
+ try {
+ $responseBody = json_decode($response->getBody());
+ } catch (\Exception $e) {
+ throw new UploadException('Upload response error');
+ }
+ return new File($responseBody->server_filename, basename($filepath));
}
/**
@@ -210,12 +257,25 @@ public function delete()
* @throws Exceptions\ProcessException
* @throws UploadException
*/
- public function uploadUrl($task, $url)
- {
- $data = array('task' => $task, 'cloud_file' => $url, 'v' => self::VERSION);
- $body = Request\Body::Form($data);
+ public function uploadUrl($task, $url, $bearerToken = null)
+ {
+ //$data = ['task' => $task, 'cloud_file' => $url, 'v' => self::VERSION];
+ //$body = ['form_data' => $data];
+ $body = [
+ 'multipart' => [
+ ['name' => 'task', 'contents' => $task],
+ ['name' => 'v', 'contents' => self::VERSION],
+ ['name' => 'cloud_file', 'contents' => $url]
+ ],
+ ];
+
+ if ($bearerToken) {
+ $body['multipart'][] = ['name' => 'cloud_token', 'contents' => $bearerToken];
+ }
+
$response = parent::sendRequest('post', 'upload', $body);
- return new File($response->body->server_filename, basename($url));
+ $responseBody = json_decode($response->getBody());
+ return new File($responseBody->server_filename, basename($url));
}
/**
@@ -276,31 +336,67 @@ public function toBrowser()
return;
}
+
/**
- * @param string $task
+ * @param string|null $task
* @param string $path
*
- * @throws Exceptions\AuthException
- * @throws Exceptions\ProcessException
- * @throws Exceptions\UploadException
+ * @throws AuthException
+ * @throws ProcessException
+ * @throws UploadException
+ * @throws DownloadException
+ */
+ private function downloadFile($task): void
+ {
+ $response = $this->downloadRequestData($task);
+
+ try {
+ $this->outputFile = $response->getBody()->getContents();
+ } catch (\Exception $e) {
+ throw new DownloadException('No file content for download');
+ }
+ }
+
+ /**
+ * @param string $task
+ * @return ResponseInterface
+ */
+ public function downloadStream(): ResponseInterface
+ {
+ $response = $this->downloadRequestData($this->task);
+
+ return $response;
+ }
+
+
+ /**
+ * @param string $task
+ * @return ResponseInterface
+ * @throws AuthException
+ * @throws ProcessException
+ * @throws UploadException
*/
- private function downloadFile($task)
+ private function downloadRequestData(string $task): ResponseInterface
{
$data = array('v' => self::VERSION);
- $body = Request\Body::Form($data);
+ $body = ['form_params' => $data];
+ /** @psalm-suppress PossiblyNullOperand */
$response = parent::sendRequest('get', 'download/' . $task, $body);
- $contentDispoition = $response->headers['Content-Disposition'] ?? $response->headers['content-disposition'];
+ $responseHeaders = $response->getHeaders();
+
+ $contentDisposition = isset($responseHeaders['Content-Disposition']) ? $responseHeaders['Content-Disposition'] : $responseHeaders['content-disposition'];
- if (preg_match("/filename\*\=utf-8\'\'([\W\w]+)/", $contentDispoition, $matchesUtf)) {
+ if (preg_match("/filename\*\=utf-8\'\'([\W\w]+)/", $contentDisposition[0], $matchesUtf)) {
$filename = urldecode(str_replace('"', '', $matchesUtf[1]));
} else {
- preg_match('/ .*filename=\"([\W\w]+)\"/', $contentDispoition, $matches);
+ preg_match('/ .*filename=\"([\W\w]+)\"/', $contentDisposition[0], $matches);
$filename = str_replace('"', '', $matches[1]);
}
- $this->outputFile = $response->raw_body;
$this->outputFileName = $filename;
$this->outputFileType = pathinfo($this->outputFileName, PATHINFO_EXTENSION);
+
+ return $response;
}
/**
@@ -328,31 +424,45 @@ public function getEncrypted($value)
*/
public function execute()
{
- if ($this->task === null) {
- throw new \Exception('Current task not exists');
- }
+ $this->validateTaskStarted();
$data = array_merge(
- $this->getPublicVars($this),
- array('task' => $this->task, 'files' => $this->files, 'v' => self::VERSION));
+ $this->__toArray(),
+ ['task' => $this->task, 'files' => $this->files, 'v' => self::VERSION]
+ );
//clean unwanted vars to be sent
unset($data['timeoutLarge']);
unset($data['timeout']);
unset($data['timeDelay']);
- $body = Request\Body::multipart($data);
+ $body = ['form_params' => $data];
- $response = parent::sendRequest('post', 'process', urldecode(http_build_query($body)));
+ //$response = parent::sendRequest('post', 'process', http_build_query($body, null, '&', PHP_QUERY_RFC3986));
+ $response = parent::sendRequest('post', 'process', $body);
- $this->result = $response->body;
+ $this->result = json_decode($response->getBody());
return $this;
}
- public function getPublicVars()
+ public function __toArray()
{
- return call_user_func('get_object_vars', $this);
+ $props = [];
+ $reflection = new \ReflectionClass($this);
+ $properties = array_filter(
+ $reflection->getProperties(\ReflectionProperty::IS_PUBLIC),
+ function ($property) {
+ return !$property->isStatic();
+ }
+ );
+ foreach ($properties as $property) {
+ $name = $property->name;
+ $props[$name] = $this->$name;
+ }
+
+ return $props;
+ // return call_user_func('get_object_vars', $this);
}
@@ -385,11 +495,14 @@ public function setOutputFilename($filename)
* @throws Exceptions\UploadException
* @throws \Exception
*/
- public function deleteFile($file)
+ public function deleteFile(File $file)
{
+ $this->validateTaskStarted();
+
if (($key = array_search($file, $this->files)) !== false) {
- $body = Request\Body::multipart(['task' => $this->getTaskId(), 'server_filename' => $file->server_filename, 'v' => self::VERSION]);
- $this->sendRequest('post', 'upload/delete', $body);
+ $body = ['form_params' => ['task' => $this->getTaskId(), 'server_filename' => $file->server_filename, 'v' => self::VERSION]];
+ /** @psalm-suppress PossiblyNullOperand */
+ $this->sendRequest('delete', 'upload/' . $this->getTaskId() . '/' . $file->server_filename, $body);
unset($this->files[$key]);
}
return $this;
@@ -488,7 +601,7 @@ public function setCustomString($customString)
*
* @throws \Exception
*/
- public function listTasks($tool = null, $status = null, $customInt = null, $page = null)
+ public function listTasks(?string $tool = null, ?string $status = null, ?int $customInt = null, ?int $page = null): array
{
$this->checkValues($status, $this->statusValues);
@@ -502,11 +615,10 @@ public function listTasks($tool = null, $status = null, $customInt = null, $page
'secret_key' => $this->getSecretKey()
];
- $body = Request\Body::multipart($data);
+ $body = ['form_params' => $data];
$response = parent::sendRequest('post', 'task', $body, true);
-
- $this->result = $response->body;
+ $this->result = json_decode($response->getBody());
return $this->result;
}
@@ -520,4 +632,25 @@ public function setWebhook($webhook)
$this->webhook = $webhook;
return $this;
}
+
+
+ /**
+ * @return void
+ * @throws \Exception
+ */
+ private function validateTaskStarted(): void
+ {
+ if ($this->task === null) {
+ throw new \Exception('Current task does not exists. You must start your task');
+ }
+ }
+
+ /**
+ * @param $remainingFiles
+ * @return void
+ */
+ private function _setRemainingFiles($remainingFiles): void
+ {
+ $this->remainingFiles = $remainingFiles;
+ }
}
diff --git a/vendor/ilovepdf/iloveimg-php/src/Lib/JWT.php b/vendor/ilovepdf/iloveimg-php/src/Lib/JWT.php
deleted file mode 100644
index 79f50b2..0000000
--- a/vendor/ilovepdf/iloveimg-php/src/Lib/JWT.php
+++ /dev/null
@@ -1,366 +0,0 @@
-
- * @author Anant Narayanan
- * @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD
- * @link https://github.com/firebase/php-jwt
- */
-class JWT
-{
-
- /**
- * When checking nbf, iat or expiration times,
- * we want to provide some extra leeway time to
- * account for clock skew.
- */
- public static $leeway = 0;
-
- /**
- * Allow the current timestamp to be specified.
- * Useful for fixing a value within unit testing.
- *
- * Will default to PHP time() value if null.
- */
- public static $timestamp = null;
-
- public static $supported_algs = array(
- 'HS256' => array('hash_hmac', 'SHA256'),
- 'HS512' => array('hash_hmac', 'SHA512'),
- 'HS384' => array('hash_hmac', 'SHA384'),
- 'RS256' => array('openssl', 'SHA256'),
- );
-
- /**
- * Decodes a JWT string into a PHP object.
- *
- * @param string $jwt The JWT
- * @param string|array $key The key, or map of keys.
- * If the algorithm used is asymmetric, this is the public key
- * @param array $allowed_algs List of supported verification algorithms
- * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'
- *
- * @return object The JWT's payload as a PHP object
- *
- * @throws UnexpectedValueException Provided JWT was invalid
- * @throws SignatureInvalidException Provided JWT was invalid because the signature verification failed
- * @throws BeforeValidException Provided JWT is trying to be used before it's eligible as defined by 'nbf'
- * @throws BeforeValidException Provided JWT is trying to be used before it's been created as defined by 'iat'
- * @throws ExpiredException Provided JWT has since expired, as defined by the 'exp' claim
- *
- * @uses jsonDecode
- * @uses urlsafeB64Decode
- */
- public static function decode($jwt, $key, $allowed_algs = array())
- {
- $timestamp = is_null(static::$timestamp) ? time() : static::$timestamp;
-
- if (empty($key)) {
- throw new InvalidArgumentException('Key may not be empty');
- }
- if (!is_array($allowed_algs)) {
- throw new InvalidArgumentException('Algorithm not allowed');
- }
- $tks = explode('.', $jwt);
- if (count($tks) != 3) {
- throw new UnexpectedValueException('Wrong number of segments');
- }
- list($headb64, $bodyb64, $cryptob64) = $tks;
- if (null === ($header = static::jsonDecode(static::urlsafeB64Decode($headb64)))) {
- throw new UnexpectedValueException('Invalid header encoding');
- }
- if (null === $payload = static::jsonDecode(static::urlsafeB64Decode($bodyb64))) {
- throw new UnexpectedValueException('Invalid claims encoding');
- }
- $sig = static::urlsafeB64Decode($cryptob64);
-
- if (empty($header->alg)) {
- throw new UnexpectedValueException('Empty algorithm');
- }
- if (empty(static::$supported_algs[$header->alg])) {
- throw new UnexpectedValueException('Algorithm not supported');
- }
- if (!in_array($header->alg, $allowed_algs)) {
- throw new UnexpectedValueException('Algorithm not allowed');
- }
- if (is_array($key) || $key instanceof \ArrayAccess) {
- if (isset($header->kid)) {
- $key = $key[$header->kid];
- } else {
- throw new UnexpectedValueException('"kid" empty, unable to lookup correct key');
- }
- }
-
- // Check the signature
- if (!static::verify("$headb64.$bodyb64", $sig, $key, $header->alg)) {
- throw new SignatureInvalidException('Signature verification failed');
- }
-
- // Check if 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)
- );
- }
-
- // 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)
- );
- }
-
- // Check if this token has expired.
- if (isset($payload->exp) && ($timestamp - static::$leeway) >= $payload->exp) {
- throw new ExpiredException('Expired token');
- }
-
- return $payload;
- }
-
- /**
- * Converts and signs a PHP object or array into a JWT string.
- *
- * @param object|array $payload PHP object or array
- * @param string $key The secret key.
- * If the algorithm used is asymmetric, this is the private key
- * @param string $alg The signing algorithm.
- * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'
- * @param mixed $keyId
- * @param array $head An array with header elements to attach
- *
- * @return string A signed JWT
- *
- * @uses jsonEncode
- * @uses urlsafeB64Encode
- */
- public static function encode($payload, $key, $alg = 'HS256', $keyId = null, $head = null)
- {
- $header = array('typ' => 'JWT', 'alg' => $alg);
- if ($keyId !== null) {
- $header['kid'] = $keyId;
- }
- if ( isset($head) && is_array($head) ) {
- $header = array_merge($head, $header);
- }
- $segments = array();
- $segments[] = static::urlsafeB64Encode(static::jsonEncode($header));
- $segments[] = static::urlsafeB64Encode(static::jsonEncode($payload));
- $signing_input = implode('.', $segments);
-
- $signature = static::sign($signing_input, $key, $alg);
- $segments[] = static::urlsafeB64Encode($signature);
-
- return implode('.', $segments);
- }
-
- /**
- * Sign a string with a given key and algorithm.
- *
- * @param string $msg The message to sign
- * @param string|resource $key The secret key
- * @param string $alg The signing algorithm.
- * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'
- *
- * @return string An encrypted message
- *
- * @throws DomainException Unsupported algorithm was specified
- */
- public static function sign($msg, $key, $alg = 'HS256')
- {
- if (empty(static::$supported_algs[$alg])) {
- throw new DomainException('Algorithm not supported');
- }
- list($function, $algorithm) = static::$supported_algs[$alg];
- switch($function) {
- case 'hash_hmac':
- return hash_hmac($algorithm, $msg, $key, true);
- case 'openssl':
- $signature = '';
- $success = openssl_sign($msg, $signature, $key, $algorithm);
- if (!$success) {
- throw new DomainException("OpenSSL unable to sign data");
- } else {
- return $signature;
- }
- }
- }
-
- /**
- * Verify a signature with the message, key and method. Not all methods
- * are symmetric, so we must have a separate verify and sign method.
- *
- * @param string $msg The original message (header and body)
- * @param string $signature The original signature
- * @param string|resource $key For HS*, a string key works. for RS*, must be a resource of an openssl public key
- * @param string $alg The algorithm
- *
- * @return bool
- *
- * @throws DomainException Invalid Algorithm or OpenSSL failure
- */
- private static function verify($msg, $signature, $key, $alg)
- {
- if (empty(static::$supported_algs[$alg])) {
- throw new DomainException('Algorithm not supported');
- }
-
- list($function, $algorithm) = static::$supported_algs[$alg];
- switch($function) {
- case 'openssl':
- $success = openssl_verify($msg, $signature, $key, $algorithm);
- if (!$success) {
- throw new DomainException("OpenSSL unable to verify data: " . openssl_error_string());
- } else {
- return $signature;
- }
- case 'hash_hmac':
- default:
- $hash = hash_hmac($algorithm, $msg, $key, true);
- if (function_exists('hash_equals')) {
- return hash_equals($signature, $hash);
- }
- $len = min(static::safeStrlen($signature), static::safeStrlen($hash));
-
- $status = 0;
- for ($i = 0; $i < $len; $i++) {
- $status |= (ord($signature[$i]) ^ ord($hash[$i]));
- }
- $status |= (static::safeStrlen($signature) ^ static::safeStrlen($hash));
-
- return ($status === 0);
- }
- }
-
- /**
- * Decode a JSON string into a PHP object.
- *
- * @param string $input JSON string
- *
- * @return object Object representation of JSON string
- *
- * @throws DomainException Provided string was invalid JSON
- */
- public static function jsonDecode($input)
- {
- if (version_compare(PHP_VERSION, '5.4.0', '>=') && !(defined('JSON_C_VERSION') && PHP_INT_SIZE > 4)) {
- /** In PHP >=5.4.0, json_decode() accepts an options parameter, that allows you
- * to specify that large ints (like Steam Transaction IDs) should be treated as
- * strings, rather than the PHP default behaviour of converting them to floats.
- */
- $obj = json_decode($input, false, 512, JSON_BIGINT_AS_STRING);
- } else {
- /** Not all servers will support that, however, so for older versions we must
- * manually detect large ints in the JSON string and quote them (thus converting
- *them to strings) before decoding, hence the preg_replace() call.
- */
- $max_int_length = strlen((string) PHP_INT_MAX) - 1;
- $json_without_bigints = preg_replace('/:\s*(-?\d{'.$max_int_length.',})/', ': "$1"', $input);
- $obj = json_decode($json_without_bigints);
- }
-
- if (function_exists('json_last_error') && $errno = json_last_error()) {
- static::handleJsonError($errno);
- } elseif ($obj === null && $input !== 'null') {
- throw new DomainException('Null result with non-null input');
- }
- return $obj;
- }
-
- /**
- * Encode a PHP object into a JSON string.
- *
- * @param object|array $input A PHP object or array
- *
- * @return string JSON representation of the PHP object or array
- *
- * @throws DomainException Provided object could not be encoded to valid JSON
- */
- public static function jsonEncode($input)
- {
- $json = json_encode($input);
- if (function_exists('json_last_error') && $errno = json_last_error()) {
- static::handleJsonError($errno);
- } elseif ($json === 'null' && $input !== null) {
- throw new DomainException('Null result with non-null input');
- }
- return $json;
- }
-
- /**
- * Decode a string with URL-safe Base64.
- *
- * @param string $input A Base64 encoded string
- *
- * @return string A decoded string
- */
- public static function urlsafeB64Decode($input)
- {
- $remainder = strlen($input) % 4;
- if ($remainder) {
- $padlen = 4 - $remainder;
- $input .= str_repeat('=', $padlen);
- }
- return base64_decode(strtr($input, '-_', '+/'));
- }
-
- /**
- * Encode a string with URL-safe Base64.
- *
- * @param string $input The string you want encoded
- *
- * @return string The base64 encode of what you passed in
- */
- public static function urlsafeB64Encode($input)
- {
- return str_replace('=', '', strtr(base64_encode($input), '+/', '-_'));
- }
-
- /**
- * Helper method to create a JSON error.
- *
- * @param int $errno An error number from json_last_error()
- *
- * @return void
- */
- private static function handleJsonError($errno)
- {
- $messages = array(
- JSON_ERROR_DEPTH => 'Maximum stack depth exceeded',
- JSON_ERROR_CTRL_CHAR => 'Unexpected control character found',
- JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON'
- );
- throw new DomainException(
- isset($messages[$errno])
- ? $messages[$errno]
- : 'Unknown JSON error: ' . $errno
- );
- }
-
- /**
- * Get the number of bytes in cryptographic strings.
- *
- * @param string
- *
- * @return int
- */
- private static function safeStrlen($str)
- {
- if (function_exists('mb_strlen')) {
- return mb_strlen($str, '8bit');
- }
- return strlen($str);
- }
-}
diff --git a/vendor/ilovepdf/iloveimg-php/src/RemovebackgroundImageTask.php b/vendor/ilovepdf/iloveimg-php/src/RemovebackgroundImageTask.php
new file mode 100644
index 0000000..b9c8178
--- /dev/null
+++ b/vendor/ilovepdf/iloveimg-php/src/RemovebackgroundImageTask.php
@@ -0,0 +1,27 @@
+tool = 'removebackgroundimage';
+ parent::__construct($publicKey, $secretKey, $makeStart);
+ }
+
+
+}
diff --git a/vendor/ilovepdf/iloveimg-php/src/Request/Body.php b/vendor/ilovepdf/iloveimg-php/src/Request/Body.php
deleted file mode 100644
index 85110f9..0000000
--- a/vendor/ilovepdf/iloveimg-php/src/Request/Body.php
+++ /dev/null
@@ -1,66 +0,0 @@
- $file) {
- $data[$name] = call_user_func(array(__CLASS__, 'File'), $file);
- }
- }
-
- return $data;
- }
-}
diff --git a/vendor/ilovepdf/iloveimg-php/src/Request/Method.php b/vendor/ilovepdf/iloveimg-php/src/Request/Method.php
deleted file mode 100644
index 8d0a06c..0000000
--- a/vendor/ilovepdf/iloveimg-php/src/Request/Method.php
+++ /dev/null
@@ -1,75 +0,0 @@
- '',
- 'pass' => '',
- 'method' => CURLAUTH_BASIC
- );
-
- private static $proxy = array(
- 'port' => false,
- 'tunnel' => false,
- 'address' => false,
- 'type' => CURLPROXY_HTTP,
- 'auth' => array(
- 'user' => '',
- 'pass' => '',
- 'method' => CURLAUTH_BASIC
- )
- );
-
- /**
- * Set JSON decode mode
- *
- * @param bool $assoc When TRUE, returned objects will be converted into associative arrays.
- * @param integer $depth User specified recursion depth.
- * @param integer $options Bitmask of JSON decode options. Currently only JSON_BIGINT_AS_STRING is supported (default is to cast large integers as floats)
- * @return array
- */
- public static function jsonOpts($assoc = false, $depth = 512, $options = 0)
- {
- return self::$jsonOpts = array($assoc, $depth, $options);
- }
-
- /**
- * Verify SSL peer
- *
- * @param bool $enabled enable SSL verification, by default is true
- * @return bool
- */
- public static function verifyPeer($enabled)
- {
- return self::$verifyPeer = $enabled;
- }
-
- /**
- * Verify SSL host
- *
- * @param bool $enabled enable SSL host verification, by default is true
- * @return bool
- */
- public static function verifyHost($enabled)
- {
- return self::$verifyHost = $enabled;
- }
-
- /**
- * Follow location option
- *
- * @param bool $enabled enable follow location, by default is true
- * @return bool
- */
- public static function followLocation($enabled)
- {
- return self::$followLocation = $enabled;
- }
-
- /**
- * Set a timeout
- *
- * @param integer $seconds timeout value in seconds
- * @return integer
- */
- public static function timeout($seconds)
- {
- return self::$socketTimeout = $seconds;
- }
-
- /**
- * Set default headers to send on every request
- *
- * @param array $headers headers array
- * @return array
- */
- public static function defaultHeaders($headers)
- {
- return self::$defaultHeaders = array_merge(self::$defaultHeaders, $headers);
- }
-
- /**
- * Set a new default header to send on every request
- *
- * @param string $name header name
- * @param string $value header value
- * @return string
- */
- public static function defaultHeader($name, $value)
- {
- return self::$defaultHeaders[$name] = $value;
- }
-
- /**
- * Clear all the default headers
- */
- public static function clearDefaultHeaders()
- {
- return self::$defaultHeaders = array();
- }
-
- /**
- * Set curl options to send on every request
- *
- * @param array $options options array
- * @return array
- */
- public static function curlOpts($options)
- {
- return self::mergeCurlOptions(self::$curlOpts, $options);
- }
-
- /**
- * Set a new default header to send on every request
- *
- * @param string $name header name
- * @param string $value header value
- * @return string
- */
- public static function curlOpt($name, $value)
- {
- return self::$curlOpts[$name] = $value;
- }
-
- /**
- * Clear all the default headers
- */
- public static function clearCurlOpts()
- {
- return self::$curlOpts = array();
- }
-
-
- /**
- * Send a GET request to a URL
- *
- * @param string $url URL to send the GET request to
- * @param array $headers additional headers to send
- * @param mixed $parameters parameters to send in the querystring
- * @param string $username Authentication username (deprecated)
- * @param string $password Authentication password (deprecated)
- * @return Response
- */
- public static function get($url, $headers = array(), $parameters = null, $username = null, $password = null)
- {
- return self::send(Method::GET, $url, $parameters, $headers, $username, $password);
- }
-
- /**
- * Send a HEAD request to a URL
- * @param string $url URL to send the HEAD request to
- * @param array $headers additional headers to send
- * @param mixed $parameters parameters to send in the querystring
- * @param string $username Basic Authentication username (deprecated)
- * @param string $password Basic Authentication password (deprecated)
- * @return Response
- */
- public static function head($url, $headers = array(), $parameters = null, $username = null, $password = null)
- {
- return self::send(Method::HEAD, $url, $parameters, $headers, $username, $password);
- }
-
- /**
- * Send a OPTIONS request to a URL
- * @param string $url URL to send the OPTIONS request to
- * @param array $headers additional headers to send
- * @param mixed $parameters parameters to send in the querystring
- * @param string $username Basic Authentication username
- * @param string $password Basic Authentication password
- * @return Response
- */
- public static function options($url, $headers = array(), $parameters = null, $username = null, $password = null)
- {
- return self::send(Method::OPTIONS, $url, $parameters, $headers, $username, $password);
- }
-
- /**
- * Send a CONNECT request to a URL
- * @param string $url URL to send the CONNECT request to
- * @param array $headers additional headers to send
- * @param mixed $parameters parameters to send in the querystring
- * @param string $username Basic Authentication username (deprecated)
- * @param string $password Basic Authentication password (deprecated)
- * @return Response
- */
- public static function connect($url, $headers = array(), $parameters = null, $username = null, $password = null)
- {
- return self::send(Method::CONNECT, $url, $parameters, $headers, $username, $password);
- }
-
- /**
- * Send POST request to a URL
- * @param string $url URL to send the POST request to
- * @param array $headers additional headers to send
- * @param mixed $body POST body data
- * @param string $username Basic Authentication username (deprecated)
- * @param string $password Basic Authentication password (deprecated)
- * @return Response response
- */
- public static function post($url, $headers = array(), $body = null, $username = null, $password = null)
- {
- return self::send(Method::POST, $url, $body, $headers, $username, $password);
- }
-
- /**
- * Send DELETE request to a URL
- * @param string $url URL to send the DELETE request to
- * @param array $headers additional headers to send
- * @param mixed $body DELETE body data
- * @param string $username Basic Authentication username (deprecated)
- * @param string $password Basic Authentication password (deprecated)
- * @return Response
- */
- public static function delete($url, $headers = array(), $body = null, $username = null, $password = null)
- {
- return self::send(Method::DELETE, $url, $body, $headers, $username, $password);
- }
-
- /**
- * Send PUT request to a URL
- * @param string $url URL to send the PUT request to
- * @param array $headers additional headers to send
- * @param mixed $body PUT body data
- * @param string $username Basic Authentication username (deprecated)
- * @param string $password Basic Authentication password (deprecated)
- * @return Response
- */
- public static function put($url, $headers = array(), $body = null, $username = null, $password = null)
- {
- return self::send(Method::PUT, $url, $body, $headers, $username, $password);
- }
-
- /**
- * Send PATCH request to a URL
- * @param string $url URL to send the PATCH request to
- * @param array $headers additional headers to send
- * @param mixed $body PATCH body data
- * @param string $username Basic Authentication username (deprecated)
- * @param string $password Basic Authentication password (deprecated)
- * @return Response
- */
- public static function patch($url, $headers = array(), $body = null, $username = null, $password = null)
- {
- return self::send(Method::PATCH, $url, $body, $headers, $username, $password);
- }
-
- /**
- * Send TRACE request to a URL
- * @param string $url URL to send the TRACE request to
- * @param array $headers additional headers to send
- * @param mixed $body TRACE body data
- * @param string $username Basic Authentication username (deprecated)
- * @param string $password Basic Authentication password (deprecated)
- * @return Response
- */
- public static function trace($url, $headers = array(), $body = null, $username = null, $password = null)
- {
- return self::send(Method::TRACE, $url, $body, $headers, $username, $password);
- }
-
- /**
- * This function is useful for serializing multidimensional arrays, and avoid getting
- * the 'Array to string conversion' notice
- * @param array|object $data array to flatten.
- * @param bool|string $parent parent key or false if no parent
- * @return array
- */
- public static function buildHTTPCurlQuery($data, $parent = false)
- {
- $result = array();
-
- if (is_object($data)) {
- $data = get_object_vars($data);
- }
-
- foreach ($data as $key => $value) {
- if ($parent) {
- $new_key = sprintf('%s[%s]', $parent, $key);
- } else {
- $new_key = $key;
- }
-
- if (!$value instanceof \CURLFile and (is_array($value) or is_object($value))) {
- $result = array_merge($result, self::buildHTTPCurlQuery($value, $new_key));
- } else {
- $result[$new_key] = $value;
- }
- }
-
- return $result;
- }
-
- /**
- * Send a cURL request
- * @param \Ilovepdf\Method|string $method HTTP method to use
- * @param string $url URL to send the request to
- * @param mixed $body request body
- * @param array $headers additional headers to send
- * @param string $username Authentication username (deprecated)
- * @param string $password Authentication password (deprecated)
- * @return Response
- * @throws \Ilovepdf\Exception if a cURL error occurs
- */
- public static function send($method, $url, $body = null, $headers = array(), $username = null, $password = null)
- {
- self::$handle = curl_init();
-
- if ($method !== Method::GET) {
- if ($method === Method::POST) {
- curl_setopt(self::$handle, CURLOPT_POST, true);
- } else {
- curl_setopt(self::$handle, CURLOPT_CUSTOMREQUEST, $method);
- }
-
- curl_setopt(self::$handle, CURLOPT_POSTFIELDS, $body);
- } elseif (is_array($body)) {
- if (strpos($url, '?') !== false) {
- $url .= '&';
- } else {
- $url .= '?';
- }
-
- $url .= urldecode(http_build_query(self::buildHTTPCurlQuery($body)));
- }
-
- $curl_base_options = [
- CURLOPT_URL => self::encodeUrl($url),
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_HTTPHEADER => self::getFormattedHeaders($headers),
- CURLOPT_HEADER => true,
- CURLOPT_SSL_VERIFYPEER => self::$verifyPeer,
- //CURLOPT_SSL_VERIFYHOST accepts only 0 (false) or 2 (true). Future versions of libcurl will treat values 1 and 2 as equals
- CURLOPT_SSL_VERIFYHOST => self::$verifyHost === false ? 0 : 2,
- // If an empty string, '', is set, a header containing all supported encoding types is sent
- CURLOPT_ENCODING => ''
- ];
-
- curl_setopt_array(self::$handle, self::mergeCurlOptions($curl_base_options, self::$curlOpts));
-
- if (self::$followLocation == true) {
- @curl_setopt(self::$handle, CURLOPT_FOLLOWLOCATION, true);
- }
-
- if (self::$socketTimeout !== null) {
- curl_setopt(self::$handle, CURLOPT_TIMEOUT, self::$socketTimeout);
- }
-
- if (self::$cookie) {
- curl_setopt(self::$handle, CURLOPT_COOKIE, self::$cookie);
- }
-
- if (self::$cookieFile) {
- curl_setopt(self::$handle, CURLOPT_COOKIEFILE, self::$cookieFile);
- curl_setopt(self::$handle, CURLOPT_COOKIEJAR, self::$cookieFile);
- }
-
- // supporting deprecated http auth method
- if (!empty($username)) {
- curl_setopt_array(self::$handle, array(
- CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
- CURLOPT_USERPWD => $username . ':' . $password
- ));
- }
-
- if (!empty(self::$auth['user'])) {
- curl_setopt_array(self::$handle, array(
- CURLOPT_HTTPAUTH => self::$auth['method'],
- CURLOPT_USERPWD => self::$auth['user'] . ':' . self::$auth['pass']
- ));
- }
-
- if (self::$proxy['address'] !== false) {
- curl_setopt_array(self::$handle, array(
- CURLOPT_PROXYTYPE => self::$proxy['type'],
- CURLOPT_PROXY => self::$proxy['address'],
- CURLOPT_PROXYPORT => self::$proxy['port'],
- CURLOPT_HTTPPROXYTUNNEL => self::$proxy['tunnel'],
- CURLOPT_PROXYAUTH => self::$proxy['auth']['method'],
- CURLOPT_PROXYUSERPWD => self::$proxy['auth']['user'] . ':' . self::$proxy['auth']['pass']
- ));
- }
-
- $response = curl_exec(self::$handle);
- $error = curl_error(self::$handle);
- $info = self::getInfo();
-
- if ($error) {
- if (strpos($error, 'SSL certificate problem')) {
- throw new \Exception($error . ' Try using method verifySsl to false: "$ilovepdf->verifySsl(false)"');
- }
- throw new \Exception($error);
- }
-
- // Split the full response in its headers and body
- $header_size = $info['header_size'];
- $header = substr($response, 0, $header_size);
- $body = substr($response, $header_size);
- $httpCode = $info['http_code'];
-
- return new Response($httpCode, $body, $header, self::$jsonOpts);
- }
-
- public static function getInfo($opt = false)
- {
- if ($opt) {
- $info = curl_getinfo(self::$handle, $opt);
- } else {
- $info = curl_getinfo(self::$handle);
- }
-
- return $info;
- }
-
- public static function getCurlHandle()
- {
- return self::$handle;
- }
-
- public static function getFormattedHeaders($headers)
- {
- $formattedHeaders = array();
-
- $combinedHeaders = array_change_key_case(array_merge(self::$defaultHeaders, (array)$headers));
-
- foreach ($combinedHeaders as $key => $val) {
- $formattedHeaders[] = self::getHeaderString($key, $val);
- }
-
- if (!array_key_exists('user-agent', $combinedHeaders)) {
- $formattedHeaders[] = 'user-agent: unirest-php/2.0';
- }
-
- if (!array_key_exists('expect', $combinedHeaders)) {
- $formattedHeaders[] = 'expect:';
- }
-
- return $formattedHeaders;
- }
-
- private static function getArrayFromQuerystring($query)
- {
- $query = preg_replace_callback('/(?:^|(?<=&))[^=[]+/', function ($match) {
- return bin2hex(urldecode($match[0]));
- }, $query);
-
- parse_str($query, $values);
-
- return array_combine(array_map('hex2bin', array_keys($values)), $values);
- }
-
- /**
- * Ensure that a URL is encoded and safe to use with cURL
- * @param string $url URL to encode
- * @return string
- */
- private static function encodeUrl($url)
- {
- $url_parsed = parse_url($url);
-
- $scheme = $url_parsed['scheme'] . '://';
- $host = $url_parsed['host'];
- $port = (isset($url_parsed['port']) ? $url_parsed['port'] : null);
- $path = (isset($url_parsed['path']) ? $url_parsed['path'] : null);
- $query = (isset($url_parsed['query']) ? $url_parsed['query'] : null);
-
- if ($query !== null) {
- $query = '?' . http_build_query(self::getArrayFromQuerystring($query));
- }
-
- if ($port && $port[0] !== ':') {
- $port = ':' . $port;
- }
-
- $result = $scheme . $host . $port . $path . $query;
- return $result;
- }
-
- private static function getHeaderString($key, $val)
- {
- $key = trim(strtolower($key));
- return $key . ': ' . $val;
- }
-
- /**
- * @param array $existing_options
- * @param array $new_options
- * @return array
- */
- private static function mergeCurlOptions(&$existing_options, $new_options)
- {
- $existing_options = $new_options + $existing_options;
- return $existing_options;
- }
-}
diff --git a/vendor/ilovepdf/iloveimg-php/src/Request/Response.php b/vendor/ilovepdf/iloveimg-php/src/Request/Response.php
deleted file mode 100644
index 9fcb9ff..0000000
--- a/vendor/ilovepdf/iloveimg-php/src/Request/Response.php
+++ /dev/null
@@ -1,78 +0,0 @@
-code = $code;
- $this->headers = $this->parseHeaders($headers);
- $this->raw_body = $raw_body;
- $this->body = $raw_body;
-
- // make sure raw_body is the first argument
- array_unshift($json_args, $raw_body);
-
- if (function_exists('json_decode')) {
- $json = call_user_func_array('json_decode', $json_args);
-
- if (json_last_error() === JSON_ERROR_NONE) {
- $this->body = $json;
- }
- }
- }
-
- /**
- * if PECL_HTTP is not available use a fall back function
- *
- * thanks to ricardovermeltfoort@gmail.com
- * http://php.net/manual/en/function.http-parse-headers.php#112986
- * @param string $raw_headers raw headers
- * @return array
- */
- private function parseHeaders($raw_headers)
- {
- if (function_exists('http_parse_headers')) {
- return http_parse_headers($raw_headers);
- } else {
- $key = '';
- $headers = array();
-
- foreach (explode("\n", $raw_headers) as $i => $h) {
- $h = explode(':', $h, 2);
-
- if (isset($h[1])) {
- if (!isset($headers[$h[0]])) {
- $headers[$h[0]] = trim($h[1]);
- } elseif (is_array($headers[$h[0]])) {
- $headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1])));
- } else {
- $headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1])));
- }
-
- $key = $h[0];
- } else {
- if (substr($h[0], 0, 1) == "\t") {
- $headers[$key] .= "\r\n\t".trim($h[0]);
- } elseif (!$key) {
- $headers[0] = trim($h[0]);
- }
- }
- }
-
- return $headers;
- }
- }
-}
diff --git a/vendor/ilovepdf/iloveimg-php/src/UpscaleImageTask.php b/vendor/ilovepdf/iloveimg-php/src/UpscaleImageTask.php
new file mode 100644
index 0000000..a0b7650
--- /dev/null
+++ b/vendor/ilovepdf/iloveimg-php/src/UpscaleImageTask.php
@@ -0,0 +1,51 @@
+tool = 'upscaleimage';
+ parent::__construct($publicKey, $secretKey, $makeStart);
+ }
+
+ /**
+ * @param $multiplier integer
+ *
+ * values: [2|4]
+ */
+ public function setMultiplier($multiplier)
+ {
+ $this->checkValues($multiplier, $this->multiplierValues);
+
+ $this->multiplier = $multiplier;
+
+ return $this;
+ }
+
+
+ public function setScale($cale){
+ return $this->setMultiplier($cale);
+ }
+
+
+}
diff --git a/vendor/ilovepdf/iloveimg-php/tests/bootstrap.no_autoload.php b/vendor/ilovepdf/iloveimg-php/tests/bootstrap.no_autoload.php
deleted file mode 100755
index 4e9dcfc..0000000
--- a/vendor/ilovepdf/iloveimg-php/tests/bootstrap.no_autoload.php
+++ /dev/null
@@ -1,3 +0,0 @@
-