Closed okaufmann closed 4 years ago
When using laravel-browsershot, the temporary files won't be deleted. This because __sleep only gets called when the instance will be serialised (https://www.php.net/manual/en/language.oop5.magic.php#object.sleep).
__sleep
I think its better to use __destruct to remove temp files.
__destruct
I also find it useful to be able to set the temporary folder. So the created files can be cleaned up with a scheduled job.
For this I've added a new config variable.
Hope you like it 😄
When using laravel-browsershot, the temporary files won't be deleted. This because
__sleep
only gets called when the instance will be serialised (https://www.php.net/manual/en/language.oop5.magic.php#object.sleep).I think its better to use
__destruct
to remove temp files.I also find it useful to be able to set the temporary folder. So the created files can be cleaned up with a scheduled job.
For this I've added a new config variable.
Hope you like it 😄