Bladeren bron

Make S3v4 storage engine to work with blackbaze s3 storage #3838

Alex Trofimov 4 jaren geleden
bovenliggende
commit
d2d7a53bbe
3 gewijzigde bestanden met toevoegingen van 77 en 66 verwijderingen
  1. 3 2
      composer.json
  2. 59 64
      composer.lock
  3. 15 0
      patches/plugins_tpyo_amazon-s3-php-class.txt

+ 3 - 2
composer.json

@@ -74,7 +74,7 @@
     ],
     "require": {
         "php": ">=5.6",
-        "akeeba/s3": "dev-main",
+        "akeeba/s3": "dev-development",
         "achingbrain/php5-akismet": "0.5",
         "unaio/amazon-s3-php-class-hmac-v2": "*",
         "tpyo/amazon-s3-php-class": "dev-master",
@@ -106,7 +106,8 @@
             "@relocate-ffmpeg"
         ],
         "relocate-ffmpeg": [
-            "test -f ./plugins/ffmpeg/ffmpeg/linux-x64 && mv ./plugins/ffmpeg/ffmpeg/linux-x64 ./plugins/ffmpeg/ffmpeg.exe && rm -rf ./plugins/ffmpeg/ffmpeg || true"
+            "test -f ./plugins/ffmpeg/ffmpeg/linux-x64 && mv ./plugins/ffmpeg/ffmpeg/linux-x64 ./plugins/ffmpeg/ffmpeg.exe && rm -rf ./plugins/ffmpeg/ffmpeg || true",
+            "patch -p1 < patches/plugins_tpyo_amazon-s3-php-class.txt"
         ]
     }
 }

