wp-cli / wp-config-transformer

Programmatically edit a wp-config.php file
MIT License
80 stars 25 forks source link

Normalize the newline to prevent an issue coming from OSX #14

Closed andreamk closed 5 years ago

andreamk commented 5 years ago

I updated the pull request. Now it can be merged

Please tell me if there's anything else

schlessera commented 5 years ago

Oh, I wasn't aware we were still testing for PHP 5.3 in this library. I'll discuss with @fjarrett whether we should maybe drop that.

I'll merge this with the old array syntax for now.

Thanks for the PR, @andreamk!

frankiejarrett commented 5 years ago

@andreamk What exactly was the issue being fixed here? All of my wp-config.php files are now double-spaced after running set commands...

schlessera commented 5 years ago

@fjarrett Double-spaced as in "an extra newline in-between lines of code"? The change above should actually do the opposite...

schlessera commented 5 years ago

@fjarrett What system are you running this on? On my Mac, set still works as expected, and tests in Travis are passing as well...

andreamk commented 5 years ago

Sorry for the delay in replying this fix does not add double spaces but solves the problem with files edited with some editors on OSX.

I'm part of the staff that develops the Duplicator plugin and to find this problem we went crazy. This change was tested and we found no problems.

Andrea