Open andronocean opened 1 year ago
Hi @andronocean, I apologize for the delay, but I'm glad to hear you've found SatisPress useful!
There haven't been any other reports, but I appreciate you opening this just in case. Would the fix involve using copy/unlink
instead of rename
? If you'd like to submit a PR, I can get that merged to get rid of that debug pollution.
Hi, and first of all thank you so much for creating satispress — this project has been an absolute lifesaver!
This issue is a very low priority, since nothing actually breaks. The warning gets emitted on this
rename()
call when archiving a new plugin release:https://github.com/cedaro/satispress/blob/aca49486c7f5e1a35b9c9184392c3ab1297e8efc/src/Storage/Local.php#L134
Here's an example of the warning from debug.log. This seems to appear any time a new release for a watched plugin (here, for example, Gutenberg) is being archived:
The rename/move does work, however, since the zip in /tmp/satispress is deleted and reappears at the /srv/www... location. Permissions look fine. So everything functions — but warnings appear in WP debug.log occasionally.
I've only seen this warning on my local dev environment, never in production. For local dev I'm running Trellis on a Mac, with Vagrant on Virtualbox as the VM provider, so mounted filesystems are involved between the Linux VM and my Mac. Specifically
/tmp/
and/srv/www/example.test/current/
are on different filesystems. This is almost certainly the root cause of the warning.Hence I'm pretty sure this is related to the cross-filesystem
rename()
behavior described in this comment: https://www.php.net/manual/en/function.rename.php#117590.Again, low-priority, and I can submit a fix PR if you like. Mostly I just wanted to document this in case anyone else comes across the same situation, or something similar.