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:
  [VarDumper] Dumping DateTime throws error if getTimezone is false
  Only update autoload_runtime.php when it changed
  [Intl] Update the ICU data to 73.2
  [HttpClient] Force int conversion for floated multiplier for GenericRetryStrategy
  [Validator][Translator] Fix xlf files for en & fr translations. Bug introduced by #50590
  Add missing EN and FR translations for newest constraints
  • Loading branch information
nicolas-grekas committed Jun 20, 2023
2 parents 8692d29 + 03e9c5d commit 2b53e6e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Internal/ComposerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ public function updateAutoloadFile(): void
'%runtime_options%' => '['.substr(var_export($extra, true), 7, -1)." 'project_dir' => {$projectDir},\n]",
]);

file_put_contents(substr_replace($autoloadFile, '_runtime', -4, 0), $code);
// could use Composer\Util\Filesystem::filePutContentsIfModified once Composer 1.x support is dropped for this plugin
$path = substr_replace($autoloadFile, '_runtime', -4, 0);
$currentContent = @file_exists($path) ? @file_get_contents($path) : false;
if (false === $currentContent || $currentContent !== $code) {
file_put_contents($path, $code);
}
}

public static function getSubscribedEvents(): array
Expand Down

0 comments on commit 2b53e6e

Please sign in to comment.