JMSSerializerBundle
JMSSerializerBundle copied to clipboard
Error while unlink cache file
'message': 'Warning: unlink(/var/www/verivication/testing/var/cache/dev/jms_serializer/Doctrine-Common-Collections-AbstractLazyCollection.cache.php): No such file or directory', 'class': 'ErrorException', 'trace': [{'namespace': '', 'short_class': '', 'class': '', 'type': '', 'function': '', 'file': '/var/www/verivication/testing/vendor/jms/metadata/src/Metadata/Cache/FileCache.php', 'line': 80,
I think the problem in concurrent requests:
/** * {@inheritDoc} */ public function evictClassMetadataFromCache(\ReflectionClass $class) { $path = $this->dir.'/'.strtr($class->name, '\\', '-').'.cache.php'; if (file_exists($path)) { unlink($path); } } }
When first thread unlinks file, second will throw an error.
it looks we need something as https://github.com/schmittjoh/serializer/blob/a07ee590f64a4c8b156acc95b0cc33fa63a688b7/src/SerializerBuilder.php#L529 even there. PR are welcome.
The issue is in https://github.com/schmittjoh/metadata