sirbrillig / phpcs-changed

🐘 Run phpcs on files and only report new warnings/errors compared to the previous version.
MIT License
31 stars 11 forks source link

Remove shell execute and validate executable commands #84

Closed sirbrillig closed 1 year ago

sirbrillig commented 1 year ago

This removes the executeCommand and validateExecutableExists functions from ShellOperator, instead making them implementation details of the shell. This will allow for more diverse shells since these functions both assumed a UNIX-like environment.

In their place, this PR adds two new functions to ShellOperator: getPhpcsVersion which is needed by the XmlReporter, and validateShellIsReady which can be used as a general function to perform any necessary validation.

This is part of https://github.com/sirbrillig/phpcs-changed/issues/73