Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15340181
D11264.id27063.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
718 B
Referenced Files
None
Subscribers
None
D11264.id27063.diff
View Options
diff --git a/src/lint/linter/ArcanistPhpLinter.php b/src/lint/linter/ArcanistPhpLinter.php
--- a/src/lint/linter/ArcanistPhpLinter.php
+++ b/src/lint/linter/ArcanistPhpLinter.php
@@ -39,15 +39,11 @@
}
public function getVersion() {
- list($stdout) = execx('%C --version', $this->getExecutableCommand());
-
- $matches = array();
- $regex = '/^PHP (?P<version>\d+\.\d+\.\d+)\b/';
- if (preg_match($regex, $stdout, $matches)) {
- return $matches['version'];
- } else {
- return false;
- }
+ list($stdout) = execx(
+ '%C --run %s',
+ $this->getExecutableCommand(),
+ 'echo phpversion();');
+ return $stdout;
}
public function shouldExpectCommandErrors() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 10, 2:59 PM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7450930
Default Alt Text
D11264.id27063.diff (718 B)
Attached To
Mode
D11264: Simplify version parsing for `ArcanistPhpLinter`
Attached
Detach File
Event Timeline
Log In to Comment