Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cl_components
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
cl_components
Merge requests
!2
Issue
#3269673
: Warning after clearing caches
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3269673
: Warning after clearing caches
issue/cl_components-3269673:3269673-warning-after-clearing
into
1.x
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Mateu Aguiló Bosch
requested to merge
issue/cl_components-3269673:3269673-warning-after-clearing
into
1.x
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
1.x
version 2
8ce7ac93
3 years ago
version 1
8ce7ac93
3 years ago
1.x (base)
and
latest version
latest version
8ce7ac93
1 commit,
3 years ago
version 2
8ce7ac93
1 commit,
3 years ago
version 1
8ce7ac93
1 commit,
3 years ago
1 file
+
6
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Component/ComponentDiscovery.php
+
6
−
1
Options
@@ -323,8 +323,13 @@ class ComponentDiscovery {
private
function
discoverDistAssets
(
string
$path
):
array
{
$extensions
=
[
'css'
,
'js'
];
$app_root
=
\Drupal
::
getContainer
()
->
getParameter
(
'app.root'
);
$dirname
=
substr
(
dirname
(
__DIR__
),
strlen
(
$app_root
)
+
1
);
$dirname
=
substr
(
dirname
(
__DIR__
,
2
),
strlen
(
$app_root
)
+
1
);
$num
=
count
(
explode
(
DIRECTORY_SEPARATOR
,
$dirname
));
// CL Components is the module owning the library definition. However, the
// actual files live wherever the component is. We need to calculate the
// relative route to the files starting from CL Component, since drupal
// assumes paths for files in libraries are relative to the module owning
// the library.
$dots
=
implode
(
DIRECTORY_SEPARATOR
,
array_fill
(
0
,
$num
,
'..'
));
return
array_reduce
(
$extensions
,
function
(
array
$carry
,
string
$extension
)
use
(
$dots
,
$path
)
{
$full_path
=
sprintf
(
'%s/%s'
,
$path
,
$extension
);
Loading