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
Merge requests
!214
Issue
#3248929
: List update that will be applied on the UpdateReady form
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3248929
: List update that will be applied on the UpdateReady form
issue/automatic_updates-3248929:3248929-list-update-that
into
8.x-2.x
Overview
32
Commits
21
Pipelines
0
Changes
5
Merged
Kunal Sachdev
requested to merge
issue/automatic_updates-3248929:3248929-list-update-that
into
8.x-2.x
3 years ago
Overview
11
Commits
21
Pipelines
0
Changes
5
Expand
0
0
Merge request reports
Compare
8.x-2.x
version 17
50a71c67
3 years ago
version 16
ebb0ed81
3 years ago
version 15
a7805fcd
3 years ago
version 14
f82271de
3 years ago
version 13
a8cae336
3 years ago
version 12
71d50203
3 years ago
version 11
b9bb3de8
3 years ago
version 10
ee1bf9f8
3 years ago
version 9
30f9b9a0
3 years ago
version 8
9606b4d2
3 years ago
version 7
1c526f5a
3 years ago
version 6
0120cf93
3 years ago
version 5
fadef164
3 years ago
version 4
39abfa3d
3 years ago
version 3
ff63ac8b
3 years ago
version 2
00c35126
3 years ago
version 1
3086820d
3 years ago
8.x-2.x (base)
and
version 2
latest version
50a71c67
21 commits,
3 years ago
version 17
50a71c67
21 commits,
3 years ago
version 16
ebb0ed81
20 commits,
3 years ago
version 15
a7805fcd
19 commits,
3 years ago
version 14
f82271de
18 commits,
3 years ago
version 13
a8cae336
17 commits,
3 years ago
version 12
71d50203
15 commits,
3 years ago
version 11
b9bb3de8
14 commits,
3 years ago
version 10
ee1bf9f8
12 commits,
3 years ago
version 9
30f9b9a0
11 commits,
3 years ago
version 8
9606b4d2
10 commits,
3 years ago
version 7
1c526f5a
9 commits,
3 years ago
version 6
0120cf93
8 commits,
3 years ago
version 5
fadef164
7 commits,
3 years ago
version 4
39abfa3d
6 commits,
3 years ago
version 3
ff63ac8b
5 commits,
3 years ago
version 2
00c35126
2 commits,
3 years ago
version 1
3086820d
1 commit,
3 years ago
5 files
+
75
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
package_manager/tests/modules/package_manager_bypass/src/Stager.php
+
39
−
0
Options
@@ -4,17 +4,56 @@ namespace Drupal\package_manager_bypass;
use
PhpTuf\ComposerStager\Domain\Process\OutputCallbackInterface
;
use
PhpTuf\ComposerStager\Domain\StagerInterface
;
use
Symfony\Component\Filesystem\Filesystem
;
/**
* Defines an update stager which doesn't actually do anything.
*/
class
Stager
extends
InvocationRecorderBase
implements
StagerInterface
{
/**
* The fixtures state key.
*
* @var string
*/
protected
const
FIXTURES_STATE_KEY
=
'package_manager_bypass_stager_fixtures_path'
;
/**
* The fixtures state key.
*
* @var string
*/
protected
const
DIRECTORIES_CREATED_STATE_KEY
=
'package_manager_bypass_stager_directories_created'
;
/**
* {@inheritdoc}
*/
public
function
stage
(
array
$composerCommand
,
string
$stagingDir
,
?OutputCallbackInterface
$callback
=
NULL
,
?int
$timeout
=
120
):
void
{
$fixturesDirectoryPath
=
\Drupal
::
state
()
->
get
(
static
::
FIXTURES_STATE_KEY
);
if
(
$fixturesDirectoryPath
)
{
if
(
!
file_exists
(
$stagingDir
))
{
mkdir
(
$stagingDir
);
$directories_created
=
\Drupal
::
state
()
->
get
(
static
::
DIRECTORIES_CREATED_STATE_KEY
,
[]);
$directories_created
[]
=
$stagingDir
;
\Drupal
::
state
()
->
set
(
static
::
DIRECTORIES_CREATED_STATE_KEY
,
$directories_created
);
}
$fileSystem
=
new
Filesystem
();
$fileSystem
->
mirror
(
$fixturesDirectoryPath
,
$stagingDir
);
}
$this
->
saveInvocationArguments
(
$composerCommand
,
$stagingDir
);
}
/**
* @param string $activeDir
* @param string $stagingDir
*/
public
function
setTestFixtureDirectory
(
string
$fixturesDirectoryPath
):
void
{
\Drupal
::
state
()
->
set
(
static
::
FIXTURES_STATE_KEY
,
$fixturesDirectoryPath
);
}
public
function
deleteStagedDirectories
():
void
{
$directories_created
=
\Drupal
::
state
()
->
get
(
static
::
DIRECTORIES_CREATED_STATE_KEY
);
$fileSystem
=
new
Filesystem
();
$fileSystem
->
remove
(
$directories_created
);
}
}
Loading