Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Utilize Nette\Utils\FileSystem instead of Symfony\Component\Filesystem\Filesystem to write file #5514

Merged
merged 10 commits into from
Jan 28, 2024

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Jan 28, 2024

The Nette\Utils\FileSystem::write() is using file_put_contents() instead of rename() which has bug on php itself, ref:

that used by symfony.

This should fix rectorphp/rector#8432

/cc @stein197

using null arg to keep file permission:

-        $this->filesystem->dumpFile($filePath, $newContent);
+        FileSystem::write($filePath, $newContent, null);

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I think it is ready.

@samsonasik
Copy link
Member Author

@TomasVotruba let's merge it to have faster feedback to test ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant