Skip to content

Branch api extraction#1931

Open
markrandall wants to merge 17 commits into
php:previewfrom
markrandall:branch-api-extraction
Open

Branch api extraction#1931
markrandall wants to merge 17 commits into
php:previewfrom
markrandall:branch-api-extraction

Conversation

@markrandall

Copy link
Copy Markdown

Attempts to eliminate the dependence on the $RELEASES, $OLDRELEASES, and $BRANCHES global variables that require injecting in at the top level scope to avoid breaking things.

Changes:

  • releases.inc and versions.inc now return their values, as well as retaining the previous global-scope, allowing the new helper to reliably access their contents by requiring them again, and using the return value.
  • Updated bumpRelease to retain returning logic.
  • Added extra normalization to the data returned from the two data sources.
  • Updated everywhere I could find outside of branches.inc that used those old helpers.
  • Wrote unit tests for the new helpers.

Included:

  • Removes requirements to annotate unit tests with code coverage

Comment thread include/branches.inc
}

function get_active_branches($include_recent_eols = true) {
#[DEprecated('Use Branches::active()')]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[DEprecated('Use Branches::active()')]
#[Deprecated('Use Branches::active()')]

Comment thread src/Releases/Branches.php
*
* @return NormalizedReleaseStruct|null
*/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants