diff --git a/CHANGELOG.md b/CHANGELOG.md index 937b1b10e..b83ef303b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Next +- Fixes [#1725](https://github.com/Glavin001/atom-beautify/issues/1725). Fix version parsing of PHP executable - Fixes [#1730](https://github.com/Glavin001/atom-beautify/issues/1730). Correctly parse PHPCBF version and improve handling of Executable - ... diff --git a/src/beautifiers/php-cs-fixer.coffee b/src/beautifiers/php-cs-fixer.coffee index b87963e36..c9b728d4c 100644 --- a/src/beautifiers/php-cs-fixer.coffee +++ b/src/beautifiers/php-cs-fixer.coffee @@ -17,7 +17,7 @@ module.exports = class PHPCSFixer extends Beautifier homepage: "http://php.net/" installation: "http://php.net/manual/en/install.php" version: { - parse: (text) -> text.match(/PHP (.*) \(cli\)/)[1] + parse: (text) -> text.match(/PHP (\d+\.\d+\.\d+)/)[1] } } { diff --git a/src/beautifiers/phpcbf.coffee b/src/beautifiers/phpcbf.coffee index 4d2bb8334..21a721fe2 100644 --- a/src/beautifiers/phpcbf.coffee +++ b/src/beautifiers/phpcbf.coffee @@ -15,7 +15,7 @@ module.exports = class PHPCBF extends Beautifier homepage: "http://php.net/" installation: "http://php.net/manual/en/install.php" version: { - parse: (text) -> text.match(/PHP (.*) \(cli\)/)[1] + parse: (text) -> text.match(/PHP (\d+\.\d+\.\d+)/)[1] } } {