Created
May 21, 2024 18:22
-
-
Save donquixote/cb8b39d06a2e4d06adbc221968019c65 to your computer and use it in GitHub Desktop.
resolve-composer-lock.php
This file contains hidden or 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
#!/usr/bin/php | |
<?php | |
if (!is_file('composer.lock')) { | |
print "File 'composer.lock' not found.\n"; | |
exit(1); | |
} | |
$orig = file_get_contents('composer.lock'); | |
$cleaned = preg_replace( | |
…} | |
print "Trivial merge conflicts removed in 'composer.lock'. Writing to composer.lock. Please run composer update --lock!\n"; | |
file_put_contents('composer.lock', $cleaned); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment