From 52aa36f0706bb015e73b5fc7d91177e0e3e5d80c Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Fri, 30 Dec 2022 15:44:18 -0700 Subject: [PATCH 1/5] Fixed bug where successful login message was not saved in session --- CHANGELOG.md | 6 ++++++ login-oauth2.php | 1 + 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a47b04..4b145f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v2.2.2 +## mm/dd/2022 + +1. [](#bugfix) + * Fixed issue where **successful login** message was not being persisted to session + # v2.2.1 ## 12/28/2022 diff --git a/login-oauth2.php b/login-oauth2.php index 6a6bd70..cc81881 100644 --- a/login-oauth2.php +++ b/login-oauth2.php @@ -271,6 +271,7 @@ public function loginCallback(): void $debugger->addMessage($t->translate($message), 'debug'); $messages->add($t->translate($message), $event->getMessageType()); + $this->grav['session']->messages = $messages; } $redirect = $event->getRedirect(); From a9c6f7cd807e1ed817b09ac4182453f9c70f8998 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Sun, 1 Jan 2023 13:08:29 -0700 Subject: [PATCH 2/5] Revert "Fixed bug where successful login message was not saved in session" This reverts commit 52aa36f0706bb015e73b5fc7d91177e0e3e5d80c. --- CHANGELOG.md | 6 ------ login-oauth2.php | 1 - 2 files changed, 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b145f0..3a47b04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,3 @@ -# v2.2.2 -## mm/dd/2022 - -1. [](#bugfix) - * Fixed issue where **successful login** message was not being persisted to session - # v2.2.1 ## 12/28/2022 diff --git a/login-oauth2.php b/login-oauth2.php index cc81881..6a6bd70 100644 --- a/login-oauth2.php +++ b/login-oauth2.php @@ -271,7 +271,6 @@ public function loginCallback(): void $debugger->addMessage($t->translate($message), 'debug'); $messages->add($t->translate($message), $event->getMessageType()); - $this->grav['session']->messages = $messages; } $redirect = $event->getRedirect(); From 09afbf4052e923a272686d9d7b56d6f23bc4460c Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Mon, 2 Jan 2023 13:28:12 -0700 Subject: [PATCH 3/5] downgraded some libs to supplrt php 7.3+ --- composer.json | 1 + composer.lock | 19 ++++++++++--------- vendor/composer/autoload_psr4.php | 4 ++-- vendor/composer/autoload_static.php | 16 ++++++++-------- vendor/composer/installed.json | 18 +++++++++--------- vendor/composer/installed.php | 10 +++++----- vendor/composer/platform_check.php | 4 ++-- .../symfony/deprecation-contracts/.gitignore | 3 +++ .../deprecation-contracts/composer.json | 4 ++-- .../deprecation-contracts/function.php | 2 +- 10 files changed, 43 insertions(+), 38 deletions(-) create mode 100644 vendor/symfony/deprecation-contracts/.gitignore diff --git a/composer.json b/composer.json index 265d4ca..86547b8 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,7 @@ "homepage": "https://github.com/trilbymedia/grav-plugin-login-oauth2", "license": "MIT", "require": { + "php": "^7.3.6 || ^8.0", "ext-json": "*", "league/oauth2-client": "^2.6", "league/oauth2-github": "^2.0", diff --git a/composer.lock b/composer.lock index bd78645..afcb2e6 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": "1c40f7b50d19296687d767ef9ac49852", + "content-hash": "ecddd559e8ceb20a11ad8ff3ed52149b", "packages": [ { "name": "guzzlehttp/guzzle", @@ -990,25 +990,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.2.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -1037,7 +1037,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -1053,7 +1053,7 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2022-01-02T09:53:40+00:00" } ], "packages-dev": [], @@ -1063,6 +1063,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { + "php": "^7.3.6 || ^8.0", "ext-json": "*" }, "platform-dev": [], diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index cd9b3c7..c6fe26b 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,9 +6,9 @@ $baseDir = dirname($vendorDir); return array( - 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src', $vendorDir . '/psr/http-factory/src'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), - 'League\\OAuth2\\Client\\' => array($vendorDir . '/league/oauth2-github/src', $vendorDir . '/league/oauth2-google/src', $vendorDir . '/league/oauth2-linkedin/src', $vendorDir . '/league/oauth2-facebook/src', $vendorDir . '/league/oauth2-client/src', $vendorDir . '/league/oauth2-instagram/src'), + 'League\\OAuth2\\Client\\' => array($vendorDir . '/league/oauth2-client/src', $vendorDir . '/league/oauth2-facebook/src', $vendorDir . '/league/oauth2-github/src', $vendorDir . '/league/oauth2-google/src', $vendorDir . '/league/oauth2-instagram/src', $vendorDir . '/league/oauth2-linkedin/src'), 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 6ff6e2e..69a50ca 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -36,8 +36,8 @@ class ComposerStaticInit9e88f6b49322b6bce97c12c41764fc52 public static $prefixDirsPsr4 = array ( 'Psr\\Http\\Message\\' => array ( - 0 => __DIR__ . '/..' . '/psr/http-message/src', - 1 => __DIR__ . '/..' . '/psr/http-factory/src', + 0 => __DIR__ . '/..' . '/psr/http-factory/src', + 1 => __DIR__ . '/..' . '/psr/http-message/src', ), 'Psr\\Http\\Client\\' => array ( @@ -45,12 +45,12 @@ class ComposerStaticInit9e88f6b49322b6bce97c12c41764fc52 ), 'League\\OAuth2\\Client\\' => array ( - 0 => __DIR__ . '/..' . '/league/oauth2-github/src', - 1 => __DIR__ . '/..' . '/league/oauth2-google/src', - 2 => __DIR__ . '/..' . '/league/oauth2-linkedin/src', - 3 => __DIR__ . '/..' . '/league/oauth2-facebook/src', - 4 => __DIR__ . '/..' . '/league/oauth2-client/src', - 5 => __DIR__ . '/..' . '/league/oauth2-instagram/src', + 0 => __DIR__ . '/..' . '/league/oauth2-client/src', + 1 => __DIR__ . '/..' . '/league/oauth2-facebook/src', + 2 => __DIR__ . '/..' . '/league/oauth2-github/src', + 3 => __DIR__ . '/..' . '/league/oauth2-google/src', + 4 => __DIR__ . '/..' . '/league/oauth2-instagram/src', + 5 => __DIR__ . '/..' . '/league/oauth2-linkedin/src', ), 'GuzzleHttp\\Psr7\\' => array ( diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index e340459..3dbff26 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1014,27 +1014,27 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.2.0", - "version_normalized": "3.2.0.0", + "version": "v2.5.2", + "version_normalized": "2.5.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.1" }, - "time": "2022-11-25T10:21:52+00:00", + "time": "2022-01-02T09:53:40+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -1064,7 +1064,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index ce7285b..0f06bd5 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'trilbymedia/grav-plugin-login-oauth2', 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '4986625c87e6516f6894cd3552a1a8c12096c0c0', + 'reference' => 'a9c6f7cd807e1ed817b09ac4182453f9c70f8998', 'type' => 'grav-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -164,9 +164,9 @@ 'dev_requirement' => false, ), 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v3.2.0', - 'version' => '3.2.0.0', - 'reference' => '1ee04c65529dea5d8744774d474e7cbd2f1206d3', + 'pretty_version' => 'v2.5.2', + 'version' => '2.5.2.0', + 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), @@ -175,7 +175,7 @@ 'trilbymedia/grav-plugin-login-oauth2' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '4986625c87e6516f6894cd3552a1a8c12096c0c0', + 'reference' => 'a9c6f7cd807e1ed817b09ac4182453f9c70f8998', 'type' => 'grav-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php index 4c3a5d6..0109125 100644 --- a/vendor/composer/platform_check.php +++ b/vendor/composer/platform_check.php @@ -4,8 +4,8 @@ $issues = array(); -if (!(PHP_VERSION_ID >= 80100)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.'; +if (!(PHP_VERSION_ID >= 70306)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.3.6". You are running ' . PHP_VERSION . '.'; } if ($issues) { diff --git a/vendor/symfony/deprecation-contracts/.gitignore b/vendor/symfony/deprecation-contracts/.gitignore new file mode 100644 index 0000000..c49a5d8 --- /dev/null +++ b/vendor/symfony/deprecation-contracts/.gitignore @@ -0,0 +1,3 @@ +vendor/ +composer.lock +phpunit.xml diff --git a/vendor/symfony/deprecation-contracts/composer.json b/vendor/symfony/deprecation-contracts/composer.json index 774200f..cc7cc12 100644 --- a/vendor/symfony/deprecation-contracts/composer.json +++ b/vendor/symfony/deprecation-contracts/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": ">=8.1" + "php": ">=7.1" }, "autoload": { "files": [ @@ -25,7 +25,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", diff --git a/vendor/symfony/deprecation-contracts/function.php b/vendor/symfony/deprecation-contracts/function.php index 2d56512..d437150 100644 --- a/vendor/symfony/deprecation-contracts/function.php +++ b/vendor/symfony/deprecation-contracts/function.php @@ -20,7 +20,7 @@ * * @author Nicolas Grekas */ - function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void + function trigger_deprecation(string $package, string $version, string $message, ...$args): void { @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); } From 987d6f1db1eb8c971404c8dacc1af650964092b5 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Mon, 2 Jan 2023 13:29:18 -0700 Subject: [PATCH 4/5] update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a47b04..c177b10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v2.2.2 +## 01/02/2023 + +1. [](#bugfix) + * Set `composer.json` to use `^7.3.6 || ^8.0` + downgraded libs for PHP compatibility + # v2.2.1 ## 12/28/2022 From 0610375314e99095ef646a48f7f824cdad7cfb30 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Mon, 2 Jan 2023 13:29:40 -0700 Subject: [PATCH 5/5] prepare for release --- blueprints.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprints.yaml b/blueprints.yaml index e007903..e87182b 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,7 +1,7 @@ name: Login OAuth2 type: login-oauth2 slug: form -version: 2.2.1 +version: 2.2.2 description: OAuth2 Client Plugin to integrate with Grav's Login icon: plug author: