<?php
$cwd = getcwd();
$file = 'app/etc/di.xml';
if (!($content = file_get_contents($file)))
return false;
$content = str_replace('MaterializationStrategy\Symlink', 'MaterializationStrategy\Copy', $content);
file_put_contents($file, $content);
exit(0);
$res = `find pub/static -type l`;
$arr = explode("\n", $res);
foreach ($arr as $file) {
if (!$file) continue;
if (!($link = readlink($file)))
continue;
$link = preg_replace("|^$cwd|", '.', $link);
$slashes = substr_count($file, '/');
$link = str_repeat('../', $slashes) . $link;
unlink($file);
symlink($link, $file);
}