From 082f04d3c316acee5ef4adaa7bc176b42b2e09ef Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Wed, 31 May 2023 09:50:39 +0100 Subject: [PATCH] fix(regression): caught errors Signed-off-by: Sami Mazouz --- composer.json | 2 +- extensions/akismet/composer.json | 6 +++--- extensions/approval/composer.json | 6 +++--- extensions/bbcode/composer.json | 4 ++-- extensions/embed/composer.json | 4 ++-- extensions/emoji/composer.json | 4 ++-- extensions/flags/composer.json | 4 ++-- extensions/lang-english/composer.json | 4 ++-- extensions/likes/composer.json | 4 ++-- extensions/lock/composer.json | 4 ++-- extensions/markdown/composer.json | 4 ++-- extensions/mentions/composer.json | 4 ++-- extensions/nicknames/composer.json | 6 +++--- extensions/nicknames/src/NicknameDriver.php | 2 +- extensions/package-manager/composer.json | 2 +- extensions/pusher/composer.json | 4 ++-- extensions/statistics/composer.json | 4 ++-- extensions/sticky/composer.json | 4 ++-- extensions/subscriptions/composer.json | 4 ++-- extensions/suspend/composer.json | 4 ++-- extensions/tags/composer.json | 4 ++-- framework/core/composer.json | 2 +- framework/core/src/Discussion/Discussion.php | 2 +- framework/core/src/Search/GambitManager.php | 2 +- php-packages/phpstan/composer.json | 2 +- php-packages/testing/composer.json | 2 +- 26 files changed, 47 insertions(+), 47 deletions(-) diff --git a/composer.json b/composer.json index 92672747b..fcfde0401 100644 --- a/composer.json +++ b/composer.json @@ -174,7 +174,7 @@ "extensions/tags" ], "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "phpstan": { "includes": [ diff --git a/extensions/akismet/composer.json b/extensions/akismet/composer.json index 9cbdd48ef..f1070a3bf 100644 --- a/extensions/akismet/composer.json +++ b/extensions/akismet/composer.json @@ -19,8 +19,8 @@ } ], "require": { - "flarum/core": "^1.8", - "flarum/approval": "^1.7" + "flarum/core": "^2.0", + "flarum/approval": "^2.0" }, "autoload": { "psr-4": { @@ -29,7 +29,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Akismet", diff --git a/extensions/approval/composer.json b/extensions/approval/composer.json index c54fab337..1cdc710e7 100644 --- a/extensions/approval/composer.json +++ b/extensions/approval/composer.json @@ -19,8 +19,8 @@ } ], "require": { - "flarum/core": "^1.8", - "flarum/flags": "^1.7" + "flarum/core": "^2.0", + "flarum/flags": "^2.0" }, "autoload": { "psr-4": { @@ -29,7 +29,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Approval", diff --git a/extensions/bbcode/composer.json b/extensions/bbcode/composer.json index a1a0e9272..49580f3c7 100644 --- a/extensions/bbcode/composer.json +++ b/extensions/bbcode/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "autoload": { "psr-4": { @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "BBCode", diff --git a/extensions/embed/composer.json b/extensions/embed/composer.json index 71c4c4593..c78be205c 100644 --- a/extensions/embed/composer.json +++ b/extensions/embed/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "autoload": { "psr-4": { @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Embed", diff --git a/extensions/emoji/composer.json b/extensions/emoji/composer.json index 10d5dedb7..7f9ad882e 100644 --- a/extensions/emoji/composer.json +++ b/extensions/emoji/composer.json @@ -19,11 +19,11 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Emoji", diff --git a/extensions/flags/composer.json b/extensions/flags/composer.json index c7b8b1d38..d772afa96 100644 --- a/extensions/flags/composer.json +++ b/extensions/flags/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "autoload": { "psr-4": { @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Flags", diff --git a/extensions/lang-english/composer.json b/extensions/lang-english/composer.json index 545b447ec..9025763bb 100644 --- a/extensions/lang-english/composer.json +++ b/extensions/lang-english/composer.json @@ -7,11 +7,11 @@ ], "license": "MIT", "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "English", diff --git a/extensions/likes/composer.json b/extensions/likes/composer.json index 167b4a624..3e5bd57c0 100644 --- a/extensions/likes/composer.json +++ b/extensions/likes/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "autoload": { "psr-4": { @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Likes", diff --git a/extensions/lock/composer.json b/extensions/lock/composer.json index 046807f06..1bec50b93 100644 --- a/extensions/lock/composer.json +++ b/extensions/lock/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "autoload": { "psr-4": { @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Lock", diff --git a/extensions/markdown/composer.json b/extensions/markdown/composer.json index 2c93a97b8..270385c6d 100644 --- a/extensions/markdown/composer.json +++ b/extensions/markdown/composer.json @@ -19,11 +19,11 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Markdown", diff --git a/extensions/mentions/composer.json b/extensions/mentions/composer.json index 8e6e3dd08..1abb6eb65 100644 --- a/extensions/mentions/composer.json +++ b/extensions/mentions/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "autoload": { "psr-4": { @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Mentions", diff --git a/extensions/nicknames/composer.json b/extensions/nicknames/composer.json index d9effd919..3dbfec85a 100644 --- a/extensions/nicknames/composer.json +++ b/extensions/nicknames/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "autoload": { "psr-4": { @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Nicknames", @@ -68,7 +68,7 @@ }, "require-dev": { "flarum/testing": "^1.0.0", - "flarum/core": "1.x-dev" + "flarum/core": "2.x-dev" }, "scripts-descriptions": { "test": "Runs all tests.", diff --git a/extensions/nicknames/src/NicknameDriver.php b/extensions/nicknames/src/NicknameDriver.php index aa074f817..cabdf8f44 100644 --- a/extensions/nicknames/src/NicknameDriver.php +++ b/extensions/nicknames/src/NicknameDriver.php @@ -16,6 +16,6 @@ class NicknameDriver implements DriverInterface { public function displayName(User $user): string { - return $user->nickname ?? $user->username; + return $user->nickname ?: $user->username; } } diff --git a/extensions/package-manager/composer.json b/extensions/package-manager/composer.json index b8e390a3b..484243ef6 100755 --- a/extensions/package-manager/composer.json +++ b/extensions/package-manager/composer.json @@ -22,7 +22,7 @@ "source": "https://github.com/flarum/package-manager" }, "require": { - "flarum/core": "^1.8", + "flarum/core": "^2.0", "composer/composer": "^2.3" }, "require-dev": { diff --git a/extensions/pusher/composer.json b/extensions/pusher/composer.json index 5cc1ed528..2cee7b1bc 100644 --- a/extensions/pusher/composer.json +++ b/extensions/pusher/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8", + "flarum/core": "^2.0", "pusher/pusher-php-server": "^2.2" }, "require-dev": { @@ -32,7 +32,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Pusher", diff --git a/extensions/statistics/composer.json b/extensions/statistics/composer.json index 91d585519..501cf8ab8 100644 --- a/extensions/statistics/composer.json +++ b/extensions/statistics/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "autoload": { "psr-4": { @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Statistics", diff --git a/extensions/sticky/composer.json b/extensions/sticky/composer.json index c9cbcc841..0ca24731b 100644 --- a/extensions/sticky/composer.json +++ b/extensions/sticky/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "autoload": { "psr-4": { @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Sticky", diff --git a/extensions/subscriptions/composer.json b/extensions/subscriptions/composer.json index d7365c764..8307f8850 100644 --- a/extensions/subscriptions/composer.json +++ b/extensions/subscriptions/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "autoload": { "psr-4": { @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Subscriptions", diff --git a/extensions/suspend/composer.json b/extensions/suspend/composer.json index cd28f64d0..3dd7d98a9 100644 --- a/extensions/suspend/composer.json +++ b/extensions/suspend/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "autoload": { "psr-4": { @@ -28,7 +28,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Suspend", diff --git a/extensions/tags/composer.json b/extensions/tags/composer.json index 91adda661..b9a1ca8f4 100644 --- a/extensions/tags/composer.json +++ b/extensions/tags/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "flarum/core": "^1.8" + "flarum/core": "^2.0" }, "autoload": { "psr-4": { @@ -33,7 +33,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-extension": { "title": "Tags", diff --git a/framework/core/composer.json b/framework/core/composer.json index 982c1f42a..f4e0715b5 100644 --- a/framework/core/composer.json +++ b/framework/core/composer.json @@ -109,7 +109,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" }, "flarum-cli": { "excludeScaffolding": [ diff --git a/framework/core/src/Discussion/Discussion.php b/framework/core/src/Discussion/Discussion.php index 97562111a..ef7f0082b 100644 --- a/framework/core/src/Discussion/Discussion.php +++ b/framework/core/src/Discussion/Discussion.php @@ -88,7 +88,7 @@ class Discussion extends AbstractModel /** * The user for which the state relationship should be loaded. */ - protected static ?User $stateUser; + protected static ?User $stateUser = null; public static function boot() { diff --git a/framework/core/src/Search/GambitManager.php b/framework/core/src/Search/GambitManager.php index cb0a98864..d66d63717 100644 --- a/framework/core/src/Search/GambitManager.php +++ b/framework/core/src/Search/GambitManager.php @@ -50,7 +50,7 @@ class GambitManager protected function applyGambits(SearchState $search, string $query): string { - $bits = $this->explode($query); + $bits = array_filter($this->explode($query)); if (! $bits) { return ''; diff --git a/php-packages/phpstan/composer.json b/php-packages/phpstan/composer.json index 0509ab527..74a8cfe17 100644 --- a/php-packages/phpstan/composer.json +++ b/php-packages/phpstan/composer.json @@ -19,7 +19,7 @@ ] }, "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" } }, "repositories": [{ diff --git a/php-packages/testing/composer.json b/php-packages/testing/composer.json index 3969df565..d9f15262d 100644 --- a/php-packages/testing/composer.json +++ b/php-packages/testing/composer.json @@ -27,7 +27,7 @@ }, "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "2.x-dev" } }, "repositories": [{