1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 22:26:46 +02:00

feat(cache): use built-in serializer for phparrays instead of vardumper

This commit is contained in:
Awilum
2021-09-28 09:24:01 +03:00
parent 20a55c7e86
commit b1b027be88

View File

@@ -98,7 +98,7 @@ class Driver implements ExtendedCacheItemPoolInterface, AggregatablePoolInterfac
* Force write
*/
try {
return $this->writefile($file_path, "<?php\n" . "return " . var_export($data, true) . ";\n", $this->getConfig()->isSecureFileManipulation());
return $this->writefile($file_path, serializers()->phparray()->encode($data), $this->getConfig()->isSecureFileManipulation());
} catch (Exception $e) {
return false;
}