limited use and are generally inaccurate, unmaintained, and impossible to
properly maintain. Also removed the corresponding methods from ApiBase and
the 'APIGetPossibleErrors' and 'APIGetResultProperties' hooks.
+* Formats dbg, dump, txt, wddx, and yaml are now deprecated.
=== Languages updated in 1.24 ===
public function getDescription() {
return $this->getIsHtml() ? ' (pretty-print in HTML)' : '';
}
+
+ /**
+ * To avoid code duplication with the deprecation of dbg, dump, txt, wddx,
+ * and yaml, this method is added to do the necessary work. It should be
+ * removed when those deprecated formats are removed.
+ */
+ protected function markDeprecated() {
+ $fm = $this->getIsHtml() ? 'fm' : '';
+ $name = $this->getModuleName();
+ $this->logFeatureUsage( "format=$name" );
+ $this->setWarning( "format=$name has been deprecated. Please use format=json$fm instead." );
+ }
}
/**
}
public function execute() {
+ $this->markDeprecated();
$this->printText( var_export( $this->getResultData(), true ) );
}
public function getDescription() {
- return 'Output data in PHP\'s var_export() format' . parent::getDescription();
+ return 'DEPRECATED! Output data in PHP\'s var_export() format' . parent::getDescription();
}
}
}
public function execute() {
+ $this->markDeprecated();
ob_start();
var_dump( $this->getResultData() );
$result = ob_get_contents();
}
public function getDescription() {
- return 'Output data in PHP\'s var_dump() format' . parent::getDescription();
+ return 'DEPRECATED! Output data in PHP\'s var_dump() format' . parent::getDescription();
}
}
}
public function execute() {
+ $this->markDeprecated();
$this->printText( print_r( $this->getResultData(), true ) );
}
public function getDescription() {
- return 'Output data in PHP\'s print_r() format' . parent::getDescription();
+ return 'DEPRECATED! Output data in PHP\'s print_r() format' . parent::getDescription();
}
}
}
public function execute() {
+ $this->markDeprecated();
+
// Some versions of PHP have a broken wddx_serialize_value, see
// PHP bug 45314. Test encoding an affected character (U+00A0)
// to avoid this.
}
public function getDescription() {
- return 'Output data in WDDX format' . parent::getDescription();
+ return 'DEPRECATED! Output data in WDDX format' . parent::getDescription();
}
}
return 'application/yaml';
}
+ public function execute() {
+ $this->markDeprecated();
+ parent::execute();
+ }
+
public function getDescription() {
- return 'Output data in YAML format' . ApiFormatBase::getDescription();
+ return 'DEPRECATED! Output data in YAML format' . ApiFormatBase::getDescription();
}
}