Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for PHP 8.4 compatibility #285

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/future/FutureProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ abstract class FutureProxy extends Future {

private $proxied;

public function __construct(Future $proxied = null) {
public function __construct(?Future $proxied = null) {
if ($proxied) {
$this->setProxiedFuture($proxied);
}
Expand Down
6 changes: 3 additions & 3 deletions src/parser/aast/api/AASTNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final public function getParentNode() {
return $this->parentNode;
}

final public function setParentNode(AASTNode $node = null) {
final public function setParentNode(?AASTNode $node = null) {
$this->parentNode = $node;
return $this;
}
Expand All @@ -51,7 +51,7 @@ final public function getPreviousSibling() {
return $this->previousSibling;
}

final public function setPreviousSibling(AASTNode $node = null) {
final public function setPreviousSibling(?AASTNode $node = null) {
$this->previousSibling = $node;
return $this;
}
Expand All @@ -60,7 +60,7 @@ final public function getNextSibling() {
return $this->nextSibling;
}

final public function setNextSibling(AASTNode $node = null) {
final public function setNextSibling(?AASTNode $node = null) {
$this->nextSibling = $node;
return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/parser/argument/PhutilArgumentParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ public function parseWorkflowsFull(array $workflows) {
if ($workflow->isExecutable()) {
$workflow->setArgv($this);
$err = $workflow->execute($this);
exit($err);
exit((int)$err);
} else {
return $workflow;
}
Expand Down
2 changes: 1 addition & 1 deletion src/repository/marker/ArcanistMarkerRef.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function getWorkingCopyStateRef() {
return $this->getHardpoint(self::HARDPOINT_WORKINGCOPYSTATEREF);
}

public function attachRemoteRef(ArcanistRemoteRef $ref = null) {
public function attachRemoteRef(?ArcanistRemoteRef $ref = null) {
return $this->attachHardpoint(self::HARDPOINT_REMOTEREF, $ref);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ protected function newLocalRefMarkers() {
return $this->newMarkers();
}

protected function newRemoteRefMarkers(ArcanistRemoteRef $remote = null) {
protected function newRemoteRefMarkers(?ArcanistRemoteRef $remote = null) {
return $this->newMarkers($remote);
}

private function newMarkers(ArcanistRemoteRef $remote = null) {
private function newMarkers(?ArcanistRemoteRef $remote = null) {
$api = $this->getRepositoryAPI();

// In native Mercurial it is difficult to identify remote markers, and
Expand Down
2 changes: 1 addition & 1 deletion src/unit/ArcanistUnitTestResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function getUserData() {
* "extra data" allows an implementation to store additional key/value
* metadata along with the result of the test run.
*/
public function setExtraData(array $extra_data = null) {
public function setExtraData(?array $extra_data = null) {
$this->extraData = $extra_data;
return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/unit/engine/ArcanistUnitTestEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ final public function getEnableCoverage() {
return $this->enableCoverage;
}

final public function setRenderer(ArcanistUnitRenderer $renderer = null) {
final public function setRenderer(?ArcanistUnitRenderer $renderer = null) {
$this->renderer = $renderer;
return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion support/init/init-arcanist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
$runtime = new ArcanistRuntime();
$err = $runtime->execute($argv);

exit($err);
exit((int)$err);