Permalink
Browse files

chore(deprecation): all code deprecated before Elgg 1.9 has been removed

BREAKING CHANGE:
The following views, functions and methods have been removed completely.

Removed views:

 - canvas/layouts/*
 - categories
 - categories/view
 - embed/addcontentjs
 - groups/left_column
 - groups/right_column
 - invitefriends/formitems
 - notifications/subscriptions/groupsform

Removed functions:

 - count_unread_messages()
 - delete_entities()
 - delete_object_entity()
 - delete_user_entity()
 - elgg_validate_action_url()
 - extend_view()
 - get_entities()
 - get_entities_from_access_id()
 - get_entities_from_access_collection()
 - get_entities_from_annotations()
 - get_entities_from_metadata()
 - get_entities_from_metadata_multi()
 - get_entities_from_relationship()
 - get_filetype_cloud
 - get_library_files()
 - get_views()
 - is_ip_in_array()
 - list_entities()
 - list_entities_from_annotations()
 - list_group_search()
 - list_registered_entities()
 - list_user_search()
 - menu_item()
 - make_register_object()
 - search_for_group()
 - search_for_object()
 - search_for_site()
 - search_for_user()
 - search_list_objects_by_name()
 - search_list_groups_by_name()
 - search_list_users_by_name()
 - test_ip()

Removed methods:

 - ElggCache::set_variable()
 - ElggCache::get_variable()
 - ElggData::initialise_attributes()
 - ElggData::getObjectOwnerGUID()
 - ElggDiskFilestore::make_directory_root()
 - ElggDiskFilestore::make_file_matrix()
 - ElggDiskFilestore::user_file_matrix()
 - ElggDiskFilestore::mb_str_split()
 - ElggEntity::clearMetadata()
 - ElggEntity::clearRelationships()
 - ElggEntity::clearAnnotations()
 - ElggEntity::getOwner()
 - ElggEntity::setContainer()
 - ElggEntity::getContainer()
 - ElggEntity::getIcon()
 - ElggEntity::setIcon()
 - ElggExtender::getOwner()
 - ElggFileCache::create_file()
 - ElggSite::getCollections()
 - ElggUser::getCollections()
 - ElggUser::getOwner()

Also the following arguments have been dropped:

 - ElggSite::getMembers()
   - 2: $offset
 - elgg_view_entity_list()
   - 3: $offset
   - 4: $limit
   - 5: $full_view
   - 6: $list_type_toggle
   - 7: $pagination
  • Loading branch information...
juho-jaakkola committed Jun 24, 2015
1 parent 2247ed8 commit 852b2640474d6c4fd6220fbd858256621e89d6b2
View
@@ -10,7 +10,6 @@ Loggable defines several class methods that are used in saving to the default sy
- ``getType()`` Return the object type
- ``getSubtype()`` Get the object subtype
- ``getObjectFromID($id)`` For a given ID, return the object associated with it
-- ``getObjectOwnerGUID()`` Return the GUID of the owner of this object
Database details
----------------
View
@@ -28,27 +28,35 @@ you will get an error message:
.. code:: shell
- [InvalidArgumentException]
- Package fxp/composer-asset-plugin not found
+ [InvalidArgumentException]
+ Package fxp/composer-asset-plugin not found
-All deprecated views and view arguments have been removed
----------------------------------------------------------
+List of deprecated views and view arguments that have been removed
+------------------------------------------------------------------
We dropped support for and/or removed the following views:
+ * canvas/layouts/*
+ * categories
+ * categories/view
* core/settings/tools
+ * embed/addcontentjs
* footer/analytics (Use page/elements/foot instead)
+ * groups/left_column
+ * groups/right_column
* groups/search/finishblurb
* groups/search/startblurb
* input/calendar (Use input/date instead)
* input/datepicker (Use input/date instead)
* input/pulldown (Use input/select instead)
+ * invitefriends/formitems
* js/initialise_elgg (Use AMD and ``elgg_require_js`` instead of extending JS views)
* members/nav
* metatags (Use the 'head', 'page' plugin hook instead)
* navigation/topbar_tools
* navigation/viewtype
+ * notifications/subscriptions/groupsform
* output/calendar (Use output/date instead)
* output/confirmlink (Use output/url instead)
* page_elements/contentwrapper
@@ -60,15 +68,16 @@ We dropped support for and/or removed the following views:
* user/search/startblurb
* usersettings/{plugin}/edit (Use plugins/{plugin}/usersettings instead)
* widgets/{handler}/view (Use widgets/{handler}/content instead)
-
+
We also dropped the following arguments to views:
* "value" in output/iframe (Use "src" instead)
* "area2" and "area3" in page/elements/sidebar (Use "sidebar" or view extension instead)
* "js" in icon views (e.g. icon/user/default)
* "options" to input/radio and input/checkboxes which aren't key-value pairs
will no longer be acceptable.
-
+
+
All scripts moved to bottom of page
-----------------------------------
@@ -251,14 +260,82 @@ Also note that plugins should not be accessing the global ``$CONFIG`` variable e
Removed Functions
-----------------
+ - ``count_unread_messages()``
+ - ``delete_entities()``
+ - ``delete_object_entity()``
+ - ``delete_user_entity()``
- ``elgg_get_view_location()``
+ - ``elgg_validate_action_url()``
- ``execute_delayed_query()``
+ - ``extend_view()``
- ``get_db_error()``
- ``get_db_link()``
+ - ``get_entities()``
+ - ``get_entities_from_access_id()``
+ - ``get_entities_from_access_collection()``
+ - ``get_entities_from_annotations()``
+ - ``get_entities_from_metadata()``
+ - ``get_entities_from_metadata_multi()``
+ - ``get_entities_from_relationship()``
+ - ``get_filetype_cloud()``
+ - ``get_library_files()``
+ - ``get_views()``
+ - ``is_ip_in_array()``
+ - ``list_entities()``
+ - ``list_entities_from_annotations()``
+ - ``list_group_search()``
+ - ``list_registered_entities()``
+ - ``list_user_search()``
- ``load_plugins()``
+ - ``menu_item()``
+ - ``make_register_object()``
- ``mysql_*()``: Elgg :ref:`no longer uses ext/mysql<migrated-to-pdo>`
- ``remove_blacklist()``
+ - ``search_for_group()``
+ - ``search_for_object()``
+ - ``search_for_site()``
+ - ``search_for_user()``
+ - ``search_list_objects_by_name()``
+ - ``search_list_groups_by_name()``
+ - ``search_list_users_by_name()``
- ``set_template_handler()``
+ - ``test_ip()``
+
+Removed methods
+---------------
+
+ - ``ElggCache::set_variable()``
+ - ``ElggCache::get_variable()``
+ - ``ElggData::initialise_attributes()``
+ - ``ElggData::getObjectOwnerGUID()``
+ - ``ElggDiskFilestore::make_directory_root()``
+ - ``ElggDiskFilestore::make_file_matrix()``
+ - ``ElggDiskFilestore::user_file_matrix()``
+ - ``ElggDiskFilestore::mb_str_split()``
+ - ``ElggEntity::clearMetadata()``
+ - ``ElggEntity::clearRelationships()``
+ - ``ElggEntity::clearAnnotations()``
+ - ``ElggEntity::getOwner()``
+ - ``ElggEntity::setContainer()``
+ - ``ElggEntity::getContainer()``
+ - ``ElggEntity::getIcon()``
+ - ``ElggEntity::setIcon()``
+ - ``ElggExtender::getOwner()``
+ - ``ElggFileCache::create_file()``
+ - ``ElggSite::getCollections()``
+ - ``ElggUser::getCollections()``
+ - ``ElggUser::getOwner()``
+
+The following arguments have also been dropped:
+
+ - ``ElggSite::getMembers()``
+ - 2: ``$offset``
+ - ``elgg_view_entity_list()``
+ - 3: ``$offset``
+ - 4: ``$limit``
+ - 5: ``$full_view``
+ - 6: ``$list_type_toggle``
+ - 7: ``$pagination``
Removed Plugin Hooks
--------------------
@@ -761,7 +838,7 @@ Use standardized page handlers and scripts
The ``object/:subtype`` view
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Make sure there are views for ``$vars['full_view'] == true`` and ``$vars['full_view'] == false``. ``$vars['full_view']`` replaced ``$vars['full]``.
-* Check for the object in ``$vars['entity']``. Use ``elgg_instance_of()`` to make sure it's the type of entity you want.
+* Check for the object in ``$vars['entity']``. Use ``elgg_instance_of()`` to make sure it's the type of entity you want.
* Return ``true`` to short circuit the view if the entity is missing or wrong.
* Use ``elgg_view(‘object/elements/summary’, array(‘entity’ => $entity));`` and ``elgg_view_menu(‘entity’, array(‘entity’ => $entity));`` to help format. You should use very little markup in these views.
@@ -770,7 +847,7 @@ Update action structure
~~~~~~~~~~~~~~~~~~~~~~~
* Namespace action files and action names (example: ``mod/blog/actions/blog/save.php`` => ``action/blog/save``)
* Use the following action URLs:
-
+
* Add: ``action/:plugin/save``
* Edit: ``action/:plugin/save``
* Delete: ``action/:plugin/delete``
@@ -781,11 +858,8 @@ Update action structure
Update deprecated functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Functions deprecated in 1.7 will produce visible errors in 1.8.
-
- * See ``/engine/lib/deprecated-1.7.php`` for the full list.
-
* You can also update functions deprecated in 1.8.
-
+
* Many registration functions simply added an ``elgg_`` prefix for consistency, and should be easy to update.
* See ``/engine/lib/deprecated-1.8.php`` for the full list.
* You can set the debug level to “warning” to get visual reminders of deprecated functions.
@@ -180,8 +180,6 @@ public function loadCore() {
'widgets.php',
// backward compatibility
- 'deprecated-1.7.php',
- 'deprecated-1.8.php',
'deprecated-1.9.php',
'deprecated-1.10.php',
'deprecated-1.11.php',
@@ -21,23 +21,6 @@ public function __construct() {
$this->variables = array();
}
- // @codingStandardsIgnoreStart
- /**
- * Set a cache variable.
- *
- * @param string $variable Name
- * @param string $value Value
- *
- * @return void
- *
- * @deprecated 1.8 Use \ElggCache:setVariable()
- */
- public function set_variable($variable, $value) {
- elgg_deprecated_notice('\ElggCache::set_variable() is deprecated by \ElggCache::setVariable()', 1.8);
- $this->setVariable($variable, $value);
- }
- // @codingStandardsIgnoreEnd
-
/**
* Set a cache variable.
*
@@ -54,22 +37,6 @@ public function setVariable($variable, $value) {
$this->variables[$variable] = $value;
}
- // @codingStandardsIgnoreStart
- /**
- * Get variables for this cache.
- *
- * @param string $variable Name
- *
- * @return mixed The value or null;
- *
- * @deprecated 1.8 Use \ElggCache::getVariable()
- */
- public function get_variable($variable) {
- elgg_deprecated_notice('\ElggCache::get_variable() is deprecated by \ElggCache::getVariable()', 1.8);
- return $this->getVariable($variable);
- }
- // @codingStandardsIgnoreEnd
-
/**
* Get variables for this cache.
*
@@ -22,27 +22,6 @@
*/
protected $attributes = array();
- // @codingStandardsIgnoreStart
- /**
- * Initialise the attributes array.
- *
- * This is vital to distinguish between metadata and base parameters.
- *
- * @param bool $pre18_api Compatibility for subclassing in 1.7 -> 1.8 change.
- * Passing true (default) emits a deprecation notice.
- * Passing false returns false. Core constructors always pass false.
- * Does nothing either way since attributes are initialized by the time
- * this is called.
- * @return void
- * @deprecated 1.8 Use initializeAttributes()
- */
- protected function initialise_attributes($pre18_api = true) {
- if ($pre18_api) {
- elgg_deprecated_notice('initialise_attributes() is deprecated by initializeAttributes()', 1.8);
- }
- }
- // @codingStandardsIgnoreEnd
-
/**
* Initialize the attributes array.
*
@@ -154,17 +133,6 @@ public function getClassName() {
return get_class($this);
}
- /**
- * Return the GUID of the owner of this object.
- *
- * @return int
- * @deprecated 1.8 Use getOwnerGUID() instead
- */
- public function getObjectOwnerGUID() {
- elgg_deprecated_notice("getObjectOwnerGUID() was deprecated. Use getOwnerGUID().", 1.8);
- return $this->owner_guid;
- }
-
/*
* ITERATOR INTERFACE
*/
@@ -275,23 +275,6 @@ public function getSize($prefix, $container_guid) {
}
}
- // @codingStandardsIgnoreStart
- /**
- * Create a directory $dirroot
- *
- * @param string $dirroot The full path of the directory to create
- *
- * @throws IOException
- * @return true
- * @deprecated 1.8 Use \ElggDiskFilestore::makeDirectoryRoot()
- */
- protected function make_directory_root($dirroot) {
- elgg_deprecated_notice('\ElggDiskFilestore::make_directory_root() is deprecated by ::makeDirectoryRoot()', 1.8);
-
- return $this->makeDirectoryRoot($dirroot);
- }
- // @codingStandardsIgnoreEnd
-
/**
* Create a directory $dirroot
*
@@ -342,75 +325,6 @@ public function setParameters(array $parameters) {
* Deprecated methods
*/
- // @codingStandardsIgnoreStart
- /**
- * Construct a file path matrix for an entity.
- *
- * @param int $identifier The guid of the entity to store the data under.
- *
- * @return string The path where the entity's data will be stored.
- * @deprecated 1.8 Use \Elgg\EntityDirLocator
- */
- protected function make_file_matrix($identifier) {
- elgg_deprecated_notice('\ElggDiskFilestore::make_file_matrix() is deprecated by \Elgg\EntityDirLocator', 1.8);
-
- return $this->makeFileMatrix($identifier);
- }
- // @codingStandardsIgnoreEnd
-
- // @codingStandardsIgnoreStart
- /**
- * Construct a filename matrix.
- *
- * Generates a matrix using the entity's creation time and
- * unique guid.
- *
- * @param int $guid The entity to contrust a matrix for
- *
- * @deprecated 1.8 Use \ElggDiskFileStore::makeFileMatrix()
- * @return string The
- */
- protected function user_file_matrix($guid) {
- elgg_deprecated_notice('\ElggDiskFilestore::user_file_matrix() is deprecated by \Elgg\EntityDirLocator', 1.8);
-
- return $this->makeFileMatrix($guid);
- }
- // @codingStandardsIgnoreEnd
-
- // @codingStandardsIgnoreStart
- /**
- * Multibyte string tokeniser.
- *
- * Splits a string into an array. Will fail safely if mbstring is
- * not installed.
- *
- * @param string $string String
- * @param string $charset The charset, defaults to UTF8
- *
- * @return array
- * @deprecated 1.8 Files are stored by date and guid; no need for this.
- */
- private function mb_str_split($string, $charset = 'UTF8') {
- elgg_deprecated_notice('\ElggDiskFilestore::mb_str_split() is deprecated.', 1.8);
-
- if (is_callable('mb_substr')) {
- $length = mb_strlen($string);
- $array = array();
-
- while ($length) {
- $array[] = mb_substr($string, 0, 1, $charset);
- $string = mb_substr($string, 1, $length, $charset);
-
- $length = mb_strlen($string);
- }
-
- return $array;
- } else {
- return str_split($string);
- }
- }
- // @codingStandardsIgnoreEnd
-
/**
* Construct a file path matrix for an entity.
*
Oops, something went wrong.

0 comments on commit 852b264

Please sign in to comment.