diff --git a/phpunit.xml b/phpunit.xml index 84820b6..85c21b7 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -5,6 +5,7 @@ convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" + cacheResult="false" stopOnError="false" stopOnFailure="false" > diff --git a/src/GitVersion.php b/src/GitVersion.php index 4a864f3..7f09aec 100644 --- a/src/GitVersion.php +++ b/src/GitVersion.php @@ -79,9 +79,9 @@ public function getBranch(): ?string /** * Get the latest commit ID. - * @return string + * @return string|null */ - public function getCommit(): string + public function getCommit(): ?string { if ($this->commit === null && $this->isRepo()) { /**