Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
automatic_updates
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
automatic_updates
Commits
da55f419
Commit
da55f419
authored
2 years ago
by
Ted Bowman
Browse files
Options
Downloads
Patches
Plain Diff
Revert: make getMostRecentReleaseInMinor() public
parent
c25c1660
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Form/UpdaterForm.php
+2
-3
2 additions, 3 deletions
src/Form/UpdaterForm.php
src/ReleaseChooser.php
+1
-1
1 addition, 1 deletion
src/ReleaseChooser.php
with
3 additions
and
4 deletions
src/Form/UpdaterForm.php
+
2
−
3
View file @
da55f419
...
...
@@ -151,14 +151,13 @@ final class UpdaterForm extends FormBase {
];
$project_info
=
new
ProjectInfo
(
'drupal'
);
$installed_version
=
ExtensionVersion
::
createFromVersionString
(
$project_info
->
getInstalledVersion
());
try
{
// @todo Until https://www.drupal.org/i/3264849 is fixed, we can only show
// one release on the form. First, try to show the latest release in the
// currently installed minor. Failing that, try to show the latest
// release in the next minor.
$installed_minor_release
=
$this
->
releaseChooser
->
get
MostRecentReleaseIn
Minor
(
$this
->
updater
,
$project_info
->
getInstalledVersion
()
);
$next_minor_release
=
$this
->
releaseChooser
->
get
MostRecentReleaseIn
Minor
(
$this
->
updater
,
$installed_version
->
getMajorVersion
()
.
'.'
.
(((
int
)
$installed_version
->
getMinorVersion
())
+
1
)
.
'.0'
);
$installed_minor_release
=
$this
->
releaseChooser
->
get
LatestInInstalled
Minor
(
$this
->
updater
);
$next_minor_release
=
$this
->
releaseChooser
->
get
LatestInNext
Minor
(
$this
->
updater
);
}
catch
(
\RuntimeException
$e
)
{
$form
[
'message'
]
=
[
...
...
This diff is collapsed.
Click to expand it.
src/ReleaseChooser.php
+
1
−
1
View file @
da55f419
...
...
@@ -74,7 +74,7 @@ class ReleaseChooser {
* @throws \InvalidArgumentException
* If the given semantic version number does not contain a patch version.
*/
p
ublic
function
getMostRecentReleaseInMinor
(
Updater
$updater
,
string
$version
):
?ProjectRelease
{
p
rotected
function
getMostRecentReleaseInMinor
(
Updater
$updater
,
string
$version
):
?ProjectRelease
{
if
(
static
::
getPatchVersion
(
$version
)
===
NULL
)
{
throw
new
\InvalidArgumentException
(
"The version number
$version
does not contain a patch version"
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment