Actions

Difference between revisions of "Potential backward compatibility issues in Joomla 3 and Joomla Platform 12.2"

From Joomla! Documentation

(Classes moved within the platform)
Line 40: Line 40:
 
*JInput (and all subclasses)
 
*JInput (and all subclasses)
 
*JTable (and all subclasses)
 
*JTable (and all subclasses)
 +
*JArchive (and all subclasses)
  
 
== Renamed classes ==
 
== Renamed classes ==
Line 71: Line 72:
 
*JController::authorize() has been removed. Use JController::authorise() instead.
 
*JController::authorize() has been removed. Use JController::authorise() instead.
 
*JController:: setAccessControl() has been removed. Use JAccess.
 
*JController:: setAccessControl() has been removed. Use JAccess.
 +
 +
=== Archive ===
 +
*JArchiveBzip2 does not extend JObject anymore. You must not use any of JObject's methods anymore.
 +
*JArchiveGzip does not extend JObject anymore. You must not use any of JObject's methods anymore.
 +
*JArchiveTar does not extend JObject anymore. You must not use any of JObject's methods anymore.
 +
*JArchiveZip does not extend JObject anymore. You must not use any of JObject's methods anymore.
 +
 +
==== JObject ====
 +
*JObject::toString() has been removed. Use JObject::__toString() instead.
  
 
=== Base ===
 
=== Base ===
Line 113: Line 123:
 
*JHtml::script() doesn't support a string as the second parameter anymore. This used to be the path to the file in Joomla 1.5 and has been removed now.
 
*JHtml::script() doesn't support a string as the second parameter anymore. This used to be the path to the file in Joomla 1.5 and has been removed now.
 
*JHtml::stylesheet() doesn't support a string as the second parameter anymore. This used to be the path to the file in Joomla 1.5 and has been removed now.
 
*JHtml::stylesheet() doesn't support a string as the second parameter anymore. This used to be the path to the file in Joomla 1.5 and has been removed now.
 +
 +
==== JHtmlAccess ====
 +
*JHtmlAccess::assetgroups() the argument $config has been removed. It was previously unused.
  
 
==== JHtmlBehavior ====
 
==== JHtmlBehavior ====
*JHtmlBehavior::mootools has been removed. Use JHtmlBehavior::framework instead,
+
*JHtmlBehavior::mootools() has been removed. Use JHtmlBehavior::framework instead.
 +
*JHtmlBehavior::noframes() the argument $location has been removed. It was previously unused.
 +
 
 +
==== JHtmlList ====
 +
*JHtmlList::ordering() the argument $chop has been removed. It was previously unused.
  
 
=== Installer ===
 
=== Installer ===
Line 129: Line 146:
 
*JLangauge::_parseXMLLanguageFiles() has been removed. Use JLangauge::parseXMLLanguageFiles() instead.
 
*JLangauge::_parseXMLLanguageFiles() has been removed. Use JLangauge::parseXMLLanguageFiles() instead.
 
*JLangauge::_parseXMLLanguageFile() has been removed. Use JLangauge::parseXMLLanguageFile() instead.
 
*JLangauge::_parseXMLLanguageFile() has been removed. Use JLangauge::parseXMLLanguageFile() instead.
 +
*JHtmlList::loadLanguage() the argument $overwrite has been removed. It was previously unused.
  
 
=== Registry ===
 
=== Registry ===
Line 199: Line 217:
  
 
= CMS =
 
= CMS =
 +
 +
== Changes to classes ==
  
 
== Removed classes ==
 
== Removed classes ==
 
*All classes extending JElement have been removed
 
*All classes extending JElement have been removed
 +
 +
=== Help ===
 +
 +
==== JHelp ====
 +
*JHelp::createSiteList() the argument $selected has been removed. It was unused.
 +
  
 
[[Category:Compatibility]]
 
[[Category:Compatibility]]

Revision as of 13:37, 19 February 2012

This documents track potential backward compatibility issues for Joomla 3.0 and Joomla Platform 12.1 which is included in Joomla 3.0. Listed are issues which potentially break extensions. Please help making this document complete.

The base of this comparison is Joomla 2.5/Platform 11.4.

Backwards compatibility issues were also tracked for Joomla 2.5: Potential backward compatibility issues in Joomla 2.5 and Joomla Platform 11.4

Contents

Platform

The platform removed a larger number of deprecated classes and methods. For most extensions written for Joomla 2.5 the required changes should be reasonably small. Note that there are still deprecated classes in the platform that will be removed in future versions, developers should stop using them where possible.

