mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 05:53:13 +00:00
36 lines
866 B
PHP
36 lines
866 B
PHP
<?php
|
|
|
|
namespace Alchemy\Phrasea;
|
|
|
|
use Symfony\Component\Filesystem\Filesystem;
|
|
|
|
class ComposerScripts
|
|
{
|
|
public static function postUpdate()
|
|
{
|
|
static::overwriteMinifyGroupsConfig();
|
|
}
|
|
|
|
public static function postInstall()
|
|
{
|
|
static::overwriteMinifyGroupsConfig();
|
|
}
|
|
|
|
private static function overwriteMinifyGroupsConfig()
|
|
{
|
|
$filesystem = new Filesystem();
|
|
|
|
$source = __DIR__ . '/../../conf.d/groupsConfig.php';
|
|
$target = __DIR__ . '/../../../vendor/mrclay/minify/min/groupsConfig.php';
|
|
|
|
$filesystem->remove($target);
|
|
$filesystem->copy($source, $target);
|
|
|
|
$source = __DIR__ . '/../../conf.d/config.php';
|
|
$target = __DIR__ . '/../../../vendor/mrclay/minify/min/config.php';
|
|
|
|
$filesystem->remove($target);
|
|
$filesystem->copy($source, $target);
|
|
}
|
|
}
|