Actions

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

From Joomla! Documentation

(Created page with "= Platform = == Removed classes == *JParameter and its subclasses (use JForm instead) *JFormFieldEditors (use JFormFieldPlugins instead) *JHtmlImage *JSimpleXML *JPane == Remov...")
 
Line 1: Line 1:
 
= Platform =
 
= 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.
 +
 +
 +
 +
== 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
 +
*JHelp
 +
*JTableContent
 +
 +
=== Classes moved within the platform ===
 +
*JInput (and all subclasses)
 +
*JTable (and all subclasses)
 +
 +
== Renamed classes ==
 +
*JWebClient is now called JApplicationWebClient
  
 
== Removed classes ==
 
== Removed classes ==
*JParameter and its subclasses (use JForm instead)
+
*JParameter (use JForm instead)
 +
*JElement and its subclasses
 
*JFormFieldEditors (use JFormFieldPlugins instead)
 
*JFormFieldEditors (use JFormFieldPlugins instead)
 
*JHtmlImage
 
*JHtmlImage
 
*JSimpleXML
 
*JSimpleXML
 
*JPane
 
*JPane
 
== Removed Methods ==
 
  
 
== Removed Constants ==
 
== Removed Constants ==
 +
*The DS constant has been removed. If you really need it you can use DIRECTORY_SEPARATOR instead
 +
 +
== Changes to classes ==
 +
 +
=== 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 ==
 
== JavaScript ==
 
*Compatibility with MooTools 1.2 has been removed
 
*Compatibility with MooTools 1.2 has been removed
 +
*Forms that have name="adminForm" now also require id="adminForm" by default
  
 
= CMS =
 
= CMS =
 +
 +
== Removed classes ==
 +
*All classes extending JElement have been removed

Revision as of 09:06, 11 February 2012

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.


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
  • JHelp
  • JTableContent

Classes moved within the platform

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

Renamed classes

  • JWebClient is now called JApplicationWebClient

Removed classes

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

Removed Constants

  • The DS constant has been removed. If you really need it you can use DIRECTORY_SEPARATOR instead

Changes to classes

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

Removed classes

  • All classes extending JElement have been removed