Skip to content

Commit

Permalink
Merge branch '5.4' into 6.2
Browse files Browse the repository at this point in the history
* 5.4:
  [PhpUnitBridge] Kill the last concurrent process when it stales for more than 60s
  [Intl] fix test
  [Intl] Use VarExporter::export() in PhpBundleWriter
  Use triggering class to generate baseline for deprecation messages from DebugClassLoader
  [Security] Fix false-string handling in RememberMeAuthenticator
  [CssSelector] Tests on Xpath translator will always pass
  [Serializer] Fix Normalizer not utilizing converted name for index variadic param
  [DepdencyInjection] Fix costly logic when checking errored definitions
  fix children cond
  [DoctrineBridge] Load refreshed user proxy
  [DependencyInjection] Don't ignore attributes on the actual decorator
  [FrameworkBundle] Prevent `cache:clear` to lose files on subsequent runs
  • Loading branch information
nicolas-grekas committed Jul 12, 2023
2 parents 99753f0 + 386c948 commit 357592e
Show file tree
Hide file tree
Showing 516 changed files with 58,194 additions and 58,346 deletions.
12 changes: 3 additions & 9 deletions Data/Bundle/Writer/PhpBundleWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Component\Intl\Data\Bundle\Writer;

use Symfony\Component\VarExporter\VarExporter;

/**
* Writes .php resource bundles.
*
Expand Down Expand Up @@ -39,14 +41,6 @@ public function write(string $path, string $locale, mixed $data)
}
});

$data = var_export($data, true);
$data = preg_replace('/array \(/', '[', $data);
$data = preg_replace('/\n {1,10}\[/', '[', $data);
$data = preg_replace('/ /', ' ', $data);
$data = preg_replace('/\),$/m', '],', $data);
$data = preg_replace('/\)$/', ']', $data);
$data = sprintf($template, $data);

file_put_contents($path.'/'.$locale.'.php', $data);
file_put_contents($path.'/'.$locale.'.php', sprintf($template, VarExporter::export($data)));
}
}
Loading

0 comments on commit 357592e

Please sign in to comment.