PrettierPHPFixer - Use output of exec directly instead of writing temporary file#1483
Merged
czosel merged 1 commit intoprettier:masterfrom Jul 17, 2020
grubersjoe:simplify-prettier-php-fixer
Merged
PrettierPHPFixer - Use output of exec directly instead of writing temporary file#1483czosel merged 1 commit intoprettier:masterfrom grubersjoe:simplify-prettier-php-fixer
czosel merged 1 commit intoprettier:masterfrom
grubersjoe:simplify-prettier-php-fixer
Conversation
Collaborator
|
Looks great on a first glance 👍 I don't have experience with PHPfixer though, so i'll cc @Billz95 again 🙂 |
Billz95
reviewed
Jul 14, 2020
Contributor
Billz95
left a comment
There was a problem hiding this comment.
Other than a nitpicking detail of using PHP_EOL the rest lgtm. 👍
Billz95
approved these changes
Jul 16, 2020
Collaborator
|
Thanks @grubersjoe & @Billz95 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey,
Instead of writing a temporary file, Prettier's output can be processed directly if the second parameter of
execis set. This simplifies the fixer and should make it a bit more efficient.I've tested this with a Symfony codebase with around 950 files and everything seemed fine. On my machine with a SSD the change had little impact on performance, but if an HDD is used, it might.
What do you think?