General changes

  • Appending ?no_html to an URL to get a RAW view is not supported anymore (this was an old Joomla 1.0 feature)
  • The DS constant has been removed. If you really need it you can use DIRECTORY_SEPARATOR instead
  • Many more function arguments have been type hinted, including existing classes. Make sure you're always passing values of the correct type.
  • PHP 5.3 is now required
  • register_globals = on is not supported anymore
  • The name of modules now have to start with mod_
  • The module cacheing option "oldstatic" has been removed.
  • Extensions need to set the registeredurlparams now, the fall back on the URL has been removed.

Changes to extension installation

  • Use of the <install> base tag (from 1.5) is no longer supported; use <extension> instead
  • Suppport for install_script and uninstall_script, and the methods com_install and com_uninstall in these scripts, has been removed; use scriptfile instead
  • In language extensions, support for client="both" has been removed; package each client as a separate extension and optionally bundle them as a package extension instead
  • File paths for plugins no longer support the old 1.5 method (i.e. plugins/system/cache.php); each plugin must be in its own folder (i.e. plugins/system/cache/cache.php)

Moved files

All classes listed here should now be autoloadable. Explicit requires and includes have to be modified or removed.

Classes moved to the CMS

  • JFormFieldHelpsite
  • JFormFieldMedia
  • JFormFieldMenuitem
  • JFormFieldUser
  • JHelp
  • JTableContent

Classes moved within the platform

  • JDatabaseQuery subclasses
  • JInput (and all subclasses)
  • JTable (and all subclasses)
  • JArchive (and all subclasses)

Renamed classes

  • JFTP is now called JClientFtp
  • JLDAP is now called JClientLdap
  • JWebClient is now called JApplicationWebClient

Removed classes

  • JParameter (use JForm instead)
  • JElement and its subclasses
  • JFormFieldEditors (use JFormFieldPlugins instead)
  • JHtmlImage
  • JSimpleXML
  • JPane

Changes to classes

JFactory

  • JFactory::getXMLParser() has been removed. For RSS and Atom use cases, use JFactory::getFeedParser() instead. To read XML files or strings use JFactory::getXML().
  • JFactory::_createConfig() has been removed. Use JFactory::createConfig() instead.
  • JFactory::_createSession() has been removed. Use JFactory::createSession() instead.
  • JFactory::_createDbo() has been removed. Use JFactory::createDbo() instead.
  • JFactory::_createMailer() has been removed. Use JFactory::createMailer() instead.
  • JFactory::_createDocument() has been removed. Use JFactory::createDocument() instead.

Application

JController

  • JController::$_acoSection has been removed.
  • JController::$_acoSectionValue has been removed.
  • JController::authorize() has been removed. Use JController::authorise() instead.
  • JController:: setAccessControl() has been removed. Use JAccess.

Archive

  • JArchiveBzip2 does not extend JObject anymore. You must not use any of JObject's methods anymore.
  • JArchiveGzip does not extend JObject anymore. You must not use any of JObject's methods anymore.
  • JArchiveTar does not extend JObject anymore. You must not use any of JObject's methods anymore.
  • JArchiveZip does not extend JObject anymore. You must not use any of JObject's methods anymore.

JObject

  • JObject::toString() has been removed. Use JObject::__toString() instead.

Base

JObject

  • JObject::toString() has been removed. Use JObject::__toString() instead.

Database

JDatabase

  • JDatabase::$hasQuoted has been removed.
  • JDatabase::$quoted has been removed.
  • JDatabase::addQuoted() has been removed.
  • JDatabase::hasUTF() has been removed.
  • JDatabase::debug() has been removed. Use JDatabase::setDebug() instead.
  • JDatabase::explain() has been removed.
  • JDatabase::getEscaped() has been removed. Use JDatabase::escape() instead.
  • JDatabase::getTableFields() has been removed. Use JDatabase::getTableColumns() instead.
  • JDatabase::getTicker() has been removed. Use JDatabase::count() instead.
  • JDatabase::isQuoted() has been removed.
  • JDatabase::loadResultArray() has been removed. Use JDatabase::loadColumn() instead.
  • JDatabase::nameQuote() has been removed. Use JDatabase::quoteName() instead.
  • JDatabase::queryBatch() has been removed.

Environment

JRequest

  • JRequest::clean() has been removed.

JURI

  • JURI does not extend JObject anymore. You must not use any of JObject's methods anymore.

Error

JError

JError::isError() has been removed. Use instance of Exception instead.

HTML

