Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
automatic_updates-3449631
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
automatic_updates-3449631
Commits
fcf4aa59
Commit
fcf4aa59
authored
2 years ago
by
Kunal Sachdev
Committed by
Adam G-H
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3344556
by kunal.sachdev, phenaproxima: Make ComposerInspector::getVersion() private
parent
c52e9ab3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
package_manager/src/ComposerInspector.php
+1
-3
1 addition, 3 deletions
package_manager/src/ComposerInspector.php
package_manager/tests/src/Kernel/ComposerInspectorTest.php
+0
-14
0 additions, 14 deletions
package_manager/tests/src/Kernel/ComposerInspectorTest.php
with
1 addition
and
17 deletions
package_manager/src/ComposerInspector.php
+
1
−
3
View file @
fcf4aa59
...
@@ -229,10 +229,8 @@ class ComposerInspector {
...
@@ -229,10 +229,8 @@ class ComposerInspector {
*
*
* @throws \UnexpectedValueException
* @throws \UnexpectedValueException
* Thrown if the expect data format is not found.
* Thrown if the expect data format is not found.
*
* @todo Make this method private in https://drupal.org/i/3344556.
*/
*/
p
ublic
function
getVersion
(
string
$working_dir
):
string
{
p
rivate
function
getVersion
(
string
$working_dir
):
string
{
$this
->
runner
->
run
([
'--format=json'
,
"--working-dir=
$working_dir
"
],
$this
->
jsonCallback
);
$this
->
runner
->
run
([
'--format=json'
,
"--working-dir=
$working_dir
"
],
$this
->
jsonCallback
);
$data
=
$this
->
jsonCallback
->
getOutputData
();
$data
=
$this
->
jsonCallback
->
getOutputData
();
if
(
isset
(
$data
[
'application'
][
'name'
])
if
(
isset
(
$data
[
'application'
][
'name'
])
...
...
This diff is collapsed.
Click to expand it.
package_manager/tests/src/Kernel/ComposerInspectorTest.php
+
0
−
14
View file @
fcf4aa59
...
@@ -59,20 +59,6 @@ class ComposerInspectorTest extends PackageManagerKernelTestBase {
...
@@ -59,20 +59,6 @@ class ComposerInspectorTest extends PackageManagerKernelTestBase {
$inspector
->
getConfig
(
'extra'
,
$dir
);
$inspector
->
getConfig
(
'extra'
,
$dir
);
}
}
/**
* @covers ::getVersion
*/
public
function
testGetVersion
()
{
$dir
=
__DIR__
.
'/../../fixtures/fake_site'
;
$inspector
=
$this
->
container
->
get
(
'package_manager.composer_inspector'
);
$version
=
$inspector
->
getVersion
(
$dir
);
// We can assert an exact version of Composer, but we can assert that the
// number is in the expected 'MAJOR.MINOR.PATCH' format.
$parts
=
explode
(
'.'
,
$version
);
$this
->
assertCount
(
3
,
$parts
);
$this
->
assertCount
(
3
,
array_filter
(
$parts
,
'is_numeric'
));
}
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*/
*/
...
...
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