diff --git a/src/functions.php b/src/functions.php index 96b631ea..0b8f02fa 100644 --- a/src/functions.php +++ b/src/functions.php @@ -1092,7 +1092,7 @@ function guard_min_version(string $minVersion): void $minVersion = u($minVersion)->ensureStart('v')->toString(); if (version_compare($currentVersion, $minVersion, '<')) { - throw new MinimumVersionRequirementNotMetException($minVersion, $currentVersion); + throw fix_exception(new MinimumVersionRequirementNotMetException($minVersion, $currentVersion)); } } diff --git a/tests/Examples/Generated/VersionGuardMinVersionCheckFailTest.php.err.txt b/tests/Examples/Generated/VersionGuardMinVersionCheckFailTest.php.err.txt index 8cfbf985..4dddf571 100644 --- a/tests/Examples/Generated/VersionGuardMinVersionCheckFailTest.php.err.txt +++ b/tests/Examples/Generated/VersionGuardMinVersionCheckFailTest.php.err.txt @@ -1,5 +1,5 @@ -In functions.php line XXXX: +In version-guard.php line 18: This project requires Castor in version v999.0.0 or greater, you are using vX.Y.Z. Please consider upgrading.