1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Fix implicitly nullable parameter declarations for PHP 8.4

Summary:
Implicitly nullable parameter declarations are deprecated in PHP 8.4:
https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated

The proposed syntax was introduced in PHP 7.1.

This patch is a followup on top of D25814.

Refs T15935

Test Plan:
* Try to view a task in the browser
* Try to run `./bin/auth recover` on the CLI
* Try to browse projects in the browser
* Try to create a new project without a name in the browser

Reviewers: O1 Blessed Committers, chris

Reviewed By: O1 Blessed Committers, chris

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15935

Differential Revision: https://we.phorge.it/D25816
This commit is contained in:
Andre Klapper 2024-08-31 14:42:02 +02:00
parent db61eb20f0
commit f3d49f7407
6 changed files with 10 additions and 10 deletions

View file

@ -334,7 +334,7 @@ final class PhabricatorAuthSessionEngine extends Phobject {
*/ */
public function terminateLoginSessions( public function terminateLoginSessions(
PhabricatorUser $user, PhabricatorUser $user,
PhutilOpaqueEnvelope $except_session = null) { ?PhutilOpaqueEnvelope $except_session = null) {
$sessions = id(new PhabricatorAuthSessionQuery()) $sessions = id(new PhabricatorAuthSessionQuery())
->setViewer($user) ->setViewer($user)
@ -955,7 +955,7 @@ final class PhabricatorAuthSessionEngine extends Phobject {
*/ */
public function getOneTimeLoginURI( public function getOneTimeLoginURI(
PhabricatorUser $user, PhabricatorUser $user,
PhabricatorUserEmail $email = null, ?PhabricatorUserEmail $email = null,
$type = self::ONETIME_RESET, $type = self::ONETIME_RESET,
$force_full_session = false) { $force_full_session = false) {
@ -1003,7 +1003,7 @@ final class PhabricatorAuthSessionEngine extends Phobject {
*/ */
public function loadOneTimeLoginKey( public function loadOneTimeLoginKey(
PhabricatorUser $user, PhabricatorUser $user,
PhabricatorUserEmail $email = null, ?PhabricatorUserEmail $email = null,
$key = null) { $key = null) {
$key_hash = $this->getOneTimeLoginKeyHash($user, $email, $key); $key_hash = $this->getOneTimeLoginKeyHash($user, $email, $key);
@ -1031,7 +1031,7 @@ final class PhabricatorAuthSessionEngine extends Phobject {
*/ */
private function getOneTimeLoginKeyHash( private function getOneTimeLoginKeyHash(
PhabricatorUser $user, PhabricatorUser $user,
PhabricatorUserEmail $email = null, ?PhabricatorUserEmail $email = null,
$key = null) { $key = null) {
$parts = array( $parts = array(

View file

@ -170,7 +170,7 @@ abstract class PhabricatorProjectController extends PhabricatorController {
protected function newCardResponse( protected function newCardResponse(
$board_phid, $board_phid,
$object_phid, $object_phid,
PhabricatorProjectColumnOrder $ordering = null, ?PhabricatorProjectColumnOrder $ordering = null,
$sounds = array()) { $sounds = array()) {
$viewer = $this->getViewer(); $viewer = $this->getViewer();

View file

@ -171,7 +171,7 @@ final class PhabricatorProfileMenuItemViewList
private function getHighlightedItemKey( private function getHighlightedItemKey(
array $items, array $items,
PHUIListItemView $selected_item = null) { ?PHUIListItemView $selected_item = null) {
assert_instances_of($items, 'PHUIListItemView'); assert_instances_of($items, 'PHUIListItemView');

View file

@ -5026,7 +5026,7 @@ abstract class PhabricatorApplicationTransactionEditor
} }
final protected function newSubEditor( final protected function newSubEditor(
PhabricatorApplicationTransactionEditor $template = null) { ?PhabricatorApplicationTransactionEditor $template = null) {
$editor = $this->newEditorCopy($template); $editor = $this->newEditorCopy($template);
$editor->parentEditor = $this; $editor->parentEditor = $this;
@ -5036,7 +5036,7 @@ abstract class PhabricatorApplicationTransactionEditor
} }
private function newEditorCopy( private function newEditorCopy(
PhabricatorApplicationTransactionEditor $template = null) { ?PhabricatorApplicationTransactionEditor $template = null) {
if ($template === null) { if ($template === null) {
$template = newv(get_class($this), array()); $template = newv(get_class($this), array());
} }

View file

@ -13,7 +13,7 @@ final class PhabricatorApplicationTransactionValidationError
$type, $type,
$short_message, $short_message,
$message, $message,
PhabricatorApplicationTransaction $xaction = null) { ?PhabricatorApplicationTransaction $xaction = null) {
$this->type = $type; $this->type = $type;
$this->shortMessage = $short_message; $this->shortMessage = $short_message;

View file

@ -118,7 +118,7 @@ final class PhabricatorMainMenuSearchView extends AphrontView {
public static function getGlobalSearchScopeItems( public static function getGlobalSearchScopeItems(
PhabricatorUser $viewer, PhabricatorUser $viewer,
PhabricatorApplication $application = null, ?PhabricatorApplication $application = null,
$global_only = false) { $global_only = false) {
$items = array(); $items = array();