11<?php
22
3+ use phpweb \Releases \Branches ;
4+
35include_once __DIR__ . '/releases.inc ' ;
46include_once __DIR__ . '/version.inc ' ;
57
@@ -219,6 +221,7 @@ function get_eol_branches($always_include = null) {
219221 * MAJOR.MINOR.REVISION (the REVISION will be ignored if provided). This will
220222 * return either null (if no release exists on the given branch), or the usual
221223 * version metadata from $RELEASES for a single release. */
224+ #[Deprecated('Use Branches::getInitialRelease ' )]
222225function get_initial_release ($ branch ) {
223226 $ branch = version_number_to_branch ($ branch );
224227 if (!$ branch ) {
@@ -247,6 +250,7 @@ function get_initial_release($branch) {
247250 return null ;
248251}
249252
253+ #[Deprecated('Use Branches::getFinalRelease ' )]
250254function get_final_release ($ branch ) {
251255 $ branch = version_number_to_branch ($ branch );
252256 if (!$ branch ) {
@@ -418,7 +422,7 @@ function get_current_release_for_branch(int $major, ?int $minor): ?string {
418422
419423// Get latest release version and info.
420424function release_get_latest () {
421- global $ RELEASES ;
425+ $ RELEASES = Branches:: getReleaseData () ;
422426
423427 $ version = '0.0.0 ' ;
424428 $ current = null ;
@@ -436,7 +440,7 @@ function release_get_latest() {
436440
437441function show_source_releases ()
438442{
439- global $ RELEASES ;
443+ $ RELEASES = Branches:: getReleaseData () ;
440444
441445 $ SHOW_COUNT = 4 ;
442446
0 commit comments