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
!685
Issue
#3338667
: [
PP-1
] Add build test to test cweaganscomposer-patches end-to-end
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#3338667
: [
PP-1
] Add build test to test cweaganscomposer-patches end-to-end
issue/automatic_updates-3338667:3338667-pp-1-add-build
into
8.x-2.x
Overview
0
Commits
74
Pipelines
0
Changes
4
Open
Wim Leers
requested to merge
issue/automatic_updates-3338667:3338667-pp-1-add-build
into
8.x-2.x
2 years ago
Overview
0
Commits
74
Pipelines
0
Changes
4
Expand
0
0
Merge request reports
Viewing commit
07c1435b
Prev
Next
Show latest version
4 files
+
156
−
63
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
07c1435b
Issue
#3345763
: UnknownPathExcluder should use ComposerInspector instead of ComposerUtility
· 07c1435b
Kunal Sachdev
authored
2 years ago
package_manager/src/PathExcluder/GitExcluder.php
+
14
−
1
Options
@@ -47,13 +47,26 @@ final class GitExcluder implements EventSubscriberInterface {
*
* @param \Drupal\package_manager\Event\CollectIgnoredPathsEvent $event
* The event object.
*
* @throws \Exception
* See \Drupal\package_manager\ComposerInspector::validate().
*/
public
function
excludeGitDirectories
(
CollectIgnoredPathsEvent
$event
):
void
{
$project_root
=
$this
->
pathLocator
->
getProjectRoot
();
// To determine which .git directories to exclude, the installed packages
// must be known, and that requires Composer commands to be able to run.
// This intentionally does not catch exceptions: failed Composer validation
// in the project root implies that this excluder cannot function correctly.
// Note: the call to ComposerInspector::getInstalledPackagesList() would
// also have triggered this, but explicitness is preferred here.
// @see \Drupal\package_manager\StatusCheckTrait::runStatusCheck()
$this
->
composerInspector
->
validate
(
$project_root
);
$paths_to_exclude
=
[];
$installed_paths
=
[];
// Collect the paths of every installed package.
$project_root
=
$this
->
pathLocator
->
getProjectRoot
();
$installed_packages
=
$this
->
composerInspector
->
getInstalledPackagesList
(
$project_root
);
foreach
(
$installed_packages
as
$package
)
{
if
(
!
empty
(
$package
->
path
))
{
Loading