fix(regression): caught errors

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
Sami Mazouz 2023-05-31 09:50:39 +01:00
parent 04fe2616a4
commit 082f04d3c3
No known key found for this signature in database
26 changed files with 47 additions and 47 deletions

View File

@ -174,7 +174,7 @@
"extensions/tags" "extensions/tags"
], ],
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"phpstan": { "phpstan": {
"includes": [ "includes": [

View File

@ -19,8 +19,8 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8", "flarum/core": "^2.0",
"flarum/approval": "^1.7" "flarum/approval": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -29,7 +29,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Akismet", "title": "Akismet",

View File

@ -19,8 +19,8 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8", "flarum/core": "^2.0",
"flarum/flags": "^1.7" "flarum/flags": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -29,7 +29,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Approval", "title": "Approval",

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -28,7 +28,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "BBCode", "title": "BBCode",

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -28,7 +28,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Embed", "title": "Embed",

View File

@ -19,11 +19,11 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Emoji", "title": "Emoji",

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -28,7 +28,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Flags", "title": "Flags",

View File

@ -7,11 +7,11 @@
], ],
"license": "MIT", "license": "MIT",
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "English", "title": "English",

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -28,7 +28,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Likes", "title": "Likes",

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -28,7 +28,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Lock", "title": "Lock",

View File

@ -19,11 +19,11 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Markdown", "title": "Markdown",

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -28,7 +28,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Mentions", "title": "Mentions",

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -28,7 +28,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Nicknames", "title": "Nicknames",
@ -68,7 +68,7 @@
}, },
"require-dev": { "require-dev": {
"flarum/testing": "^1.0.0", "flarum/testing": "^1.0.0",
"flarum/core": "1.x-dev" "flarum/core": "2.x-dev"
}, },
"scripts-descriptions": { "scripts-descriptions": {
"test": "Runs all tests.", "test": "Runs all tests.",

View File

@ -16,6 +16,6 @@ class NicknameDriver implements DriverInterface
{ {
public function displayName(User $user): string public function displayName(User $user): string
{ {
return $user->nickname ?? $user->username; return $user->nickname ?: $user->username;
} }
} }

View File

@ -22,7 +22,7 @@
"source": "https://github.com/flarum/package-manager" "source": "https://github.com/flarum/package-manager"
}, },
"require": { "require": {
"flarum/core": "^1.8", "flarum/core": "^2.0",
"composer/composer": "^2.3" "composer/composer": "^2.3"
}, },
"require-dev": { "require-dev": {

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8", "flarum/core": "^2.0",
"pusher/pusher-php-server": "^2.2" "pusher/pusher-php-server": "^2.2"
}, },
"require-dev": { "require-dev": {
@ -32,7 +32,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Pusher", "title": "Pusher",

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -28,7 +28,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Statistics", "title": "Statistics",

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -28,7 +28,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Sticky", "title": "Sticky",

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -28,7 +28,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Subscriptions", "title": "Subscriptions",

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -28,7 +28,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Suspend", "title": "Suspend",

View File

@ -19,7 +19,7 @@
} }
], ],
"require": { "require": {
"flarum/core": "^1.8" "flarum/core": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -33,7 +33,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-extension": { "flarum-extension": {
"title": "Tags", "title": "Tags",

View File

@ -109,7 +109,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
}, },
"flarum-cli": { "flarum-cli": {
"excludeScaffolding": [ "excludeScaffolding": [

View File

@ -88,7 +88,7 @@ class Discussion extends AbstractModel
/** /**
* The user for which the state relationship should be loaded. * The user for which the state relationship should be loaded.
*/ */
protected static ?User $stateUser; protected static ?User $stateUser = null;
public static function boot() public static function boot()
{ {

View File

@ -50,7 +50,7 @@ class GambitManager
protected function applyGambits(SearchState $search, string $query): string protected function applyGambits(SearchState $search, string $query): string
{ {
$bits = $this->explode($query); $bits = array_filter($this->explode($query));
if (! $bits) { if (! $bits) {
return ''; return '';

View File

@ -19,7 +19,7 @@
] ]
}, },
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
} }
}, },
"repositories": [{ "repositories": [{

View File

@ -27,7 +27,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
} }
}, },
"repositories": [{ "repositories": [{