+ 59 - 64
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "72047611e8ffc41665d341fe1cfa1f8b",
+    "content-hash": "0d6367e8155d2c7d5698ab532ec0ce79",
     "packages": [
         {
             "name": "achingbrain/php5-akismet",
@@ -18,22 +18,24 @@
         },
         {
             "name": "akeeba/s3",
-            "version": "dev-main",
+            "version": "dev-development",
             "source": {
                 "type": "git",
                 "url": "https://github.com/akeeba/s3.git",
-                "reference": "96208915514b19e7789ea053c6a109b212864001"
+                "reference": "608fb1d8974e2bead5e09f6a2293376b7b7d6f17"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/akeeba/s3/zipball/96208915514b19e7789ea053c6a109b212864001",
-                "reference": "96208915514b19e7789ea053c6a109b212864001",
+                "url": "https://api.github.com/repos/akeeba/s3/zipball/608fb1d8974e2bead5e09f6a2293376b7b7d6f17",
+                "reference": "608fb1d8974e2bead5e09f6a2293376b7b7d6f17",
                 "shasum": ""
             },
             "require": {
                 "ext-curl": "*",
-                "php": ">=5.3.4"
+                "ext-simplexml": "*",
+                "php": ">=7.1.0 <8.1"
             },
+            "default-branch": true,
             "type": "library",
             "autoload": {
                 "psr-4": {
@@ -47,21 +49,21 @@
             "authors": [
                 {
                     "name": "Nicholas K. Dionysopoulos",
-                    "email": "nicholas_NO_SPAM_PLEASE@akeebabackup.com",
+                    "email": "nicholas_NO_SPAM_PLEASE@akeeba.com",
                     "homepage": "http://www.dionysopoulos.me",
                     "role": "Lead Developer"
                 }
             ],
-            "description": "Akeeba Engine connector for Amazon S3",
+            "description": "A compact, dependency-less Amazon S3 API client implementing the most commonly used features",
             "homepage": "https://github.com/akeeba/s3",
             "keywords": [
                 "s3"
             ],
             "support": {
                 "issues": "https://github.com/akeeba/s3/issues",
-                "source": "https://github.com/akeeba/s3/tree/1.0.0"
+                "source": "https://github.com/akeeba/s3/tree/development"
             },
-            "time": "2020-01-02T07:13:47+00:00"
+            "time": "2022-01-15T13:39:15+00:00"
         },
         {
             "name": "avto-dev/composer-cleanup-plugin",
@@ -148,28 +150,29 @@
         },
         {
             "name": "bshaffer/oauth2-server-php",
-            "version": "v1.11.1",
+            "version": "v1.12.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/bshaffer/oauth2-server-php.git",
-                "reference": "5a0c8000d4763b276919e2106f54eddda6bc50fa"
+                "reference": "60254fc7fbb08ce56164faae9e075068adf914ef"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/bshaffer/oauth2-server-php/zipball/5a0c8000d4763b276919e2106f54eddda6bc50fa",
-                "reference": "5a0c8000d4763b276919e2106f54eddda6bc50fa",
+                "url": "https://api.github.com/repos/bshaffer/oauth2-server-php/zipball/60254fc7fbb08ce56164faae9e075068adf914ef",
+                "reference": "60254fc7fbb08ce56164faae9e075068adf914ef",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.3.9"
+                "php": ">=7.1"
             },
             "require-dev": {
-                "aws/aws-sdk-php": "~2.8",
-                "firebase/php-jwt": "~2.2",
+                "aws/aws-sdk-php": "^2.8",
+                "firebase/php-jwt": "^2.2",
                 "mongodb/mongodb": "^1.1",
-                "phpunit/phpunit": "^4.0",
-                "predis/predis": "dev-master",
-                "thobbs/phpcassa": "dev-master"
+                "phpunit/phpunit": "^7.5||^8.0",
+                "predis/predis": "^1.1",
+                "thobbs/phpcassa": "dev-master",
+                "yoast/phpunit-polyfills": "^1.0"
             },
             "suggest": {
                 "aws/aws-sdk-php": "~2.8 is required to use DynamoDB storage",
@@ -204,22 +207,22 @@
             ],
             "support": {
                 "issues": "https://github.com/bshaffer/oauth2-server-php/issues",
-                "source": "https://github.com/bshaffer/oauth2-server-php/tree/master"
+                "source": "https://github.com/bshaffer/oauth2-server-php/tree/v1.12.0"
             },
-            "time": "2018-12-04T00:29:32+00:00"
+            "time": "2022-04-19T17:09:11+00:00"
         },
         {
             "name": "chargebee/chargebee-php",
-            "version": "v3.5.2",
+            "version": "v3.7.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/chargebee/chargebee-php.git",
-                "reference": "46bfcbea2b341fc0da04c5944e481506d5ef29bf"
+                "reference": "22d5eba6f874939e0f7e3ab13efc112d48236c5e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/chargebee/chargebee-php/zipball/46bfcbea2b341fc0da04c5944e481506d5ef29bf",
-                "reference": "46bfcbea2b341fc0da04c5944e481506d5ef29bf",
+                "url": "https://api.github.com/repos/chargebee/chargebee-php/zipball/22d5eba6f874939e0f7e3ab13efc112d48236c5e",
+                "reference": "22d5eba6f874939e0f7e3ab13efc112d48236c5e",
                 "shasum": ""
             },
             "require": {
@@ -253,9 +256,9 @@
             ],
             "support": {
                 "issues": "https://github.com/chargebee/chargebee-php/issues",
-                "source": "https://github.com/chargebee/chargebee-php/tree/v3.5.2"
+                "source": "https://github.com/chargebee/chargebee-php/tree/v3.7.0"
             },
-            "time": "2022-03-30T10:00:02+00:00"
+            "time": "2022-05-23T07:27:10+00:00"
         },
         {
             "name": "curl/cacert",
@@ -765,16 +768,16 @@
         },
         {
             "name": "intervention/image",
-            "version": "2.7.1",
+            "version": "2.7.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Intervention/image.git",
-                "reference": "744ebba495319501b873a4e48787759c72e3fb8c"
+                "reference": "04be355f8d6734c826045d02a1079ad658322dad"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Intervention/image/zipball/744ebba495319501b873a4e48787759c72e3fb8c",
-                "reference": "744ebba495319501b873a4e48787759c72e3fb8c",
+                "url": "https://api.github.com/repos/Intervention/image/zipball/04be355f8d6734c826045d02a1079ad658322dad",
+                "reference": "04be355f8d6734c826045d02a1079ad658322dad",
                 "shasum": ""
             },
             "require": {
@@ -817,8 +820,8 @@
             "authors": [
                 {
                     "name": "Oliver Vogel",
-                    "email": "oliver@olivervogel.com",
-                    "homepage": "http://olivervogel.com/"
+                    "email": "oliver@intervention.io",
+                    "homepage": "https://intervention.io/"
                 }
             ],
             "description": "Image handling and manipulation library with support for Laravel integration",
@@ -833,11 +836,11 @@
             ],
             "support": {
                 "issues": "https://github.com/Intervention/image/issues",
-                "source": "https://github.com/Intervention/image/tree/2.7.1"
+                "source": "https://github.com/Intervention/image/tree/2.7.2"
             },
             "funding": [
                 {
-                    "url": "https://www.paypal.me/interventionphp",
+                    "url": "https://paypal.me/interventionio",
                     "type": "custom"
                 },
                 {
@@ -845,7 +848,7 @@
                     "type": "github"
                 }
             ],
-            "time": "2021-12-16T16:49:26+00:00"
+            "time": "2022-05-21T17:30:32+00:00"
         },
         {
             "name": "lusitanian/oauth",
@@ -920,16 +923,16 @@
         },
         {
             "name": "matthiasmullie/minify",
-            "version": "1.3.66",
+            "version": "1.3.68",
             "source": {
                 "type": "git",
                 "url": "https://github.com/matthiasmullie/minify.git",
-                "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6"
+                "reference": "c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/45fd3b0f1dfa2c965857c6d4a470bea52adc31a6",
-                "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6",
+                "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297",
+                "reference": "c00fb02f71b2ef0a5f53fe18c5a8b9aa30f48297",
                 "shasum": ""
             },
             "require": {
@@ -978,23 +981,15 @@
             ],
             "support": {
                 "issues": "https://github.com/matthiasmullie/minify/issues",
-                "source": "https://github.com/matthiasmullie/minify/tree/1.3.66"
+                "source": "https://github.com/matthiasmullie/minify/tree/1.3.68"
             },
             "funding": [
                 {
-                    "url": "https://github.com/[user1",
-                    "type": "github"
-                },
-                {
-                    "url": "https://github.com/matthiasmullie] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.",
-                    "type": "github"
-                },
-                {
-                    "url": "https://github.com/user2",
+                    "url": "https://github.com/matthiasmullie",
                     "type": "github"
                 }
             ],
-            "time": "2021-01-06T15:18:10+00:00"
+            "time": "2022-04-19T08:28:56+00:00"
         },
         {
             "name": "matthiasmullie/path-converter",
@@ -1051,16 +1046,16 @@
         },
         {
             "name": "mpratt/embera",
-            "version": "2.0.25",
+            "version": "2.0.26",
             "source": {
                 "type": "git",
                 "url": "https://github.com/mpratt/Embera.git",
-                "reference": "001d2a83e5a209432fdfb4f7f3b47c24c87a7892"
+                "reference": "d0f4fd8550ca07bd2efb55211c8f66b73db77f99"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/mpratt/Embera/zipball/001d2a83e5a209432fdfb4f7f3b47c24c87a7892",
-                "reference": "001d2a83e5a209432fdfb4f7f3b47c24c87a7892",
+                "url": "https://api.github.com/repos/mpratt/Embera/zipball/d0f4fd8550ca07bd2efb55211c8f66b73db77f99",
+                "reference": "d0f4fd8550ca07bd2efb55211c8f66b73db77f99",
                 "shasum": ""
             },
             "require": {
@@ -1109,7 +1104,7 @@
             ],
             "support": {
                 "issues": "https://github.com/mpratt/Embera/issues",
-                "source": "https://github.com/mpratt/Embera/tree/2.0.25"
+                "source": "https://github.com/mpratt/Embera/tree/2.0.26"
             },
             "funding": [
                 {
@@ -1117,7 +1112,7 @@
                     "type": "paypal"
                 }
             ],
-            "time": "2022-04-07T12:37:39+00:00"
+            "time": "2022-05-15T23:31:41+00:00"
         },
         {
             "name": "paypal/paypal-checkout-sdk",
@@ -1600,16 +1595,16 @@
         },
         {
             "name": "stripe/stripe-php",
-            "version": "v7.122.0",
+            "version": "v7.128.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/stripe/stripe-php.git",
-                "reference": "c58179aa4cad16240a6e65dbf29c2bfd4ae0c033"
+                "reference": "c704949c49b72985c76cc61063aa26fefbd2724e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/stripe/stripe-php/zipball/c58179aa4cad16240a6e65dbf29c2bfd4ae0c033",
-                "reference": "c58179aa4cad16240a6e65dbf29c2bfd4ae0c033",
+                "url": "https://api.github.com/repos/stripe/stripe-php/zipball/c704949c49b72985c76cc61063aa26fefbd2724e",
+                "reference": "c704949c49b72985c76cc61063aa26fefbd2724e",
                 "shasum": ""
             },
             "require": {
@@ -1654,9 +1649,9 @@
             ],
             "support": {
                 "issues": "https://github.com/stripe/stripe-php/issues",
-                "source": "https://github.com/stripe/stripe-php/tree/v7.122.0"
+                "source": "https://github.com/stripe/stripe-php/tree/v7.128.0"
             },
-            "time": "2022-04-08T16:57:33+00:00"
+            "time": "2022-05-05T17:18:02+00:00"
         },
         {
             "name": "symfony/deprecation-contracts",

+ 15 - 0
patches/plugins_tpyo_amazon-s3-php-class.txt

@@ -0,0 +1,15 @@
+--- orig/plugins/tpyo/amazon-s3-php-class/S3.php	2022-05-20 05:32:24.000000000 +1000
++++ fixed/plugins/tpyo/amazon-s3-php-class/S3.php	2022-05-25 20:48:42.000000000 +1000
+@@ -2350,6 +2350,12 @@
+ 			{
+ 				$this->amzHeaders['x-amz-date'] = gmdate('Ymd\THis\Z');
+ 
++                if (!isset($this->headers['content-type']))
++                    $this->headers['content-type'] = 'application/octet-stream';
++
++                if (!isset($this->headers['content-md5']))
++                    $this->headers['content-md5'] = hash('md5', $this->data);
++
+ 				if (!isset($this->amzHeaders['x-amz-content-sha256'])) 
+ 					$this->amzHeaders['x-amz-content-sha256'] = hash('sha256', $this->data);
+