JHtml

  • JHtml::_includeRelativeFiles() has been removed. Use JHtml::includeRelativeFiles() instead.
  • JHtml::script() doesn't support a string as the second parameter anymore. This used to be the path to the file in Joomla 1.5 and has been removed now.
  • JHtml::stylesheet() doesn't support a string as the second parameter anymore. This used to be the path to the file in Joomla 1.5 and has been removed now.

JHtmlAccess

  • JHtmlAccess::assetgroups() the argument $config has been removed. It was previously unused.

JHtmlBehavior

  • JHtmlBehavior::mootools() has been removed. Use JHtmlBehavior::framework instead.
  • JHtmlBehavior::noframes() the argument $location has been removed. It was previously unused.

JHtmlList

  • JHtmlList::ordering() the argument $chop has been removed. It was previously unused.

Installer

JInstaller

  • JInstaller::getOverwrite() has been removed. Use JInstaller::isOverwrite() instead.
  • JInstaller::getUpgrade() has been removed. Use JInstaller::isUpgrade() instead.

Language

JLanguage

  • JLangauge::_parseLanguageFiles() has been removed. Use JLangauge::parseLanguageFiles() instead.
  • JLangauge::_parseXMLLanguageFiles() has been removed. Use JLangauge::parseXMLLanguageFiles() instead.
  • JLangauge::_parseXMLLanguageFile() has been removed. Use JLangauge::parseXMLLanguageFile() instead.
  • JHtmlList::loadLanguage() the argument $overwrite has been removed. It was previously unused.

Registry

JRegistry

  • JRegistry::loadXML() has been removed. Use JRegistry::loadString() instead.
  • JRegistry::loadINI() has been removed. Use JRegistry::loadString() instead.
  • JRegistry::loadJSON() has been removed. Use JRegistry::loadString() instead.
  • JRegistry::makeNameSpace() has been removed. No replacement.
  • JRegistry::getNameSpaces() has been removed. No replacement.
  • JRegistry::getValue() has been removed. Use JRegistry::get() instead.
  • JRegistry::setValue() has been removed. Use JRegistry::set() instead.
  • JRegistry::loadSetupFile() has been removed. No replacement.

JRegistryFormatINI

  • JRegistryFormatINI::stringToObject() the second argument ($option) may not be a boolean anymore.

JRegistryFormatJSON

  • JRegistryFormatJSON::stringToObject() the second argument ($option) may not be a boolean anymore.

Table

JTable

  • JTable::canDelete() has been removed.
  • JTable::toXML() has been removed.

Updater

JUpdater

  • JUpdater::arrayUnique() has been removed. Use JArrayHelper::arrayUnique() instead.

User

JAuthentication

  • The constant JAUTHENTICATE_STATUS_SUCCESS has been removed. Use JAuthentication::STATUS_SUCCESS instead.
  • The constant JAUTHENTICATE_STATUS_CANCEL has been removed. No replacement.
  • The constant JAUTHENTICATE_STATUS_FAILURE has been removed. Use JAuthentication:: STATUS_FAILURE instead.

JUser

  • JUser::getParameters() has been removed.
  • Juser::authorisedLevels() has been removed. Use JUser::getAuthorisedViewLevels() instead.
  • Juser::authorize() has been removed. Use JUser::authorise() instead.
  • JUser::$usertype has been removed.

Utility

JDate

  • JDate::toFormat() has been removed. Use JDate::format() instead.
  • JDate::setOffset() has been removed.
  • JDate::$offsets has been removed.
  • JDate__construct() doesn't accept an numeric value for $tz anymore.

JUtility

  • JUtility::sendMail() has been removed. Use JMail::sendMail() instead.
  • JUtility::sendAdminMail() has been removed. Use JMail:: sendAdminMail() instead.
  • JUtility::getHash() has been removed. Use JApplication::getHash() instead.
  • JUtility::getToken() has been removed. Use JSession::getFormToken() instead.
  • JUtility::isWinOS() has been removed. Use JApplication::isWinOS() instead.
  • JUtility::dump() has been removed. No replacement.
  • JUtility::array_unshift_ref() has been removed. No replacement.
  • JUtility:: array_unshift_ref() has been removed. No replacement.

JXMLElement

  • JXMLElement::data() has been removed
  • JXMLElement::getAttribute() has been removed. Use SimpleXMLElement::attributes() instead.

JavaScript

  • Compatibility with MooTools 1.2 has been removed
  • Forms that have name="adminForm" now also require id="adminForm" by default

CMS

Changes to classes

Removed classes

  • All classes extending JElement have been removed

Help

JHelp

  • JHelp::createSiteList() the argument $selected has been removed. It was unused.