$uploads =
array_keys(array_diff_assoc($localManifest,
$remoteManifest));
// diff the opposite way to find files which are present remote, but not locally.
// we use array_diff_key because we don't care about the hash, just the file names
$removes =
array_keys(array_diff_key($remoteManifest,
$localManifest));
foreach ($removes as $file) { $this->filesystem->
delete($targetDirectory . '/' .
$file);
} foreach ($uploads as $file) { $this->
copyFile($originDir . '/' .
$file,
$targetDirectory . '/' .
$file);
} } /**
* @throws PluginNotFoundException
*/
private function getBundle(string
$bundleName): BundleInterface
{ try { $bundle =
$this->kernel->
getBundle($bundleName);
} catch (\InvalidArgumentException
) {