stevebauman/purify

Throws error during package discovery if storage folder doesn't exist

Closed this issue · 2 comments

I'm currently hitting an issue where Purify throws the following error during package discovery on a fresh composer install of my project:

  mkdir(): No such file or directory

It's trying to create the folder {projectroot}/storage/purify, but failing because {projectroot}/storage doesn't exist at that point. As background, I symlink in the storage folder as part of my deployment process, so there is no storage folder in my project's repository at all.

While I realise that might make my setup a little non-standard, Purify is the only package that fails under this setup. I can work around this on my side, however it seems like it might be best resolved in Purify (especially since it looks like you're doing that filesystem check every time Purify is instantiated (e.g. on every page load if every page uses Purify)?

Hey @leewillis77, going to resolve this, thanks for the report!

Much delayed - but I just patched this. Purify will now defer loading and will not check and create the storage directory. This is handled by HTMLPurifier.

Thanks!