Skip to content

Commit 6c89cd0

Browse files
committed
Replacing __conposer_autoload global in scoper-autoload.php as well
1 parent 1442339 commit 6c89cd0

File tree

3 files changed

+106
-1
lines changed

3 files changed

+106
-1
lines changed

gulpfile.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import gulp from 'gulp';
66
import cleanCSS from 'gulp-clean-css';
77
import inject from 'gulp-inject-string';
88
import rename from 'gulp-rename';
9+
import replace from 'gulp-replace';
910
import shell from 'gulp-shell';
1011
import named from 'vinyl-named';
1112
import webpack from 'webpack-stream';
@@ -32,7 +33,17 @@ gulp.task('build:css', gulp.parallel('build:css:admin', 'build:css:frontend'));
3233

3334
gulp.task(
3435
'build:deps:composer:scoper',
35-
shell.task('vendor/bin/php-scoper add-prefix --force')
36+
gulp.series(shell.task('vendor/bin/php-scoper add-prefix --force'), () =>
37+
gulp
38+
.src(['dist/vendor/scoper-autoload.php'])
39+
.pipe(
40+
replace(
41+
"$GLOBALS['__composer_autoload_files']",
42+
"$GLOBALS['__composer_autoload_files_Sgdg_Vendor']"
43+
)
44+
)
45+
.pipe(gulp.dest('dist/vendor/'))
46+
)
3647
);
3748

3849
gulp.task(

package-lock.json

Lines changed: 93 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"gulp-clean-css": "^4.3.0",
7373
"gulp-inject-string": "^1.1.2",
7474
"gulp-rename": "^2.0.0",
75+
"gulp-replace": "^1.1.4",
7576
"gulp-shell": "^0.8.0",
7677
"npm-run-all": "^4.1.5",
7778
"prettier": "^3.2.5",

0 commit comments

Comments
 (0)