diff --git a/composer.json b/composer.json index 52ad2371..0edaedf5 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ "php": ">=5.4.0", "illuminate/console": "5.*|^6.0|^7.0|^8.0", "illuminate/support": "5.*|^6.0|^7.0|^8.0", - "symfony/finder": "*" + "symfony/finder": "*", + "symfony/var-exporter": "*" }, "autoload": { "psr-4": { diff --git a/src/Manager.php b/src/Manager.php index 61f035eb..cbe6bc06 100644 --- a/src/Manager.php +++ b/src/Manager.php @@ -9,6 +9,7 @@ use Illuminate\Support\Facades\File; use Symfony\Component\Finder\Finder; use Illuminate\Support\Arr; +use Symfony\Component\VarExporter\VarExporter; class Manager { @@ -160,7 +161,7 @@ public function exportTranslations($group) ksort($translations); $path = $this->app->langPath() . '/' . $locale . '/' . $group . '.php'; - $output = "files->put($path, preg_replace("/ \R/", "\n", $output)); // get rid of trailing spaces before line breaks and store in file }