[php-src] PR #24576: standard: Name the missing path in rename() ENOENT warnings

From: Date: Thu, 22 Oct 2026 19:58:33 +0000
Subject: [php-src] PR #24576: standard: Name the missing path in rename() ENOENT warnings
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-39738@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24576 Author: mvanhorn ## Summary When rename() fails because a path does not exist, PHP prints the same No such file or directory warning whether the source or the destination directory is missing. The warning now says which side is missing. Related: https://github.com/php/php-src/issues/8597 ## Changes - After a failed rename() with ENOENT, the plain file wrapper checks the source path, then the destination directory, and names the missing one in the warning. - NEWS and UPGRADING entries. ## Testing ``` ./buildconf && ./configure --disable-all --enable-cli --enable-debug && make -j4 make test TESTS="ext/standard/tests/file/gh8597.phpt ext/standard/tests/file/rename*.phpt" ``` All non-Windows rename*.phpt tests pass, including the new gh8597.phpt. Before: ``` Warning: rename(): No such file or directory in Command line code on line 1 ``` After: ``` Warning: rename(): No such file or directory (source "/tmp/ren-demo/no-such-src.txt") in Command line code on line 1 Warning: rename(): No such file or directory (destination directory "/tmp/ren-demo/no-such-dir") in Command line code on line 1 ```

« previous php.git-pulls (#39738) next »