Update PHP compatibility information.

Summary: Ref T5141. Generated using PHP v5.5.12 and PHP_CompatInfo v2.26.0.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5141

Differential Revision: https://secure.phabricator.com/D9236
Fix XHPAST to detect use of undeclared variables in `catch`

Summary:
Currently, when code has a block like:

  } catch (Exception $ex) {

...we attempt to mark "$ex" as declared. However, we incorrectly mark every variable used anywhere in the block as declared. This means we'll never raise this warning in a `catch` block.

Instead //only// mark the caught exception as declared.

Test Plan: Added a failing unit test and made it pass.

Reviewers: joshuaspence, btrahan

Reviewed By: btrahan

Subscribers: lpriestley, epriestley

Differential Revision: https://secure.phabricator.com/D9239
Fix warning in `arc backout`

Summary: Fixes T5145. Neither variable is ever used.

Test Plan: Searched for uses of either variable.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5145

Differential Revision: https://secure.phabricator.com/D9244
Fix the wrong argument type being passed to `setFlags`.

Summary:
Currently, the `ComprehensiveLintEngine` fails to lint `*.py` files with the following exception:

```
> arc lint foo.py
[2014-05-22 01:17:12] ERROR 2: escapeshellarg() expects parameter 1 to be string, array given at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:87]
  #0 escapeshellarg(Array { 0 => --ignore=E101,E501,W291,W292,W293 })
  #1 array_map(escapeshellarg, Array { 0 => Array { 0 => --ignore=E101,E501,W291,W292,W293 } }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:87]
  #2 xsprintf_command(Array { unmasked => false }, %s %s, 4, Array { 0 => Array { 0 => --ignore=E101,E501,W291,W292,W293 } }, 5) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/xsprintf.php:63]
  #3 xsprintf(xsprintf_command, Array { unmasked => false }, Array of size 3 starting with: { 0 => %C %Ls }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:33]
  #4 PhutilCommandString::renderString(false) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:24]
  #5 PhutilCommandString::getMaskedString() called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:12]
  #6 PhutilCommandString::__construct(Array of size 3 starting with: { 0 => %C %Ls }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:34]
  #7 csprintf(%C %Ls, Object PhutilCommandString, Array { 0 => Array { 0 => --ignore=E101,E501,W291,W292,W293 } }) called at [/home/joshua/workspace/github.com/facebook/arcanist/src/lint/linter/ArcanistExternalLinter.php:400]
  #8 ArcanistExternalLinter::buildFutures(Array { 0 => foo.py }) called at [/home/joshua/workspace/github.com/facebook/arcanist/src/lint/linter/ArcanistFutureLinter.php:17]
  #9 ArcanistFutureLinter::willLintPaths(Array { 0 => foo.py }) called at [/home/joshua/workspace/github.com/facebook/arcanist/src/lint/engine/ArcanistLintEngine.php:297]
  #10 ArcanistLintEngine::run() called at [/home/joshua/workspace/github.com/facebook/arcanist/src/workflow/ArcanistLintWorkflow.php:336]
  #11 ArcanistLintWorkflow::run() called at [/home/joshua/workspace/github.com/facebook/arcanist/scripts/arcanist.php:322]
[2014-05-22 01:17:12] ERROR 2: escapeshellarg() expects parameter 1 to be string, array given at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:87]
  #0 escapeshellarg(Array { 0 => --ignore=E101,E501,W291,W292,W293 })
  #1 array_map(escapeshellarg, Array { 0 => Array { 0 => --ignore=E101,E501,W291,W292,W293 } }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:87]
  #2 xsprintf_command(Array { unmasked => false }, %s %s, 4, Array { 0 => Array { 0 => --ignore=E101,E501,W291,W292,W293 } }, 5) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/xsprintf.php:63]
  #3 xsprintf(xsprintf_command, Array { unmasked => false }, Array of size 3 starting with: { 0 => %C %Ls }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:33]
  #4 PhutilCommandString::renderString(false) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:24]
  #5 PhutilCommandString::getMaskedString() called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:65]
  #6 xsprintf_command(Array { unmasked => false }, %C %C, 1, Object PhutilCommandString, 5) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/xsprintf.php:63]
  #7 xsprintf(xsprintf_command, Array { unmasked => false }, Array of size 3 starting with: { 0 => %C %C }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:33]
  #8 PhutilCommandString::renderString(false) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:24]
  #9 PhutilCommandString::getMaskedString() called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:12]
  #10 PhutilCommandString::__construct(Array of size 3 starting with: { 0 => %C %C }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:34]
  #11 csprintf(%C %C, Object PhutilCommandString, Object PhutilCommandString)
  #12 call_user_func_array(csprintf, Array of size 3 starting with: { 0 => %C %C }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/future/exec/ExecFuture.php:72]
  #13 ExecFuture::__construct(%C %C, Object PhutilCommandString, Object PhutilCommandString) called at [/home/joshua/workspace/github.com/facebook/arcanist/src/lint/linter/ArcanistExternalLinter.php:414]
  #14 ArcanistExternalLinter::buildFutures(Array { 0 => foo.py }) called at [/home/joshua/workspace/github.com/facebook/arcanist/src/lint/linter/ArcanistFutureLinter.php:17]
  #15 ArcanistFutureLinter::willLintPaths(Array { 0 => foo.py }) called at [/home/joshua/workspace/github.com/facebook/arcanist/src/lint/engine/ArcanistLintEngine.php:297]
  #16 ArcanistLintEngine::run() called at [/home/joshua/workspace/github.com/facebook/arcanist/src/workflow/ArcanistLintWorkflow.php:336]
  #17 ArcanistLintWorkflow::run() called at [/home/joshua/workspace/github.com/facebook/arcanist/scripts/arcanist.php:322]
[2014-05-22 01:17:12] ERROR 2: escapeshellarg() expects parameter 1 to be string, array given at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:87]
  #0 escapeshellarg(Array { 0 => --ignore=E101,E501,W291,W292,W293 })
  #1 array_map(escapeshellarg, Array { 0 => Array { 0 => --ignore=E101,E501,W291,W292,W293 } }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:87]
  #2 xsprintf_command(Array { unmasked => false }, %s %s, 4, Array { 0 => Array { 0 => --ignore=E101,E501,W291,W292,W293 } }, 5) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/xsprintf.php:63]
  #3 xsprintf(xsprintf_command, Array { unmasked => false }, Array of size 3 starting with: { 0 => %C %Ls }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:33]
  #4 PhutilCommandString::renderString(false) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:24]
  #5 PhutilCommandString::getMaskedString() called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:65]
  #6 xsprintf_command(Array { unmasked => false }, %C %C, 1, Object PhutilCommandString, 5) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/xsprintf.php:63]
  #7 xsprintf(xsprintf_command, Array { unmasked => false }, Array of size 3 starting with: { 0 => %C %C }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:33]
  #8 PhutilCommandString::renderString(false) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:24]
  #9 PhutilCommandString::getMaskedString() called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:16]
  #10 PhutilCommandString::__toString() called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/future/exec/ExecFuture.php:611]
  #11 ExecFuture::isReady() called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/future/FutureIterator.php:322]
  #12 FutureIterator::updateWorkingSet() called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/future/FutureIterator.php:97]
  #13 FutureIterator::addFuture(Object ExecFuture, foo.py) called at [/home/joshua/workspace/github.com/facebook/arcanist/src/lint/linter/ArcanistFutureLinter.php:18]
  #14 ArcanistFutureLinter::willLintPaths(Array { 0 => foo.py }) called at [/home/joshua/workspace/github.com/facebook/arcanist/src/lint/engine/ArcanistLintEngine.php:297]
  #15 ArcanistLintEngine::run() called at [/home/joshua/workspace/github.com/facebook/arcanist/src/workflow/ArcanistLintWorkflow.php:336]
  #16 ArcanistLintWorkflow::run() called at [/home/joshua/workspace/github.com/facebook/arcanist/scripts/arcanist.php:322]
[2014-05-22 01:17:12] ERROR 2: escapeshellarg() expects parameter 1 to be string, array given at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:87]
  #0 escapeshellarg(Array { 0 => --ignore=E101,E501,W291,W292,W293 })
  #1 array_map(escapeshellarg, Array { 0 => Array { 0 => --ignore=E101,E501,W291,W292,W293 } }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:87]
  #2 xsprintf_command(Array { unmasked => true }, %s %s, 4, Array { 0 => Array { 0 => --ignore=E101,E501,W291,W292,W293 } }, 5) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/xsprintf.php:63]
  #3 xsprintf(xsprintf_command, Array { unmasked => true }, Array of size 3 starting with: { 0 => %C %Ls }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:33]
  #4 PhutilCommandString::renderString(true) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:20]
  #5 PhutilCommandString::getUnmaskedString() called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/csprintf.php:63]
  #6 xsprintf_command(Array { unmasked => true }, %C %C, 1, Object PhutilCommandString, 5) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/xsprintf.php:63]
  #7 xsprintf(xsprintf_command, Array { unmasked => true }, Array of size 3 starting with: { 0 => %C %C }) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:33]
  #8 PhutilCommandString::renderString(true) called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/xsprintf/PhutilCommandString.php:20]
  #9 PhutilCommandString::getUnmaskedString() called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/future/exec/ExecFuture.php:622]
  #10 ExecFuture::isReady() called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/future/FutureIterator.php:322]
  #11 FutureIterator::updateWorkingSet() called at [/home/joshua/dotfiles/modules/phabricator/libphutil/src/future/FutureIterator.php:97]
  #12 FutureIterator::addFuture(Object ExecFuture, foo.py) called at [/home/joshua/workspace/github.com/facebook/arcanist/src/lint/linter/ArcanistFutureLinter.php:18]
  #13 ArcanistFutureLinter::willLintPaths(Array { 0 => foo.py }) called at [/home/joshua/workspace/github.com/facebook/arcanist/src/lint/engine/ArcanistLintEngine.php:297]
  #14 ArcanistLintEngine::run() called at [/home/joshua/workspace/github.com/facebook/arcanist/src/workflow/ArcanistLintWorkflow.php:336]
  #15 ArcanistLintWorkflow::run() called at [/home/joshua/workspace/github.com/facebook/arcanist/scripts/arcanist.php:322]
```

Test Plan: Ran `arc lint foo.py` on an empty file.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9251
Capture a wider range of version information in `php_compat_info.json`.

Summary: Ref T5141. Currently, `php_compat_info.json` is hardcoded to support PHP 5.2.3. Instead, store as much version information as possible in `php_compat_info.json` and filter accordingly in `ArcanistXHPASTLinter.`

Test Plan: Ran `arc lint` and made sure no additional warnings were raised.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5141

Differential Revision: https://secure.phabricator.com/D9247
Capture maximum version information in `php_compat_info`.

Summary: Ref T5141. In order to be able to warn when deprecated functions are used, we need to be aware of from which version the functions were deprecated.

Test Plan: Ran `arc lint` and made sure no unexpected warnings were raised.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5141

Differential Revision: https://secure.phabricator.com/D9248
Fix "arc linters" if no engine is built or configured

Summary: `$engine` will be undefined here. This was just copy/paste derp, combined with me accidentally having an `.arclint` file in a place I didn't expect to have one when I tried to test this.

Test Plan: Ran `arc linters` in a totally bare, non-.arclint-having working copy

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9255
Make `arc shell-complete` more robust.

Summary: Fixes T5122. Add some basic error handling to the `shell-complete` workflow.

Test Plan: `arc shell-complete` no longer throws errors.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5122

Differential Revision: https://secure.phabricator.com/D9268
Add an `ArcanistGoLintLinter`.

Summary: Create bindings for `golint` as an external linter.

Test Plan: Wrote and executed unit tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9246
Fix diffusion.looksoon call to actually work

Summary:
This is all derped up, and we ignore the error so old installs don't break.

Underp it.

Test Plan: Did `arc land`, verified that the call actually went through successfully.

Reviewers: btrahan, davedash

Reviewed By: davedash

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9271
Change double quotes to single quotes.

Summary: Ran `arc lint --apply-patches --everything` over rARC, mainly to change double quotes to single quotes where appropriate. These changes also validate that the `ArcanistXHPASTLinter::LINT_DOUBLE_QUOTE` rule is working as expected.

Test Plan: Eyeballed //most// of the diff.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin, aurelijus

Differential Revision: https://secure.phabricator.com/D9269
set custom arcrc file earlier

Summary: It appears to have never really work? At least as far as phabricator.uri (empirically).

Test Plan:
removed ~/.arcrc, run call-conduit user.whoami with --arcrc-file and --trace.
set-config, get-config and alias also read and write to the right place now.

Reviewers: avivey

Reviewed By: avivey

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9263
Add a `version` workflow to arcanist.

Summary: A `version` workflow would be useful, especially for less technical users. Additionally, whenever I am faced with a new command I reasonably expect `$CMD [--help|help]` and `$CMD [--version|version]` to work.

Test Plan: Ran `arc version`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9265
Handle `arc --version`.

Summary: It seems reasonable to transform `arc --version` into `arc version`. The version command is similar to the help command in that it is a command that users unfamiliar with Arcanist will probably try to run at some stage.

Test Plan: Ran `arc --version`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9274
Add lint rules for `=>` (fat arrow) and `.` (string concatenation)

Summary: We have coverage for normal binary operators, but not these unusual cases.

Test Plan: Added and executed unit tests.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9314
Add a version number to `ArcanistXHPASTLinter`.

Summary: Fixes T5209. It makes sense for the `ArcanistXHPASTLinter` to implement the `getVersion` method in order to be able to enforce version requirements (as in T4954).

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5209

Differential Revision: https://secure.phabricator.com/D9317
Point github.com/facebook URIs at github.com/phacility (Arcanist Edition)

Summary: See D9328.

Test Plan: `grep`

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D9329
Merge branch 'master-upstream'

Conflicts:
	src/workflow/ArcanistDiffWorkflow.php