]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Remove deprecated support for specifying flags as a string
authorJoshua Spence <josh@joshuaspence.com>
Mon, 9 Feb 2015 19:55:27 +0000 (06:55 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Mon, 9 Feb 2015 19:55:49 +0000 (06:55 +1100)
Summary: It should be safe to remove this now.

Test Plan: `arc unit`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11714

src/lint/linter/ArcanistExternalLinter.php

index b6790d4fcdc3dc2c584607c5dda898e8265a5c8d..08f3e5cb79c3d41f9fa197cd91f0343a500e92f9 100644 (file)
@@ -141,8 +141,8 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter {
    * @return this
    * @task bin
    */
-  final public function setFlags($flags) {
-    $this->flags = (array)$flags;
+  final public function setFlags(array $flags) {
+    $this->flags = $flags;
     return $this;
   }
 
@@ -337,21 +337,9 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter {
    * @task exec
    */
   final protected function getCommandFlags() {
-    $mandatory_flags = $this->getMandatoryFlags();
-    if (!is_array($mandatory_flags)) {
-      phutil_deprecated(
-        'String support for flags.', 'You should use list<string> instead.');
-      $mandatory_flags = (array) $mandatory_flags;
-    }
-
-    $flags = nonempty($this->flags, $this->getDefaultFlags());
-    if (!is_array($flags)) {
-      phutil_deprecated(
-        'String support for flags.', 'You should use list<string> instead.');
-      $flags = (array) $flags;
-    }
-
-    return array_merge($mandatory_flags, $flags);
+    return array_merge(
+      $this->getMandatoryFlags(),
+      nonempty($this->flags, $this->getDefaultFlags()));
   }
 
   public function getCacheVersion() {
@@ -508,12 +496,6 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter {
         throw new Exception(
           pht('None of the configured binaries can be located.'));
       case 'flags':
-        if (!is_array($value)) {
-          phutil_deprecated(
-            'String support for flags.',
-            'You should use list<string> instead.');
-          $value = (array) $value;
-        }
         $this->setFlags($value);
         return;
     }