diff --git a/Provider/AdminMenuProvider.php b/Provider/AdminMenuProvider.php
index <HASH>..<HASH> 100755
--- a/Provider/AdminMenuProvider.php
+++ b/Provider/AdminMenuProvider.php
@@ -100,12 +100,8 @@ class AdminMenuProvider
     {
         $file    = $this->kernel->getCacheDir() . '/' . self::CACHE_FILENAME;
         $content = sprintf('<?php return %s;', var_export($menu, true));
-        $tmpFile = tempnam(dirname($file), basename($file));
-        if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) {
-            @chmod($file, 0666 & ~umask());
-
-            return;
-        }
+        $fs      = new Filesystem();
+        $fs->dumpFile($file, $content);
     }
 
     /**
@@ -124,5 +120,4 @@ class AdminMenuProvider
 
         return $children;
     }
-
 }
Changed cache dump method in admin menu provider

(cherry picked from commit 9b<I>e<I>ac<I>fe<I>d1bfee<I>a7a7f<I>c<I>)