Commit 6d7badc2 authored by Marc Bastian Heinrichs's avatar Marc Bastian Heinrichs Committed by Felix Oertel
Browse files

[TASK] Remove deprecated methods & properties

Removes deprecated methods which are annonced to
be removed in Extbase 1.5.0

Change-Id: I9268903a5cdb3bbf541b161f9e36b09b8aace268
Resolves: #35872
Releases: 6.0
parent 03db4eaa
...@@ -98,7 +98,6 @@ class Tx_Extbase_Core_Bootstrap { ...@@ -98,7 +98,6 @@ class Tx_Extbase_Core_Bootstrap {
$this->initializeCache(); $this->initializeCache();
$this->initializeReflection(); $this->initializeReflection();
$this->initializePersistence(); $this->initializePersistence();
$this->initializeBackwardsCompatibility();
} }
/** /**
...@@ -180,19 +179,6 @@ class Tx_Extbase_Core_Bootstrap { ...@@ -180,19 +179,6 @@ class Tx_Extbase_Core_Bootstrap {
$this->persistenceManager = $this->objectManager->get('Tx_Extbase_Persistence_Manager'); // singleton $this->persistenceManager = $this->objectManager->get('Tx_Extbase_Persistence_Manager'); // singleton
} }
/**
* Initializes the backwards compatibility. This is necessary because the
* old Dispatcher provided several static methods.
*
* @return void
* @see initialize()
*/
protected function initializeBackwardsCompatibility() {
$dispatcher = t3lib_div::makeInstance('Tx_Extbase_Dispatcher');
$dispatcher->injectConfigurationManager($this->configurationManager);
$dispatcher->injectPersistenceManager($this->persistenceManager);
}
/** /**
* Runs the the Extbase Framework by resolving an appropriate Request Handler and passing control to it. * Runs the the Extbase Framework by resolving an appropriate Request Handler and passing control to it.
* If the Framework is not initialized yet, it will be initialized. * If the Framework is not initialized yet, it will be initialized.
......
<?php
/***************************************************************
* Copyright notice
*
* (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* This class was the main entry point for extbase extensions before v1.3.0. It was replaced by the class
* Tx_Extbase_Bootstrap in combination with the class Tx_Extbase_MVC_Dispatcher to separate responsibilities.
*
* The use of static functions is deprecated since 1.3.0 and will be removed in 1.5.0.
*
* @package Extbase
* @version $ID:$
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
* @see Tx_Extbase_Bootstrap, Tx_Extbase_MVC_Dispatcher
*/
class Tx_Extbase_Dispatcher {
/**
* @var Tx_Extbase_Configuration_ConfigurationManagerInterface
*/
protected static $configurationManager;
/**
* @var Tx_Extbase_Persistence_Manager
*/
protected static $persistenceManager;
/**
* Injects the Configuration Manager
*
* @param Tx_Extbase_Configuration_ConfigurationManagerInterface An instance of the Configuration Manager
* @return void
*/
public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) {
self::$configurationManager = $configurationManager;
}
/**
* Injects the Persistence Manager
*
* @param Tx_Extbase_Persistence_Manager An instance of the Persistence Manager
* @return void
*/
public function injectPersistenceManager(Tx_Extbase_Persistence_Manager $persistenceManager) {
self::$persistenceManager = $persistenceManager;
}
/**
* Returns the Configuration Manager.
*
* @return Tx_Extbase_Configuration_Manager An instance of the Configuration Manager
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
*/
static public function getConfigurationManager() {
t3lib_div::logDeprecatedFunction();
return self::$configurationManager;
}
/**
* Returns the Persistance Manager
*
* @return Tx_Extbase_Persistence_Manager An instance of the Persistence Manager
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
*/
static public function getPersistenceManager() {
t3lib_div::logDeprecatedFunction();
return self::$persistenceManager;
}
/**
* Returns the settings of Extbase
*
* @return array The configuration for the Extbase framework
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
*/
static public function getExtbaseFrameworkConfiguration() {
t3lib_div::logDeprecatedFunction();
return self::$configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
}
}
?>
\ No newline at end of file
...@@ -226,19 +226,6 @@ class Tx_Extbase_Domain_Model_FrontendUser extends Tx_Extbase_DomainObject_Abstr ...@@ -226,19 +226,6 @@ class Tx_Extbase_Domain_Model_FrontendUser extends Tx_Extbase_DomainObject_Abstr
$this->usergroup->detach($usergroup); $this->usergroup->detach($usergroup);
} }
/**
* Returns the usergroups. Keep in mind that the property is called "usergroup"
* although it can hold several usergroups.
*
* @return Tx_Extbase_Persistence_ObjectStorage An object storage containing the usergroup
* @api
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0 - use Tx_Extbase_Domain_Model_FrontendUser::getUsergroup() instead
*/
public function getUsergroups() {
t3lib_div::logDeprecatedFunction();
return $this->usergroup;
}
/** /**
* Returns the usergroups. Keep in mind that the property is called "usergroup" * Returns the usergroups. Keep in mind that the property is called "usergroup"
* although it can hold several usergroups. * although it can hold several usergroups.
......
...@@ -66,22 +66,6 @@ class Tx_Extbase_MVC_Controller_FlashMessages implements t3lib_Singleton { ...@@ -66,22 +66,6 @@ class Tx_Extbase_MVC_Controller_FlashMessages implements t3lib_Singleton {
t3lib_FlashMessageQueue::addMessage($flashMessage); t3lib_FlashMessageQueue::addMessage($flashMessage);
} }
/**
* Get all flash messages currently available.
*
* @return array<string> An array of flash messages
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0. Use Use getAllMessages() instead
*/
public function getAll() {
t3lib_div::logDeprecatedFunction();
$flashMessages = t3lib_FlashMessageQueue::getAllMessages();
$messages = array();
foreach ($flashMessages as $flashMessage) {
$messages[] = $flashMessage->getMessage();
}
return $messages;
}
/** /**
* Get all flash messages currently available. * Get all flash messages currently available.
* *
...@@ -103,22 +87,6 @@ class Tx_Extbase_MVC_Controller_FlashMessages implements t3lib_Singleton { ...@@ -103,22 +87,6 @@ class Tx_Extbase_MVC_Controller_FlashMessages implements t3lib_Singleton {
t3lib_FlashMessageQueue::getAllMessagesAndFlush(); t3lib_FlashMessageQueue::getAllMessagesAndFlush();
} }
/**
* Get all flash messages currently available and delete them afterwards.
*
* @return array<string>
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0. Use getAllMessagesAndFlush() instead
*/
public function getAllAndFlush() {
t3lib_div::logDeprecatedFunction();
$flashMessages = t3lib_FlashMessageQueue::getAllMessagesAndFlush();
$messages = array();
foreach ($flashMessages as $flashMessage) {
$messages[] = $flashMessage->getMessage();
}
return $messages;
}
/** /**
* Get all flash messages currently available. And removes them from the session. * Get all flash messages currently available. And removes them from the session.
* *
......
...@@ -182,19 +182,6 @@ class Tx_Extbase_MVC_Web_Request extends Tx_Extbase_MVC_Request { ...@@ -182,19 +182,6 @@ class Tx_Extbase_MVC_Web_Request extends Tx_Extbase_MVC_Request {
return $this->hmacVerified; return $this->hmacVerified;
} }
/**
* Returns the data array of the current content object
*
* @return array data of the current cObj
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0. Use the ConfigurationManager to retrieve the current ContentObject
* @author Bastian Waidelich <bastian@typo3.org>
*/
public function getContentObjectData() {
t3lib_div::logDeprecatedFunction();
$contentObject = $this->configurationManager->getContentObject();
return $contentObject->data;
}
/** /**
* Set if the current request is cached. * Set if the current request is cached.
* *
......
<?php
/***************************************************************
* Copyright notice
*
* (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
* All rights reserved
*
* This class is a backport of the corresponding class of FLOW3.
* All credits go to the v5 team.
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Implementation of the default Extbase Object Manager
*
* @package Extbase
* @subpackage Object
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
* @see Tx_Extbase_Object_ObjectManagerInterface, Tx_Extbase_Object_ObjectManager
*/
class Tx_Extbase_Object_Manager extends Tx_Extbase_Object_ObjectManager {
/**
* Returns a fresh or existing instance of the object specified by $objectName.
*
* Important:
*
* If possible, instances of Prototype objects should always be created with the
* Object Factory's create() method and Singleton objects should rather be
* injected by some type of Dependency Injection.
*
* @param string $objectName The name of the object to return an instance of
* @return object The object instance
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0. Please use Tx_Extbase_Object_ObjectManager instead
*/
public function getObject($objectName) {
t3lib_div::logDeprecatedFunction();
$arguments = array_slice(func_get_args(), 1);
if (in_array('t3lib_Singleton', class_implements($objectName))) {
$object = $this->get($objectName, $arguments);
} else {
$object = $this->create($objectName, $arguments);
}
return $object;
}
}
?>
\ No newline at end of file
...@@ -226,17 +226,6 @@ class Tx_Extbase_Persistence_Query implements Tx_Extbase_Persistence_QueryInterf ...@@ -226,17 +226,6 @@ class Tx_Extbase_Persistence_Query implements Tx_Extbase_Persistence_QueryInterf
} }
} }
/**
* Executes the number of matching objects for the query
*
* @return integer The number of matching objects
* @deprecated since Extbase 1.3.0; was removed in FLOW3; will be removed in Extbase 1.5.0; use Query::execute()::count() instead
*/
public function count() {
t3lib_div::logDeprecatedFunction();
return $this->persistenceManager->getObjectCountByQuery($this);
}
/** /**
* Sets the property names to order the result by. Expected like this: * Sets the property names to order the result by. Expected like this:
* array( * array(
......
...@@ -129,14 +129,6 @@ interface Tx_Extbase_Persistence_QueryInterface { ...@@ -129,14 +129,6 @@ interface Tx_Extbase_Persistence_QueryInterface {
*/ */
public function execute(); public function execute();
/**
* Executes the query against the database and returns the number of matching objects
*
* @return integer The number of matching objects
* @deprecated since Extbase 1.3.0; was removed in FLOW3; will be removed in Extbase 1.5.0
*/
public function count();
/** /**
* Sets the property names to order the result by. Expected like this: * Sets the property names to order the result by. Expected like this:
* array( * array(
......
...@@ -42,7 +42,7 @@ class Tx_Extbase_Persistence_QueryResult implements Tx_Extbase_Persistence_Query ...@@ -42,7 +42,7 @@ class Tx_Extbase_Persistence_QueryResult implements Tx_Extbase_Persistence_Query
* We use this unusual behavior of PHP to return the warning below in this case. * We use this unusual behavior of PHP to return the warning below in this case.
* *
* @var string * @var string
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0 * @deprecated since Extbase 1.3.0; will be removed in Extbase 6.0
*/ */
private $warning = 'You should never see this warning. If you do, you probably used PHP array functions like current() on the Tx_Extbase_Persistence_QueryResult. To retrieve the first result, you can use the getFirst() method.'; private $warning = 'You should never see this warning. If you do, you probably used PHP array functions like current() on the Tx_Extbase_Persistence_QueryResult. To retrieve the first result, you can use the getFirst() method.';
......
...@@ -534,14 +534,6 @@ class Tx_Extbase_Persistence_Storage_Typo3DbBackend implements Tx_Extbase_Persis ...@@ -534,14 +534,6 @@ class Tx_Extbase_Persistence_Storage_Typo3DbBackend implements Tx_Extbase_Persis
$operator = $comparison->getOperator(); $operator = $comparison->getOperator();
$operand2 = $comparison->getOperand2(); $operand2 = $comparison->getOperand2();
/**
* This if enables equals() to behave like in(). Use in() instead.
* @deprecated since Extbase 1.3; will be removed in Extbase 1.5
*/
if (($operator === Tx_Extbase_Persistence_QueryInterface::OPERATOR_EQUAL_TO) && (is_array($operand2) || ($operand2 instanceof ArrayAccess) || ($operand2 instanceof Traversable))) {
$operator = Tx_Extbase_Persistence_QueryInterface::OPERATOR_IN;
}
if ($operator === Tx_Extbase_Persistence_QueryInterface::OPERATOR_IN) { if ($operator === Tx_Extbase_Persistence_QueryInterface::OPERATOR_IN) {
$items = array(); $items = array();
$hasValue = FALSE; $hasValue = FALSE;
......
...@@ -198,22 +198,6 @@ class Tx_Extbase_Reflection_ObjectAccess { ...@@ -198,22 +198,6 @@ class Tx_Extbase_Reflection_ObjectAccess {
return TRUE; return TRUE;
} }
/**
* Returns an array of properties which can be get/set with the getProperty
* and setProperty methods.
* Includes the following properties:
* - which can be set through a public setter method.
* - public properties which can be directly set.
*
* @param object $object Object to receive property names for
* @return array Array of all declared property names
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0. Please use getGettablePropertyNames() instead
*/
static public function getAccessiblePropertyNames($object) {
t3lib_div::logDeprecatedFunction();
return self::getGettablePropertyNames($object);
}
/** /**
* Returns an array of properties which can be get with the getProperty() * Returns an array of properties which can be get with the getProperty()
* method. * method.
...@@ -280,19 +264,6 @@ class Tx_Extbase_Reflection_ObjectAccess { ...@@ -280,19 +264,6 @@ class Tx_Extbase_Reflection_ObjectAccess {
return $propertyNames; return $propertyNames;
} }
/**
* Get all properties (names and their current values) of the current
* $object that are accessible through this class.
*
* @param object $object Object to get all properties from.
* @return array Associative array of all properties.
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0. Please use getGettableProperties() instead
*/
static public function getAccessibleProperties($object) {
t3lib_div::logDeprecatedFunction();
return self::getGettableProperties($object);
}
/** /**
* Tells if the value of the specified property can be set by this Object Accessor. * Tells if the value of the specified property can be set by this Object Accessor.
* *
......
...@@ -279,48 +279,6 @@ tt_content.' . $pluginSignature . ' { ...@@ -279,48 +279,6 @@ tt_content.' . $pluginSignature . ' {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['typeConverters'][] = $typeConverterClassName; $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['typeConverters'][] = $typeConverterClassName;
} }
/**
* Returns a given CamelCasedString as an lowercase string with underscores.
* Example: Converts BlogExample to blog_example, and minimalValue to minimal_value
*
* @param string $string
* @return mixed
* @see t3lib_div::underscoredToLowerCamelCase()
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
*/
static public function convertCamelCaseToLowerCaseUnderscored($string) {
t3lib_div::logDeprecatedFunction();
return t3lib_div::camelCaseToLowerCaseUnderscored($string);
}
/**
* Returns a given string with underscores as lowerCamelCase.
* Example: Converts minimal_value to minimalValue
*
* @param string $string
* @return mixed
* @see t3lib_div::underscoredToLowerCamelCase()
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
*/
static public function convertUnderscoredToLowerCamelCase($string) {
t3lib_div::logDeprecatedFunction();
return t3lib_div::underscoredToLowerCamelCase($string);
}
/**
* Returns a given string with underscores as UpperCamelCase.
* Example: Converts blog_example to BlogExample
*
* @param string $string
* @return string
* @see t3lib_div::underscoredToUpperCamelCase()
* @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
*/
static public function convertLowerUnderscoreToUpperCamelCase($string) {
t3lib_div::logDeprecatedFunction();
return t3lib_div::underscoredToUpperCamelCase($string);
}
/** /**
* Build the autoload registry for a given extension and place it ext_autoload.php. * Build the autoload registry for a given extension and place it ext_autoload.php.
* *
......
<?php
/***************************************************************
* Copyright notice
*
* (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
* All rights reserved
*
* This class is a backport of the corresponding class of FLOW3.
* All credits go to the v5 team.
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Was the base testcase for the Extbase extension.
* Use Tx_Extbase_Tests_Unit_BaseTestCase instead.
* @deprecated since Extbase 1.3; will be removed in Extbase 1.5
*/
abstract class Tx_Extbase_BaseTestCase extends Tx_Extbase_Tests_Unit_BaseTestCase {
}
?>
\ No newline at end of file
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
$extensionClassesPath = t3lib_extMgm::extPath('extbase') . 'Classes/'; $extensionClassesPath = t3lib_extMgm::extPath('extbase') . 'Classes/';
return array( return array(
'tx_extbase_dispatcher' => $extensionClassesPath . 'Dispatcher.php',
'tx_extbase_exception' => $extensionClassesPath . 'Exception.php', 'tx_extbase_exception' => $extensionClassesPath . 'Exception.php',
'tx_extbase_configuration_abstractconfigurationmanager' => $extensionClassesPath . 'Configuration/AbstractConfigurationManager.php', 'tx_extbase_configuration_abstractconfigurationmanager' => $extensionClassesPath . 'Configuration/AbstractConfigurationManager.php',
'tx_extbase_configuration_backendconfigurationmanager' => $extensionClassesPath . 'Configuration/BackendConfigurationManager.php', 'tx_extbase_configuration_backendconfigurationmanager' => $extensionClassesPath . 'Configuration/BackendConfigurationManager.php',
...@@ -80,7 +79,6 @@ return array( ...@@ -80,7 +79,6 @@ return array(
'tx_extbase_mvc_web_response' => $extensionClassesPath . 'MVC/Web/Response.php', 'tx_extbase_mvc_web_response' => $extensionClassesPath . 'MVC/Web/Response.php',
'tx_extbase_mvc_web_routing_uribuilder' => $extensionClassesPath . 'MVC/Web/Routing/UriBuilder.php', 'tx_extbase_mvc_web_routing_uribuilder' => $extensionClassesPath . 'MVC/Web/Routing/UriBuilder.php',
'tx_extbase_object_exception' => $extensionClassesPath . 'Object/Exception.php', 'tx_extbase_object_exception' => $extensionClassesPath . 'Object/Exception.php',
'tx_extbase_object_manager' => $extensionClassesPath . 'Object/Manager.php',
'tx_extbase_object_objectmanager' => $extensionClassesPath . 'Object/ObjectManager.php', 'tx_extbase_object_objectmanager' => $extensionClassesPath . 'Object/ObjectManager.php',
'tx_extbase_object_objectmanagerinterface' => $extensionClassesPath . 'Object/ObjectManagerInterface.php', 'tx_extbase_object_objectmanagerinterface' => $extensionClassesPath . 'Object/ObjectManagerInterface.php',
'tx_extbase_object_container_classinfo' => $extensionClassesPath . 'Object/Container/ClassInfo.php', 'tx_extbase_object_container_classinfo' => $extensionClassesPath . 'Object/Container/ClassInfo.php',
...@@ -277,7 +275,6 @@ return array( ...@@ -277,7 +275,6 @@ return array(
'tx_extbase_validation_validator_stringvalidator' => $extensionClassesPath . 'Validation/Validator/StringValidator.php', 'tx_extbase_validation_validator_stringvalidator' => $extensionClassesPath . 'Validation/Validator/StringValidator.php',
'tx_extbase_validation_validator_textvalidator' => $extensionClassesPath . 'Validation/Validator/TextValidator.php', 'tx_extbase_validation_validator_textvalidator' => $extensionClassesPath . 'Validation/Validator/TextValidator.php',
'tx_extbase_validation_validator_validatorinterface' => $extensionClassesPath . 'Validation/Validator/ValidatorInterface.php', 'tx_extbase_validation_validator_validatorinterface' => $extensionClassesPath . 'Validation/Validator/ValidatorInterface.php',
'tx_extbase_basetestcase' => $extensionClassesPath . '../Tests/BaseTestCase.php',
'tx_extbase_tests_unit_basetestcase' => $extensionClassesPath . '../Tests/Unit/BaseTestCase.php', 'tx_extbase_tests_unit_basetestcase' => $extensionClassesPath . '../Tests/Unit/BaseTestCase.php',
); );
?> ?>
\ No newline at end of file
<?php <?php
if (!defined ('TYPO3_MODE')) die ('Access denied.'); if (!defined ('TYPO3_MODE')) die ('Access denied.');
require_once(t3lib_extMgm::extPath('extbase') . 'Classes/Dispatcher.php'); require_once(t3lib_extMgm::extPath('extbase') . 'Classes/MVC/Dispatcher.php');
require_once(t3lib_extMgm::extPath('extbase') . 'Classes/Utility/Extension.php'); require_once(t3lib_extMgm::extPath('extbase') . 'Classes/Utility/Extension.php');
// Register caches if not already done in localconf.php or a previously loaded extension. // Register caches if not already done in localconf.php or a previously loaded extension.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment