Fixes T5385. Provide a flexible means of setting a minimum PHP version for the ArcanistXHPASTLinter, instead of relying on ArcanistXHPASTLinter::LINT_PHP_53_FEATURES and ArcanistXHPASTLinter::LINT_PHP_54_FEATURES.
Details
Details
- Reviewers
 epriestley - Group Reviewers
 Blessed Reviewers - Maniphest Tasks
 - T5385: Allow PHP version to be customized with `ArcanistXHPASTLinter`
 - Commits
 - rARC4c99a6556778: Allow PHP version to be customized with `ArcanistXHPASTLinter`
 
Fixed up and ran unit tests.
Diff Detail
Diff Detail
- Repository
 - rARC Arcanist
 - Branch
 - xhpast-version
 - Lint
 Lint Passed Severity Location Code Message Advice src/lint/linter/ArcanistXHPASTLinter.php:467 XHP16 TODO Comment - Unit
 Tests Passed - Build Status
 Buildable 1152 Build 1152: [Placeholder Plan] Wait for 30 Seconds 
Event Timeline
| src/lint/linter/ArcanistXHPASTLinter.php | ||
|---|---|---|
| 197 | Should maybe attempt to validate if $value looks like a valid PHP version.  | |
| 376–378 | Should probably look at whether LINT_PHP_53_FEATURES and/or LINT_PHP_54_FEATURES are being used (i.e. is a non-disabled severity set) and then: 
  | |
| 516–523 | This is probably wrong now and needs to be given some more thought.  | |
Comment Actions
- Raise deprecation warnings on LINT_PHP_53_FEATURES and LINT_PHP_54_FEATURES.
 - Set xhpast.php-version if it is not set but LINT_PHP_53_FEATURES or LINT_PHP_54_FEATURES is being used.
 
Comment Actions
I don't really have any good ideas about the Windows issue beyond, like, adding xhpast.php-version.windows. :/
| src/lint/linter/ArcanistXHPASTLinter.php | ||
|---|---|---|
| 376–396 | I think it's fine to get rid of these entirely, I strongly suspect only Phabricator is using them.  | |
| src/lint/linter/ArcanistXHPASTLinter.php | ||
|---|---|---|
| 376–396 | We use them where I work. I think leave them there for a short period of time.  | |
| src/lint/linter/ArcanistXHPASTLinter.php | ||
|---|---|---|
| 404 | Prefer Filesystem::readFile() to get a more useful, explicit exception on failure.  | |