From 6db34cd9d88ac7f782348028a0a938b6b23a6b69 Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Tue, 20 Jun 2017 00:20:44 -0300 Subject: [PATCH] Fixes #1725. Fix version parsing of PHP executable See https://github.com/Glavin001/atom-beautify/issues/1725#issuecomment-309379935 --- CHANGELOG.md | 1 + src/beautifiers/php-cs-fixer.coffee | 2 +- src/beautifiers/phpcbf.coffee | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 937b1b1..b83ef30 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 b87963e..c9b728d 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 4d2bb83..21a721f 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] } } {