Skip to content

Commit 610f458

Browse files
committed
Depreciate get_current_release_for_branch, swap over
1 parent 0b0dd4e commit 610f458

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

bin/bumpRelease

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $major = (int) $_SERVER['argv'][1];
1717
isset($RELEASES[$major]) or die("Unknown major version $major");
1818
$minor = isset($_SERVER['argv'][2]) ? (int) $_SERVER['argv'][2] : null;
1919

20-
$version = Branches::get_current_release_for_branch($major, $minor);
20+
$version = Branches::getCurrentReleaseForBranch($major, $minor);
2121
$info = $RELEASES[$major][$version] ?? null;
2222

2323
if ($info === null) {

include/branches.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ function version_array(string $version, ?int $length = null)
400400
return $versionArray;
401401
}
402402

403+
#[Deprecated('Use Branches::getCurrentReleaseForBranch')]
403404
function get_current_release_for_branch(int $major, ?int $minor): ?string {
404405
global $RELEASES, $OLDRELEASES;
405406

src/Releases/Branches.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ public static function getBranchSupportStatus(string $branch): ?string
434434
return null;
435435
}
436436

437-
public static function get_current_release_for_branch(int $major, ?int $minor): ?string
437+
public static function getCurrentReleaseForBranch(int $major, ?int $minor): ?string
438438
{
439439
$GLOBAL_RELEASES = self::getReleaseData();
440440
$GLOBAL_OLDRELEASES = self::getOldReleaseData();

tests/Unit/Releases/LegacyReleaseHelpersTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function testCurrentReleaseForBranch(): void
172172
/* need something that won't change in response to new releases */
173173
self::assertEquals(
174174
'7.4.33',
175-
Branches::get_current_release_for_branch(7, 4),
175+
Branches::getCurrentReleaseForBranch(7, 4),
176176
);
177177
}
178178
}

0 commit comments

Comments
 (0)