forked from buddyboss/buddyboss-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PROD-7875 Prefix composer static files hash for php scoper compatibil…
…ity with composer static files
- Loading branch information
1 parent
6cd17a2
commit 000638b
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
$files = array( | ||
'vendor/composer/autoload_static.php', | ||
'vendor/composer/autoload_files.php', | ||
); | ||
|
||
foreach( $files as $file ) { | ||
if ( file_exists( $file ) ) { | ||
$contents = file_get_contents( $file ); | ||
$contents = preg_replace_callback( | ||
'/\'([a-f0-9]{32})\'\s*=>/', | ||
function( $matches ) { | ||
return "'bb_platform_" . $matches[1] . "' =>"; | ||
}, | ||
$contents | ||
); | ||
file_put_contents( $file, $contents ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters