From 07eef2ece2084d3920246e745d460b6a041c5028 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 22 Aug 2014 18:36:24 +1200 Subject: [PATCH] Removing deprecated class/functions marked for deprecation in 3.0/3.1 --- control/Cookie.php | 11 --- control/Director.php | 4 - core/Object.php | 96 ---------------------- docs/en/changelogs/3.2.0.md | 41 ++++++--- filesystem/GD.php | 17 ---- forms/DropdownField.php | 20 +---- forms/PasswordField.php | 14 ---- model/DataExtension.php | 17 ---- model/DataList.php | 17 ---- model/SQLMap.php | 92 --------------------- model/connect/MySQLDatabase.php | 17 ---- model/queries/SQLConditionalExpression.php | 40 --------- model/queries/SQLSelect.php | 47 +---------- security/Group.php | 18 +--- view/SSTemplateParser.php | 9 -- view/SSTemplateParser.php.inc | 9 -- view/SSViewer.php | 14 ---- 17 files changed, 33 insertions(+), 450 deletions(-) delete mode 100644 model/SQLMap.php diff --git a/control/Cookie.php b/control/Cookie.php index a961c67fa..a1f3b1590 100644 --- a/control/Cookie.php +++ b/control/Cookie.php @@ -54,17 +54,6 @@ class Cookie { return self::get_inst()->inst_get($name); } - /** - * @param string - * @param string - * @param string - */ - public static function forceExpiry($name, $path = null, $domain = null) { - Deprecation::notice('3.1', 'Use Cookie::force_expiry instead.'); - - return self::force_expiry($name, $path, $domain); - } - /** * @param string * @param string diff --git a/control/Director.php b/control/Director.php index 251eee576..e929a70aa 100644 --- a/control/Director.php +++ b/control/Director.php @@ -75,10 +75,6 @@ class Director implements TemplateGlobalProvider { * priority 50. */ public static function addRules($priority, $rules) { - if ($priority != 100) { - Deprecation::notice('3.0', 'Priority argument is now ignored - use the default of 100. You should really' - . ' be setting routes via _config yaml fragments though.', Deprecation::SCOPE_GLOBAL); - } Deprecation::notice('3.2', 'Use the "Director.rules" config setting instead'); Config::inst()->update('Director', 'rules', $rules); diff --git a/core/Object.php b/core/Object.php index 2bfdf5628..72b5903cf 100755 --- a/core/Object.php +++ b/core/Object.php @@ -373,102 +373,6 @@ abstract class Object { return $default; } - /** - * Get a static variable, taking into account SS's inbuild static caches and pseudo-statics - * - * This method first checks for any extra values added by {@link Object::add_static_var()}, and attemps to traverse - * up the extra static var chain until it reaches the top, or it reaches a replacement static. - * - * If any extra values are discovered, they are then merged with the default PHP static values, or in some cases - * completely replace the default PHP static when you set $replace = true, and do not define extra data on any - * child classes - * - * @param string $class - * @param string $name the property name - * @param bool $uncached if set to TRUE, force a regeneration of the static cache - * @return mixed - */ - public static function get_static($class, $name, $uncached = false) { - Deprecation::notice('3.1.0', 'Replaced by Config#get'); - return Config::inst()->get($class, $name, Config::FIRST_SET); - } - - /** - * Set a static variable - * - * @param string $class - * @param string $name the property name to set - * @param mixed $value - */ - public static function set_static($class, $name, $value) { - Deprecation::notice('3.1.0', 'Replaced by Config#update'); - Config::inst()->update($class, $name, $value); - } - - /** - * Get an uninherited static variable - a variable that is explicity set in this class, and not in the parent class. - * - * @param string $class - * @param string $name - * @return mixed - */ - public static function uninherited_static($class, $name, $uncached = false) { - Deprecation::notice('3.1.0', 'Replaced by Config#get'); - return Config::inst()->get($class, $name, Config::UNINHERITED); - } - - /** - * Traverse down a class ancestry and attempt to merge all the uninherited static values for a particular static - * into a single variable - * - * @param string $class - * @param string $name the static name - * @param string $ceiling an optional parent class name to begin merging statics down from, rather than traversing - * the entire hierarchy - * @return mixed - */ - public static function combined_static($class, $name, $ceiling = false) { - if ($ceiling) throw new Exception('Ceiling argument to combined_static is no longer supported'); - - Deprecation::notice('3.1.0', 'Replaced by Config#get'); - return Config::inst()->get($class, $name); - } - - /** - * Merge in a set of additional static variables - * - * @param string $class - * @param array $properties in a [property name] => [value] format - * @param bool $replace replace existing static vars - */ - public static function addStaticVars($class, $properties, $replace = false) { - Deprecation::notice('3.1.0', 'Replaced by Config#update'); - foreach($properties as $prop => $value) self::add_static_var($class, $prop, $value, $replace); - } - - /** - * Add a static variable without replacing it completely if possible, but merging in with both existing PHP statics - * and existing psuedo-statics. Uses PHP's array_merge_recursive() with if the $replace argument is FALSE. - * - * Documentation from http://php.net/array_merge_recursive: - * If the input arrays have the same string keys, then the values for these keys are merged together - * into an array, and this is done recursively, so that if one of the values is an array itself, - * the function will merge it with a corresponding entry in another array too. - * If, however, the arrays have the same numeric key, the later value will not overwrite the original value, - * but will be appended. - * - * @param string $class - * @param string $name the static name - * @param mixed $value - * @param bool $replace completely replace existing static values - */ - public static function add_static_var($class, $name, $value, $replace = false) { - Deprecation::notice('3.1.0', 'Replaced by Config#remove and Config#update'); - - if ($replace) Config::inst()->remove($class, $name); - Config::inst()->update($class, $name, $value); - } - /** * Return TRUE if a class has a specified extension. * This supports backwards-compatible format (static Object::has_extension($requiredExtension)) diff --git a/docs/en/changelogs/3.2.0.md b/docs/en/changelogs/3.2.0.md index d4c65c464..659e8f092 100644 --- a/docs/en/changelogs/3.2.0.md +++ b/docs/en/changelogs/3.2.0.md @@ -5,20 +5,37 @@ ### Framework * Minimum PHP version raised to 5.3.3 - * DataObject::validate() method visibility changed to public - * NumericField now uses HTML5 "number" type instead of "text" - * UploadField "Select from files" shows files in all folders by default - * UploadField won't display an overwrite warning unless Upload:replaceFile is true - * HtmlEditorField no longer substitutes `
` for indented text - * ClassInfo::dataClassesFor now returns classes which should have tables, regardless of whether those + * `DataObject::validate()` method visibility changed to public + * `NumericField` now uses HTML5 "number" type instead of "text" + * `UploadField` "Select from files" shows files in all folders by default + * `UploadField` won't display an overwrite warning unless `Upload::replaceFile` is true + * `HtmlEditorField` no longer substitutes `
` for indented text + * `ClassInfo::dataClassesFor` now returns classes which should have tables, regardless of whether those tables actually exist. - * SS_Filterable, SS_Limitable and SS_Sortable now explicitly extend SS_List - * ToggleField was deprecated in 3.1, and has been removed. Use custom Javascript with ReadonlyField instead. - * ExactMatchMultiFilter was deprecated in 3.1, and has been removed. Use ExactMatchFilter instead. - * NegationFilter was deprecated in 3.1, and has been removed. Use ExactMatchFilter:not instead. - * StartsWithMultiFilter was deprecated in 3.1, and has been removed. Use StartsWithFilter instead. - * ScheduledTask and subclasses like DailyTask were deprecated in 3.1, and have been removed. + * `SS_Filterable`, `SS_Limitable` and `SS_Sortable` now explicitly extend `SS_List` + +#### Deprecated classes/methods removed + + * `ToggleField` was deprecated in 3.1, and has been removed. Use custom Javascript with `ReadonlyField` instead. + * `ExactMatchMultiFilter` was deprecated in 3.1, and has been removed. Use `ExactMatchFilter` instead. + * `NegationFilter` was deprecated in 3.1, and has been removed. Use `ExactMatchFilter:not` instead. + * `StartsWithMultiFilter` was deprecated in 3.1, and has been removed. Use `StartsWithFilter` instead. + * `ScheduledTask` and subclasses like `DailyTask` were deprecated in 3.1, and have been removed. Use custom code instead, or a module like silverstripe-crontask: https://github.com/silverstripe-labs/silverstripe-crontask + * `Cookie::forceExpiry()` was removed. Use `Cookie::force_expiry()` instead + * `Object` statics removal: `get_static()`, `set_static()`, `uninherited_static()`, `combined_static()`, + `addStaticVars()` and `add_static_var()` removed. Use the Config methods instead. + * `GD` methods removed: `setGD()`, `getGD()`, `hasGD()`. Use `setImageResource()`, `getImageResource()`, and `hasImageResource()` instead + * `DataExtension::get_extra_config()` removed, no longer supports `extraStatics` or `extraDBFields`. Define your + statics on the class directly. + * `DataList::getRange()` removed. Use `limit()` instead. + * `SQLMap` removed. Call `map()` on a `DataList` or use `SS_Map` directly instead. + * `Profiler` removed. Use xhprof or xdebug for profiling instead. + * `Aggregate` removed. Call aggregate methods on a `DataList` instead e.g. `Member::get()->max('LastEdited')` + * `MySQLDatabase::set_connection_charset()` removed. Use `MySQLDatabase.connection_charset` config setting instead + * `SQLConditionalExpression/SQLQuery` `select()`, `limit()`, `orderby()`, `groupby()`, `having()`, `from()`, `leftjoin()`, `innerjoin()`, `where()` and `whereAny()` removed. + Use `set*()` and `add*()` methods instead. + * Template `<% control $MyList %>` syntax removed. Use `<% loop $MyList %>` instead. ### CMS diff --git a/filesystem/GD.php b/filesystem/GD.php index 11a253103..b9f35ed1e 100644 --- a/filesystem/GD.php +++ b/filesystem/GD.php @@ -86,20 +86,10 @@ class GDBackend extends Object implements Image_Backend { $this->height = imagesy($resource); } - public function setGD($gd) { - Deprecation::notice('3.1', 'Use GD::setImageResource instead'); - return $this->setImageResource($gd); - } - public function getImageResource() { return $this->gd; } - public function getGD() { - Deprecation::notice('3.1', 'GD::getImageResource instead'); - return $this->getImageResource(); - } - /** * @param string $filename * @return boolean @@ -227,13 +217,6 @@ class GDBackend extends Object implements Image_Backend { return $this->gd ? true : false; } - public function hasGD() { - Deprecation::notice('3.1', 'GD::hasImageResource instead', - Deprecation::SCOPE_CLASS); - return $this->hasImageResource(); - } - - /** * Resize an image, skewing it as necessary. */ diff --git a/forms/DropdownField.php b/forms/DropdownField.php index 107ee0b23..a425933fd 100644 --- a/forms/DropdownField.php +++ b/forms/DropdownField.php @@ -122,27 +122,9 @@ class DropdownField extends FormField { * @param array $source An map of the dropdown items * @param string $value The current value * @param Form $form The parent form - * @param string|bool $emptyString Add an empty selection on to of the {@link $source}-Array (can also be - * boolean, which results in an empty string). Argument is deprecated - * in 3.1, please use{@link setEmptyString()} and/or - * {@link setHasEmptyDefault(true)} instead. */ - public function __construct($name, $title=null, $source=array(), $value='', $form=null, $emptyString=null) { + public function __construct($name, $title=null, $source=array(), $value='', $form=null) { $this->setSource($source); - - if($emptyString === true) { - Deprecation::notice('3.1', - 'Please use setHasEmptyDefault(true) instead of passing a boolean true $emptyString argument', - Deprecation::SCOPE_GLOBAL); - } - if(is_string($emptyString)) { - Deprecation::notice('3.1', 'Please use setEmptyString() instead of passing a string emptyString argument.', - Deprecation::SCOPE_GLOBAL); - } - - if($emptyString) $this->setHasEmptyDefault(true); - if(is_string($emptyString)) $this->setEmptyString($emptyString); - parent::__construct($name, ($title===null) ? $name : $title, $value, $form); } diff --git a/forms/PasswordField.php b/forms/PasswordField.php index d3642b578..c8e67ae9a 100644 --- a/forms/PasswordField.php +++ b/forms/PasswordField.php @@ -14,20 +14,6 @@ class PasswordField extends TextField { */ private static $autocomplete; - /** - * Returns an input field, class="text" and type="text" with an optional - * maxlength - */ - public function __construct($name, $title = null, $value = "") { - if(count(func_get_args()) > 3) { - Deprecation::notice('3.0', 'Use setMaxLength() instead of constructor arguments', - Deprecation::SCOPE_GLOBAL); - } - - parent::__construct($name, $title, $value); - } - - public function getAttributes() { $attributes = array_merge( parent::getAttributes(), diff --git a/model/DataExtension.php b/model/DataExtension.php index 33017b668..afd587250 100644 --- a/model/DataExtension.php +++ b/model/DataExtension.php @@ -7,23 +7,6 @@ */ abstract class DataExtension extends Extension { - public static function get_extra_config($class, $extension, $args) { - if(method_exists($extension, 'extraDBFields')) { - $extraStaticsMethod = 'extraDBFields'; - } else { - $extraStaticsMethod = 'extraStatics'; - } - - $statics = Injector::inst()->get($extension, true, $args)->$extraStaticsMethod($class, $extension); - - if ($statics) { - Deprecation::notice('3.1.0', - "$extraStaticsMethod deprecated. Just define statics on your extension, or use get_extra_config", - Deprecation::SCOPE_GLOBAL); - return $statics; - } - } - public static function unload_extra_statics($class, $extension) { throw new Exception('unload_extra_statics gone'); } diff --git a/model/DataList.php b/model/DataList.php index 985ed24c0..dc166a3b0 100644 --- a/model/DataList.php +++ b/model/DataList.php @@ -482,11 +482,6 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab throw new InvalidArgumentException("Bad field expression $field"); } - if (!$this->inAlterDataQueryCall) { - Deprecation::notice('3.1', - 'getRelationName is mutating, and must be called inside an alterDataQuery block'); - } - if(strpos($field,'.') === false) { return '"'.$field.'"'; } @@ -812,18 +807,6 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab return $this->count() > 0; } - /** - * Get a sub-range of this dataobjectset as an array - * - * @param int $offset - * @param int $length - * @return DataList - */ - public function getRange($offset, $length) { - Deprecation::notice("3.0", 'Use limit($length, $offset) instead. Note the new argument order.'); - return $this->limit($length, $offset); - } - /** * Find the first DataObject of this DataList where the given key = value * diff --git a/model/SQLMap.php b/model/SQLMap.php deleted file mode 100644 index be6764df0..000000000 --- a/model/SQLMap.php +++ /dev/null @@ -1,92 +0,0 @@ -value pairs generated from database queries. - * The query isn't actually executed until you need it. - * - * @package framework - * @subpackage model - */ -class SQLMap extends Object implements IteratorAggregate { - /** - * The query used to generate the map. - * @var SQLSelect - */ - protected $query; - protected $keyField, $titleField; - - /** - * Construct a SQLMap. - * - * @param SQLSelect $query The query to generate this map. THis isn't executed until it's needed. - */ - public function __construct(SQLSelect $query, $keyField = "ID", $titleField = "Title") { - Deprecation::notice('3.0', 'Use SS_Map or DataList::map() instead.', Deprecation::SCOPE_CLASS); - - if(!$query) { - user_error('SQLMap constructed with null query.', E_USER_ERROR); - } - - $this->query = $query; - $this->keyField = $keyField; - $this->titleField = $titleField; - - parent::__construct(); - } - - /** - * Get the name of an item. - * @param string|int $id The id of the item. - * @return string - */ - public function getItem($id) { - if($id) { - $baseTable = reset($this->query->from); - $oldWhere = $this->query->getWhere(); - $this->query->where(array( - "\"$baseTable\".\"ID\" = ?" => $id - )); - $record = $this->query->execute()->first(); - $this->query->setWhere($oldWhere); - if($record) { - $className = $record['ClassName']; - $obj = new $className($record); - return $obj->Title; - } - } - } - - public function getIterator() { - $this->genItems(); - return new SS_Map_Iterator($this->items->getIterator(), $this->keyField, $this->titleField); - } - - /** - * Get the items in this class. - * @return SS_List - */ - public function getItems() { - $this->genItems(); - return $this->items; - } - - /** - * Generate the items in this map. This is used by - * getItems() if the items have not been generated already. - */ - protected function genItems() { - if(!isset($this->items)) { - $this->items = new ArrayList(); - $items = $this->query->execute(); - - foreach($items as $item) { - $className = isset($item['RecordClassName']) ? $item['RecordClassName'] : $item['ClassName']; - - if(!$className) { - user_error('SQLMap query could not retrieve className', E_USER_ERROR); - } - - $this->items->push(new $className($item)); - } - } - } -} diff --git a/model/connect/MySQLDatabase.php b/model/connect/MySQLDatabase.php index be57bbadf..272f96f1f 100644 --- a/model/connect/MySQLDatabase.php +++ b/model/connect/MySQLDatabase.php @@ -49,23 +49,6 @@ class MySQLDatabase extends SS_Database { } } - /** - * Sets the character set for the MySQL database connection. - * - * The character set connection should be set to 'utf8' for SilverStripe version 2.4.0 and - * later. - * - * However, sites created before version 2.4.0 should leave this unset or data that isn't 7-bit - * safe will be corrupted. As such, the installer comes with this set in mysite/_config.php by - * default in versions 2.4.0 and later. - * - * @deprecated 3.2 Use "MySQLDatabase.connection_charset" config setting instead - */ - public static function set_connection_charset($charset = 'utf8') { - Deprecation::notice('3.1', 'Use "MySQLDatabase.connection_charset" config setting instead'); - Config::inst()->update('MySQLDatabase', 'connection_charset', $charset); - } - /** * Sets the SQL mode * diff --git a/model/queries/SQLConditionalExpression.php b/model/queries/SQLConditionalExpression.php index 3f3d02fb5..155d535da 100644 --- a/model/queries/SQLConditionalExpression.php +++ b/model/queries/SQLConditionalExpression.php @@ -64,14 +64,6 @@ abstract class SQLConditionalExpression extends SQLExpression { return $this->addFrom($from); } - /** - * @deprecated since version 3.0 - */ - public function from($from) { - Deprecation::notice('3.0', 'Please use setFrom() or addFrom() instead!'); - return $this->setFrom($from); - } - /** * Add a table to include in the query or update * @@ -147,14 +139,6 @@ abstract class SQLConditionalExpression extends SQLExpression { return $this; } - /** - * @deprecated since version 3.0 - */ - public function leftjoin($table, $onPredicate, $tableAlias = null, $order = 20) { - Deprecation::notice('3.0', 'Please use addLeftJoin() instead!'); - $this->addLeftJoin($table, $onPredicate, $tableAlias); - } - /** * Add an INNER JOIN criteria * @@ -178,14 +162,6 @@ abstract class SQLConditionalExpression extends SQLExpression { return $this; } - /** - * @deprecated since version 3.0 - */ - public function innerjoin($table, $onPredicate, $tableAlias = null, $order = 20) { - Deprecation::notice('3.0', 'Please use addInnerJoin() instead!'); - return $this->addInnerJoin($table, $onPredicate, $tableAlias, $order); - } - /** * Add an additional filter (part of the ON clause) on a join. * @@ -474,22 +450,6 @@ abstract class SQLConditionalExpression extends SQLExpression { return $this; } - /** - * @deprecated since version 3.0 - */ - public function where($where) { - Deprecation::notice('3.0', 'Please use setWhere() or addWhere() instead!'); - return $this->setWhere($where); - } - - /** - * @deprecated since version 3.0 - */ - public function whereAny($where) { - Deprecation::notice('3.0', 'Please use setWhereAny() or setWhereAny() instead!'); - return $this->setWhereAny($where); - } - /** * @see SQLSelect::addWhere() * diff --git a/model/queries/SQLSelect.php b/model/queries/SQLSelect.php index 2a9272642..11fb53df8 100644 --- a/model/queries/SQLSelect.php +++ b/model/queries/SQLSelect.php @@ -148,25 +148,12 @@ class SQLSelect extends SQLConditionalExpression { } foreach($fields as $idx => $field) { - if(preg_match('/^(.*) +AS +"?([^"]*)"?/i', $field, $matches)) { - Deprecation::notice("3.0", "Use selectField() to specify column aliases"); - $this->selectField($matches[1], $matches[2]); - } else { - $this->selectField($field, is_numeric($idx) ? null : $idx); - } + $this->selectField($field, is_numeric($idx) ? null : $idx); } return $this; } - /** - * @deprecated since version 3.0 - */ - public function select($fields) { - Deprecation::notice('3.0', 'Please use setSelect() or addSelect() instead!'); - $this->setSelect($fields); - } - /** * Select an additional field. * @@ -263,14 +250,6 @@ class SQLSelect extends SQLConditionalExpression { return $this; } - /** - * @deprecated since version 3.0 - */ - public function limit($limit, $offset = 0) { - Deprecation::notice('3.0', 'Please use setLimit() instead!'); - return $this->setLimit($limit, $offset); - } - /** * Set ORDER BY clause either as SQL snippet or in array format. * @@ -364,14 +343,6 @@ class SQLSelect extends SQLConditionalExpression { return $this; } - /** - * @deprecated since version 3.0 - */ - public function orderby($clauses = null, $direction = null) { - Deprecation::notice('3.0', 'Please use setOrderBy() instead!'); - return $this->setOrderBy($clauses, $direction); - } - /** * Extract the direction part of a single-column order by clause. * @@ -466,14 +437,6 @@ class SQLSelect extends SQLConditionalExpression { return $this; } - /** - * @deprecated since version 3.0 - */ - public function groupby($where) { - Deprecation::notice('3.0', 'Please use setGroupBy() or addHaving() instead!'); - return $this->setGroupBy($where); - } - /** * Set a HAVING clause. * @@ -507,14 +470,6 @@ class SQLSelect extends SQLConditionalExpression { return $this; } - /** - * @deprecated since version 3.0 - */ - public function having($having) { - Deprecation::notice('3.0', 'Please use setHaving() or addHaving() instead!'); - return $this->setHaving($having); - } - /** * Return a list of HAVING clauses used internally. * @return array diff --git a/security/Group.php b/security/Group.php index aaf9d4b25..d7bddcae9 100755 --- a/security/Group.php +++ b/security/Group.php @@ -246,23 +246,9 @@ class Group extends DataObject { * See {@link DirectMembers()} for retrieving members without any inheritance. * * @param String $filter - * @param String $sort - * @param String $join Deprecated, use leftJoin($table, $joinClause) instead * @return ManyManyList */ - public function Members($filter = "", $sort = "", $join = "", $limit = "") { - if($sort || $join || $limit) { - Deprecation::notice('3.0', - "The sort, join, and limit arguments are deprcated, use sort(), join() and limit() on the resulting" - . " DataList instead."); - } - - if($join) { - throw new \InvalidArgumentException( - 'The $join argument has been removed. Use leftJoin($table, $joinClause) instead.' - ); - } - + public function Members($filter = '') { // First get direct members as a base result $result = $this->DirectMembers(); // Remove the default foreign key filter in prep for re-applying a filter containing all children groups. @@ -275,7 +261,7 @@ class Group extends DataObject { } // Now set all children groups as a new foreign key $groups = Group::get()->byIDs($this->collateFamilyIDs()); - $result = $result->forForeignID($groups->column('ID'))->where($filter)->sort($sort)->limit($limit); + $result = $result->forForeignID($groups->column('ID'))->where($filter); return $result; } diff --git a/view/SSTemplateParser.php b/view/SSTemplateParser.php index 1abe84845..69e84e362 100644 --- a/view/SSTemplateParser.php +++ b/view/SSTemplateParser.php @@ -3751,15 +3751,6 @@ class SSTemplateParser extends Parser implements TemplateParser { '}; $scope->popScope(); '; } - /** - * The deprecated closed block handler for control blocks - * @deprecated - */ - function ClosedBlock_Handle_Control(&$res) { - Deprecation::notice('3.1', '<% control %> is deprecated. Use <% with %> or <% loop %> instead.'); - return $this->ClosedBlock_Handle_Loop($res); - } - /** * The closed block handler for with blocks */ diff --git a/view/SSTemplateParser.php.inc b/view/SSTemplateParser.php.inc index 255482aae..111c27cc1 100644 --- a/view/SSTemplateParser.php.inc +++ b/view/SSTemplateParser.php.inc @@ -931,15 +931,6 @@ class SSTemplateParser extends Parser implements TemplateParser { '}; $scope->popScope(); '; } - /** - * The deprecated closed block handler for control blocks - * @deprecated - */ - function ClosedBlock_Handle_Control(&$res) { - Deprecation::notice('3.1', '<% control %> is deprecated. Use <% with %> or <% loop %> instead.'); - return $this->ClosedBlock_Handle_Loop($res); - } - /** * The closed block handler for with blocks */ diff --git a/view/SSViewer.php b/view/SSViewer.php index a4d8cec1f..d9e05a9b5 100644 --- a/view/SSViewer.php +++ b/view/SSViewer.php @@ -1032,13 +1032,6 @@ class SSViewer { public function process($item, $arguments = null, $inheritedScope = null) { SSViewer::$topLevel[] = $item; - if ($arguments && $arguments instanceof Zend_Cache_Core) { - Deprecation::notice('3.0', 'Use setPartialCacheStore to override the partial cache storage backend, ' . - 'the second argument to process is now an array of variables.'); - $this->setPartialCacheStore($arguments); - $arguments = null; - } - if(isset($this->chosenTemplates['main'])) { $template = $this->chosenTemplates['main']; } else { @@ -1208,13 +1201,6 @@ class SSViewer_FromString extends SSViewer { } public function process($item, $arguments = null, $scope = null) { - if ($arguments && $arguments instanceof Zend_Cache_Core) { - Deprecation::notice('3.0', 'Use setPartialCacheStore to override the partial cache storage backend, ' . - 'the second argument to process is now an array of variables.'); - $this->setPartialCacheStore($arguments); - $arguments = null; - } - $hash = sha1($this->content); $cacheFile = TEMP_FOLDER . "/.cache.$hash";