From 43f62b017e68ff30df22f3b009cf3d36904fbfe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Mon, 11 Jan 2021 21:22:18 +0100 Subject: [PATCH 1/3] Downgraded polyfill-mbstring to go around WP svn lint not handling PHP 8.0 --- composer.json | 1 + composer.lock | 156 +++++++++++++++++++++++++------------------------- gulpfile.js | 1 - 3 files changed, 79 insertions(+), 79 deletions(-) diff --git a/composer.json b/composer.json index 39afe3536..7be643796 100644 --- a/composer.json +++ b/composer.json @@ -42,6 +42,7 @@ "guzzlehttp/promises": "^1.4", "symfony/polyfill-intl-idn": "^1.19.0 <1.20", "symfony/polyfill-intl-normalizer": "^1.19.0 <1.20", + "symfony/polyfill-mbstring": "^1.20.0 <1.22", "symfony/polyfill-php70": "^1.19.0 <1.20", "symfony/polyfill-php72": "^1.19.0 <1.20" }, diff --git a/composer.lock b/composer.lock index cb98d80ae..453fce1a6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8fda6822d805fe77b7d87a5379a7710a", + "content-hash": "8ccff54ebf9743bd99dee48922f28639", "packages": [ { "name": "firebase/php-jwt", @@ -984,6 +984,83 @@ ], "time": "2020-10-23T09:01:57+00:00" }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.20.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.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": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T14:02:19+00:00" + }, { "name": "symfony/polyfill-php70", "version": "v1.19.0", @@ -3907,83 +3984,6 @@ ], "time": "2021-01-07T16:49:33+00:00" }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.22.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", - "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.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": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-01-07T16:49:33+00:00" - }, { "name": "symfony/polyfill-php73", "version": "v1.22.0", diff --git a/gulpfile.js b/gulpfile.js index ed0f33d72..cfeb96642 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -284,7 +284,6 @@ gulp.task( 'build:deps:composer:other', function () { 'vendor/symfony/polyfill-intl-idn/bootstrap.php', 'vendor/symfony/polyfill-intl-idn/Idn.php', 'vendor/symfony/polyfill-mbstring/bootstrap.php', - 'vendor/symfony/polyfill-mbstring/bootstrap80.php', 'vendor/symfony/polyfill-mbstring/Mbstring.php', ], { base: 'vendor/' } From e52a36482598ea213cc77c848829dd1a326df9a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Mon, 11 Jan 2021 23:32:28 +0100 Subject: [PATCH 2/3] Revert "Simplified mimeType check" This reverts commit e91853ed40c16d9926823af3118fcc8515d13236. --- src/php/class-api-facade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/php/class-api-facade.php b/src/php/class-api-facade.php index af43523e1..e40aafb77 100644 --- a/src/php/class-api-facade.php +++ b/src/php/class-api-facade.php @@ -236,7 +236,7 @@ private static function list_files( $parent_id, $fields, $order_by, $pagination_ throw new \Sgdg\Exceptions\Unsupported_Value_Exception( $fields, 'list_files' ); } if ( $fields->check( array( 'id', 'name' ) ) ) { - $mime_type_check = '(mimeType contains "' . $mime_type_prefix . '" or (mimeType = "application/vnd.google-apps.shortcut" and shortcutDetails.targetMimeType contains "' . $mime_type_prefix . '"))'; + $mime_type_check = '(mimeType contains "' . $mime_type_prefix . '" or (mimeType contains "application/vnd.google-apps.shortcut" and shortcutDetails.targetMimeType contains "' . $mime_type_prefix . '"))'; } else { $mime_type_check = 'mimeType contains "' . $mime_type_prefix . '"'; } From cf8d083911be2919bc75bf3e305b05504616bb06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Mon, 11 Jan 2021 23:41:02 +0100 Subject: [PATCH 3/3] polyfill-mbstring correctly as dev-dependency now --- composer.json | 4 +- composer.lock | 156 +++++++++++++++++++++++++------------------------- 2 files changed, 80 insertions(+), 80 deletions(-) diff --git a/composer.json b/composer.json index 7be643796..b8d0c9fe5 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,6 @@ "guzzlehttp/promises": "^1.4", "symfony/polyfill-intl-idn": "^1.19.0 <1.20", "symfony/polyfill-intl-normalizer": "^1.19.0 <1.20", - "symfony/polyfill-mbstring": "^1.20.0 <1.22", "symfony/polyfill-php70": "^1.19.0 <1.20", "symfony/polyfill-php72": "^1.19.0 <1.20" }, @@ -53,6 +52,7 @@ "phpmd/phpmd": "^2.6", "phan/phan": "^4.0", "phpunit/phpunit": "^7.5", - "skaut/phan-wordpress-stubs": "^1.0.0" + "skaut/phan-wordpress-stubs": "^1.0.0", + "symfony/polyfill-mbstring": "^1.20.0 <1.22" } } diff --git a/composer.lock b/composer.lock index 453fce1a6..32ed2f1de 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8ccff54ebf9743bd99dee48922f28639", + "content-hash": "e910be70c65eb50902f5c7eb4cebd987", "packages": [ { "name": "firebase/php-jwt", @@ -984,83 +984,6 @@ ], "time": "2020-10-23T09:01:57+00:00" }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", - "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.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": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-23T14:02:19+00:00" - }, { "name": "symfony/polyfill-php70", "version": "v1.19.0", @@ -3984,6 +3907,83 @@ ], "time": "2021-01-07T16:49:33+00:00" }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.20.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.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": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T14:02:19+00:00" + }, { "name": "symfony/polyfill-php73", "version": "v1.22.0",