* Raising Version number to 1.3.0.
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / ChangeLog.txt
1 ChangeLog for Extbase
2 =====================
4 Changes for 1.3.0:
5 ==================
6 included in TYPO3 4.5.0 LTS.
8 This release fixes an important bug in the persistence layer, which caused related objects not to be updated.
10 Full Changes for 1.3.0:
11 =======================
13 [+BUGFIX] Extbase (Tests): reset added t3lib_div instances in UriBuilder & Extension tests
14 [+BUGFIX] Extbase (Persistence): Fixed updating of related objects. Thanks to Björn Steinbrück and Bastian Waidelich for digging into this issue. Resolves #9270, #9182, #10211.
15 This is the second attempt after having reverted the first one in r3920. The patch includes some clean-up. Important additional changes:
16 * The objects within an ObjectStorage are now added to the queue. This is necessary to persist changes made to those contained objects without having changed the composition of objects.
17 * Moved the _memorizeCleanState() from the AbstractEntity to the AbstractDomainObject. In theory ValueObjects are immutable, but we need this as sometimes ValueObjects are stored in two steps (1. to get a UID, 2. to persist its properties). Maybe we have to recheck this for 1.4.
18 * Fixed some possible problems with detecting an ObjectStorage (namely SplObjectStorage->getUid()).
19 [+TASK] Extbase (Persistence): Added two properties to describe a weird PHP behavior if calling current() on an ObjectStorage.
20 [+BUGFIX] Extbase (MVC): Fixed argument order of Tx_Extbase_Utility_Extension::isActionCacheable() call in UriBuilder
21 [+TASK] Extbase (DomainObject): Added setPid() and getPid() to the DomainObjectInterface and removed the "final" keyword.
22 [~TASK] Extbase: Moved isActionCacheable() from UriBuilder to Utility/Extension helper class
23 Moved the protected method to a public static functions in Tx_Extbase_Utility_Extension
24 and added respective unit tests.
25 Note: We're not happy with all the public static functions in Utility/Extension.php
26 but that's currently the place for those helper functions.
27 [+TASK] Extbase (Utility): implemented validation of arguments passed to sql statements in Tx_Extbase_Utility_Cache. (resolves #11978)
29 Changes for 1.3.0 RC1:
30 ======================
31 included in TYPO3 4.5.0 RC1.
33 This release features many bugfixes, in the following areas:
34 * Persistence - invalid SQL has been fixed at various places
35 * MVC - the URI Builder can now handle cached / uncached actions correctly
36 * Improved error handling to catch some configuration errors
37 * Localization - TypoScript overrides for locallang keys with dot inside now works (_LOCAL_LANG.foo.bar)
38 * Persistence - added "pid" property and getter and setter to AbstractDomainModel; thus you can now move
39 domain objects to different pages. However, this feature has *no support for workspaces* yet.
40 * Dependency Injection - now allows the injection of prototypes (see below)
41 * Configuration - for defining the Storage PID, one can use arbitary TypoScript objects (see below)
43 Dependency Injection Improvements
44 ---------------------------------
46 Now, Prototype objects are allowed to be injected into other objects. This means the following cases
47 are supported:
49 * Singletons which need Singletons (most common)
50 * Singletons which need Prototypes (very uncommon,
51 as it usually hints at the fact that the injected
52 prototype should be a singleton). In this case,
54 * Prototypes which need Singletons
55 * Prototypes which need Prototypes
57 TypoScript Storage PID Improvements
58 -----------------------------------
60 The persistence.storagePid now has stdWrap properties so the storagePid can be set dynamically.
61 Now follows an example for use in the Frontend:
62 plugin.tx_extkey.persistence.storagePid.cObject = TEXT
63 plugin.tx_extkey.persistence.storagePid.cObject.value = 8,3
64 ... and this is how you can use it in the backend:
65 module.tx_extkey.persistence.storagePid.cObject = TEXT
66 module.tx_extkey.persistence.storagePid.cObject.value = 8,3
68 Full Changes for 1.3.0 RC1:
69 ===========================
70 [+BUGFIX] Extbase (Object): constructor injection now works if default value for a dependency is NULL. Thanks to Lienhart Woitok! Resolves #11623
71 [+BUGFIX] Extbase (Object): Allow injection of prototypes via dependency injection. Resolves #12013
72 [+BUGFIX] Extbase (Persistence): Use sql_free_result() in Typo3DbBackend to free result memory. Resolves #10957
73 [~BUGFIX] Extbase (Persistence): fixed an wrong referenced exception (resolves #12403)
74 [~BUGFIX] Extbase (Persistence): make Tx_Extbase_Persistence_Repository::remove() handle freshly created objects right. (resolves #11128)
75 [+BUGFIX] Extbase (MVC): UriBuilder automatically added a cHash even on links to nonCacheable actions where this is not needed/recommended (resolves #8565)
76 [~BUGFIX] Extbase (Persistence): made union statement on comma seperated list use find_in_set (Thanks to Marc Bastian Heinrichs) (resolves #9772)
77 [~FOLLOWUP] Extbase (Utility): allow clearPageCache() to clear single, multiple and all pageCaches. (resolves 11978)
78 [+TASK] Extbase (Utility): allow clearPageCache() to clear single, multiple and all pageCaches.
79 [+BUGFIX] Extbase (MVC): Improve Error Handling in Request Builder. Resolves #11302
80 [+BUGFIX] Extbase (Persistence): remove superfluous require_once statements. Thanks to Oliver Klee. Resolves #12324
81 [+BUGFIX] Extbase (Tests): Remove require_once of phpunit testclasses. Thanks to Oliver Klee. Resolves #12323
82 [+BUGFIX] Extbase (Utility): Make _LOCAL_LANG override work with dots. Thanks to Thomas Maroschik. Resolves #12121
83 [+BUGFIX] Extbase (Persistence): Fixed using the correct columnname for contains comparison with RELATION_HAS_MANY and empty parentKeyFieldName. Resolves #11048
84 [+BUGFIX] Extbase (Persistence): Added the missing pid property to the AbstractDomainModel. Related to #11361
85 [+BUGFIX] Extbase (Persistence): Language Oberlay now works with page table as well. Thanks to Andre Stoesel. Resolves #11319
86 [+BUGFIX] Extbase (Persistence): The QueryObject gets cloned now in the getFirst() method of the QueryResult (as it was intended). Thanks to Sebastian Fischer. Resolves #11855.
87 [+BUGFIX] Extbase (Bootstrap): Bootstrap calls initialize on reflectionService if it's already initialized. Resolves #12346, resolves #12156
88 [+BUGFIX] Extbase (Persistence): Fix equals constraint with $caseSensitive FALSE (closing bracket missing). Thanks to Alexander Berl. Resolves #10781
89 [+BUGFIX] Extbase (Reflection): ObjectAccess::isPropertyGettable works for ArrayAccess objects. Resolves #10148
90 [+BUGFIX] Extbase (Configuration): Allow StoragePid to be manually defined by TS. Thanks to Rens Admiraal! Resolves #8397
91 [+BUGFIX] Extbase (Configuration): Fix warning in AbstractConfigurationManager. Resolves #11631
92 [+BUGFIX] Extbase (Object): Disabling Dependency Injection for injectSettings method. Resolves #11011
95 Changes for 1.3.0 Beta 4:
96 =========================
97 included in TYPO3 4.5.0 Beta 4.
99 This release contains numerous bugfixes, and a few small features:
101 * Tx_Extbase_Utility_Extension::registerPlugin() now has a fourth parameter $pluginIconPathAndFilename
102 that you can set to the path of an icon, that will be displayed in the plugin dropdown in the backend.
103 You can use it like:
104 Tx_Extbase_Utility_Extension::registerPlugin(
105 $_EXTKEY,
106 'MyPlugin',
107 'My Plugin description',
108 t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Icons/someIcon.gif'
109 );
110 * Hidden Records in Workspaces now work
111 Before, if t3lib_pageSelect::getRecordOverlay returned FALSE (if
112 no translation is found), a fatal error occured:
113 PHP Catchable Fatal Error: Argument 2 passed to Tx_Extbase_Persistence_Mapper_DataMapper::getTargetType()
114 must be an array, boolean given, called in Persistence/Mapper/DataMapper.php
116 Full Changes for 1.3.0 Beta 4:
117 ==============================
119 [+TASK] Extbase (Tests): Fixed a repository unit test so that it works in CLI mode
120 [+TASK] Extbase (Tests): Fixed Extbase unit tests
121 [+BUGFIX] Extbase (Persistence): Hidden Records in Workspaces now work
122 [~TASK] Extbase: Fixed line endings (Windows to Unix).
123 [~TASK] Fluid (Tests): Fixed some more testcase class names and some unit tests
124 [+FEATURE] Extbase (Utility): Add support for custom specify custom plugin icon. Resolves #11179
126 Changes for 1.3.0 Beta 3:
127 =========================
128 included in TYPO3 4.5.0 Beta 3.
130 This release features numerous stability improvements, the biggest one
131 being a re-written core of the Object Manager, such that Lifecycle Methods
132 are supported now. This means, that a method "initializeObject()" gets called
133 as soon as all dependencies are injected and initialized.
135 Additionally, Extbase didn't work in all cases in the TYPO3 Backend. This has
136 also been improved, so Extbase (again) works in the backend
137 with an empty page tree.
139 Full Changes for 1.3.0 Beta 3:
140 =============================
142 [+BUGFIX] Extbase (Tests): Fixed Tx_Extbase_MVC_Controller_AbstractController_testcase. Thanks to Oliver Klee. Resolves #11567.
143 [BUGFIX] Extbase (Configuration): Make Extbase work again in Backend
144 [!!!][+TASK] Extbase (Object): Rewritten Object Container
145 [+BUGFIX] Extbase (MVC): Improve Exception message
146 If one misses the @dontvalidate annotation, he will
147 get a strange error which does not have a hint that
148 the @dontvalidate is missing. Now, the exception message
149 is extended.
150 [+API] Extbase (Configuration): Adding getContentObject to API
151 [+TASK] Extbase (Reflection): Added deprecation annotation to ObjectAccess::getAccessiblePropertyNames()
152 To stay in sync with FLOW3, the methods getAccessibleProperties() and getAccessiblePropertyNames() to
153 getGettableProperties() and getGettablePropertyNames().
154 For compatibility reasons the old methods will stay in Extbase until version 1.5.
155 Note: you can now check wheter properties are settable as well
156 [+FEATURE] Extbase (Reflection): Tx_Extbase_Reflection_ObjectAccess supports stdClass objects now
157 I've backported the ObjectAccess class and its unit tests from FLOW3.
158 Note: FLOW3's implementation allows to specify a third argument for the
159 method getPropertyPath() in order to support Closures.
160 This part is not backported as it's not compatible with PHP < 5.3.
162 Changes for 1.3.0 Beta 2a:
163 ==========================
164 included in TYPO3 4.5.0 Beta 2.
166 This release includes a whole bunch of bugfixes and refactorings, the most important ones listed below.
167 Because the FlashMessages now use t3lib_FlashMessage, TYPO3 4.5 is MANDATORY!
169 The main changes are:
171 * Tx_Extbase_MVC_Controller_FlashMessages now internally uses the
172 t3lib_FlashMessageQueue that has been introduced with TYPO3 4.3.
173 This results in following changes:
174 - flashmessages are now treated globally, not in a per-extension-scope. As soon as you output the messages first, the session will be flushed
175 - a flashmessage is not a simple strings anymore, but consists of
176 message body and (optionally) title & severity.
177 You can specify title and severity like this:
178 $this->flashMessages->add('Your message', 'some title', t3lib_FlashMessage::WARNING);
179 - you can now output flashmessages in backend that were set from other TYPO3 classes
180 - a revised flashmessage ViewHelper allows you to render flashmessages in the style
181 of core flashmessages now (see Fluid changelog)
182 - Resolves #10821
183 * Configuration Manager can now deal with recurring FlexForm Sections (#6067)
184 * Fixed Tx_Extbase_Domain_Model_FrontendUser (and marked the old API as deprecated)
185 * Bugfixes related to Lazy Loading
187 Full Changes for 1.3.0 Beta 2a:
188 ==============================
189 [+BUGFIX] Extbase (Configuration): change the order of methods to determine the current pageId for backend modules, which is used to fetch the TS framework configuration. Fixes #11205
190 [+TASK] Extbase (Object): Make sure the class info cache is returning valid objects
191 [+BUGFIX] Extbase (Persistence): Persistence_Backend::getIdentifierByObject should work with LazyLoadingProxy
192 getIdentifierByObject should check if object is an instance of Tx_Extbase_Persistence_LazyLoadingProxy and should return the
193 identifier of the real object.
194 [+BUGFIX] Extbase (Configuration): slightly tweaked FrontendConfigurationManager (basically replaced explode() by t3lib_div::trimExplode() call)
195 [+TASK] Extbase (Tests): Added some unit tests for Backend- and FrontendConfigurationManager. To be continued
196 [+BUGFIX] Extbase (DomainObject): added default __toString method to Tx_Extbase_DomainObject_AbstractDomainObject. Thanks to Marco Huber. Resolves #8083
197 [+BUGFIX] Extbase (MVC): Fixed UriBuilder for handling LazyLoadingProxy objects as arguments. Resolves #10705
198 [+TASK] Extbase (Object): re-added Tx_Extbase_Object_Manager to gain more backwards compatibility. This class is marked deprecated and will be removed in Extbase 1.5
199 [+BUGFIX] Extbase (Tests): tweaked ObjectContainer tests. Tests are failing deliberately for now
200 The DI implementation has to be rewritten, as discussed.
201 This relates to: #11160
202 [+BUGFIX] Extbase (Domain): fixed (non-breaking) method name for getting usergroup in Tx_Extbase_Domain_Model_FrontendUser. Resolves #11019
203 [+TASK] extbase (ConfigurationManager): Made FrontendConfigurationManager parse recurring sections in flexforms right. Thanks to Franz Koch (resolves #6067)
204 [+BUGFIX] Extbase (Configuration): Slightly tweaked AbstractConfigurationManager
205 [+TASK] Extbase (Tests): Added unit tests for AbstractConfigurationManager
206 Note: the ConfigurationManager now always overrides switchableControllerActions
207 when retrieving configuration for the current plugin. Before that only happened
208 when no extensionName/pluginName was specified.
209 Additionally: It's not possible anymore to specify new controllers in
210 switchableControllerAction configuration. That was the intended behavior.
211 [+TASK] Extbase (Tests): Renamed test files from "*_testcase.php" to "*Test.php"
212 [+TASK] Extbase (Tests): Moving all Tests in "Unit" directory.
213 [+FEATURE] Extbase (MVC): add possibility to output FlashMessageQueue (Resolves #10821)
214 [+TASK] Extbase (Persistence): counting query results does not work with limit constraints (resolves #10956) Tx_Extbase_Persistence_Storage_Typo3DbBackend::getObjectCountByQuery() replaces the SELECT part
215 of a query by COUNT(*) before executing a statement.
216 This did not work as expected in some cases, e.g. the LIMIT constraint was ignored by the count query.
217 [+TASK] Extbase (Persistence): findOneBy*() methods should return NULL if no item was found (Resolves #10958)
218 [+TASK] Extbase (Core): Slightly improved error handling in bootstrap (Resolves #11055)
219 [~TASK] Extbase (Utility): Changed Tx_Extbase_Utility_TypoScript:convertPlainArrayToTypoScriptArray to self::convertPlainArrayToTypoScriptArray. Resolves #10538.
220 [+BUGFIX] Extbase (MVC): UriBuilder: use current plugin if no pluginName has been specified
221 If multiple plugins are found, that are configured to handle the specified action, Extbase
222 will throw an Exception. Now, this only happens if the *current* plugin does not contain
223 the action.
225 Changes for 1.3.0 Beta 1a:
226 ==========================
227 included in TYPO3 4.5.0 Beta 1.
229 Extbase 1.3.0 Beta 1 has a lot new and greatly improved features, and also many bugfixes.
230 The highlights are outlined below, and explained in-depth a little further down.
232 NOTE: This release brings new table definitions, so please visit the install tool or the Extension
233 Manager and update the tables of Extbase.
237 * Dependency Injection
238 * Dispatcher Refactoring & Completely re-done Configuration Manager
239 This means that Tx_Extbase_Dispatcher is now DEPRECATED!
240 Additionally, if you defined the TypoScript setup for a plugin by hand (which you should not),
241 the syntax has changed a bit there.
242 * QueryResult refactoring (needed for Fluid Widgets)
245 Additionally, the following smaller features were implemented:
247 * Configurable plugin namespaces (#8365)
248 * Automatic target page determination (#9121)
249 * Improved resolveView() mechanism
250 * Allowing plugins to be registered as new content element (#10666)
251 * Default Orderings & QuerySettings (#10319)
253 Breaking Changes:
255 * The UriBuilder now uses the current cObject instead of creating a new instance in the constructor. This is a breaking change if you instantiated the UriBuilder in your code. Please use the Extbase ObjectManager or inject the ConfigurationManager manually.
256 * fixed typo in getter and setter of Tx_Extbase_Domain_Model_FrontendUser::lastlogin
257 * Flashmessages now share a scope throughout the extension. Before, every plugin had it's own scope leading to the messages only being output when entering the same plugin again (e.g. redirecting from one plugin to another would never display the messages)
259 Known issues:
261 * The Unit Tests do not fully work again, we will fix that in the next days.
262 * There might be still issues with the support of backend modules, we are working on that!
264 Dependency Injection
265 --------------------
267 Instead of creating objects through t3lib_div::makeInstance, and connecting them together manually,
268 you yan now use Dependency Injection (DI) for that. Let's give an example: If my class "Tx_Foo_Controller_MyController"
269 needs another class "Tx_Foo_Service_LoggingService", it can get an instance of the logging service
270 by Dependency Injection, by specifying the following code:
272 class Tx_Foo_Controller_MyController {
273 protected $loggingService;
275 /**
276 * @param Tx_Foo_Service_LoggingService $loggingService
277 */
278 public function injectLoggingService(Tx_Foo_Service_LoggingService $loggingService) {
279 $this->loggingService = $loggingService;
280 }
281 }
283 The DI container finds that the class "MyController" has an method whose name starts with "inject",
284 and thus passes the logging service to MyController.
285 It is important that you can *only retrieve Singletons* through the inject annotations. If you need
286 to instanciate a prototype object, it is important to *not* use t3lib_div::makeInstance() anymore
287 (as it bypasses the DI container), but instead you need to inject the ObjectManager, and ask it
288 to create your prototype object using the create() method. Example:
290 class Tx_Foo_Controller_MyController {
291 protected $logFile;
293 /**
294 * @param Tx_Extbase_Object_ObjectManagerInterface $objectManager
295 */
296 public function injectObjectManager(Tx_Extbase_Object_ObjectManagerInterface $objectManager) {
297 $this->logFile = $objectManager->create('Tx_Foo_Domain_Model_LogFile');
298 }
299 }
301 In the above example, you have seen that we reference not the concrete implementation *ObjectManager*,
302 but instead the *ObjectManagerInterface*. If a name ends with "...Interface", Extbase DI automatically
303 strips away the "Interface" from the name, and expects to find a concrete implementation of that interface.
304 This is generally a very good practice: For your core classes, you should always reference an *interface*,
305 and let the DI container instanciate the concrete class.
307 Additionally, Extbase DI allows to *replace* certain implementation classes by other classes through
308 configuration in TypoScript. Let's give an example, and then you can see the concept:
310 config.tx_extbase.objects {
311 Tx_Extbase_Persistence_Storage_BackendInterface {
312 className = Tx_Extbase_Persistence_Storage_Typo3DbBackend
313 }
314 }
316 This essentially means to the DI container: "At all places where you encounter a "BackendInterface",
317 you should instanciate the "Typo3DbBackend" class."
319 However, note that this setting can only be configured *globally* right now, it is not possible
320 to override that on a per-extension basis.
322 Generally, the Extbase DI container provides a subset of the functionality of FLOW3's dependency injection.
324 Dispatcher Refactoring & Completely re-done Configuration Manager
325 -----------------------------------------------------------------
327 In the last versions of Extbase, the Dispatcher (Tx_Extbase_Dispatcher) was the main entry point to Extbase.
328 However, as we did not have Dependency Injection at that point, it became really complex and did lots of things
329 which it should not do in the first place. That's why we greatly improved that part. Now, any Extbase extension
330 is invoked using the Tx_Extbase_Core_Bootstrap. Additionally, the TypoScript used for the registration of any
331 Extbase extension has been cleaned up and adjusted:
333 lib.foo = USER
334 lib.foo {
335 userFunc = tx_extbase_core_bootstrap->run
336 extensionName = YourExtension
337 pluginName = YourPlugin
338 }
340 Additionally, you can also override the list of Switchable Controller Actions through TypoScript:
342 lib.foo = USER
343 lib.foo {
344 userFunc = tx_extbase_core_bootstrap->run
345 extensionName = YourExtension
346 pluginName = YourPlugin
347 switchableControllerActions {
348 Standard {
349 1 = action2
350 2 = action3
351 }
352 }
353 }
355 Of course, you cannot call actions which were not defined previously in the plugin; so the Switchable
356 Controller Actions in TypoScript can be only used to shrink the number of actions available.
358 NOTE: If you manually defined the above snippet, notice that there is a NON-BACKWARDS-COMPATIBLE change
359 in there. But you did that at your own risk, as that was never public API ;)
361 If you used Tx_Extbase_Dispatcher before in your own code, it should still work, but it is deprecated.
362 Instead, instead
364 OLD: Tx_Extbase_Dispatcher::getConfigurationManager()
365 NEW: inject Tx_Extbase_Configuration_ConfigurationManagerInterface into your class
367 OLD: Tx_Extbase_Dispatcher::getPersistenceManager()
368 NEW: inject Tx_Extbase_Persistence_ManagerInterface into your class
370 OLD: Tx_Extbase_Dispatcher::getExtbaseFrameworkConfiguration()
371 NEW: inject Tx_Extbase_Configuration_ConfigurationManagerInterface into your class,
372 and call $configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
373 on the ConfigurationManager.
375 Please note that the Configuration Manager is STILL NO PUBLIC API, and its method signature has also changed.
377 QueryResult refactoring (needed for Fluid Widgets)
378 --------------------------------------------------
380 Before this change, a call of $query->execute() inside a repository immediately executed the query and
381 returned the result as array.
382 Now, queries are executed lazily at the first moment where you really need them. This means that $query->execute()
383 returns an object of type Tx_Extbase_Persistence_QueryResultInterface, which behaves like an array, meaning you
384 can use foreach() to loop over the query result.
385 However, due to an inconsistency of PHP, the array_* methods, and the iteration methods like current(),
386 next(), ... do NOT work on objects which implement ArrayAccess -- that's the reason why the QueryResult
387 refactoring is a breaking change.
389 Now, however, the following is possible:
390 * Return the first query result: $query->execute()->getFirst()
391 * Get the underlying query: $query->execute()->getQuery()
392 * Convert the result to array: $query->execute()->toArray()
394 This change is a prerequisite for Fluid Widgets to work. See the Fluid ChangeLog for details.
397 Configurable Plugin Namespaces
398 ------------------------------
400 By default each Extbase plugin has a unique URI prefix to avoid collisions with other plugins on your website.
401 This so called plugin namespace usually has the format tx_yourextension_yourplugin.
402 With Extbase 1.3 it is possible to override this namespace. This comes in handy if want to interact with 3rd party
403 extensions, for example with tt_news:
405 plugin.tx_yourextension.view.pluginNamespace = tx_ttnews
407 This sets the plugin namespace of all your plugins inside the extension to "tx_ttnews", making it possibl
408 to directly access tt_news parameters in your controller:
410 /**
411 * @param integer $tt_news tt_news Article uid
412 * @return void
413 */
414 public function yourAction($tt_news) {
415 // interact with $tt_news uid
416 }
418 This works with automatic mapping to Domain models too of course:
420 /**
421 * @param Tx_YourExtension_Domain_Model_NewsArticle $tt_news tt_news Article
422 * @return void
423 */
424 public function yourAction(Tx_YourExtension_Domain_Model_NewsArticle $tt_news) {
425 // interact with $tt_news object
426 }
428 You can also override the plugin namespace for a single instance by adding the section <view.pluginNamespace> to your
429 plugin FlexForm.
432 Automatic target page determination
433 -----------------------------------
435 In TYPO3 v5 we won't have the notion of page uids. To accustom developers to this change, we're trying to free you from
436 the need to specify target pages from within your Extension. Of course you can put all your functionality into one fully
437 fledged plugin, then you won't have to deal with target pages as the current page is used by default.
439 But sometimes you want to be able to change the surrounding contents of a special view of your extension (e.g. the
440 subcontent column of a details page). As before you can still specify the target page explicitly like:
442 <f:link.action action="foo" pageUid="123" />
444 With Extbase 1.3 you can also use a new feature called "automatic target page determination". It is disabled by default,
445 but you can enable it with the following TypoScript:
447 plugin.tx_yourextension.view.defaultPid = auto
449 Then Extbase will search the page tree for a plugin that is configured to handle the specified action and you can omit
450 the "pageUid" parameter in your links. Of course, this does not work if you use the same plugin multiple times in your
451 page tree. In this case you can override the default page ID for the respective plugins:
453 plugin.tx_yourextension_yourplugin.view.defaultPid = 123
455 Note: By default this feature is not activated, because that would be a breaking change in some cases
458 Improved resolveView() mechanism
459 --------------------------------
461 Another feature we backported from FLOW3 is the improved view resolving.
462 You can now change the default view implementation *per format* by inserting the following line in your Controller:
464 protected $viewFormatToObjectNameMap = array(
465 'json' => 'Tx_YourExtension_View_JsonView',
466 'html' => 'Tx_YourExtension_View_HtmlView'
467 );
470 Allowing plugins to be registered as new content element
471 --------------------------------------------------------
473 This is done using an additional parameter to Tx_Extbase_Utility_Extension::configurePlugin
474 that allows you to specify the plugin type. Example:
476 Tx_Extbase_Utility_Extension::configurePlugin(
477 $_EXTKEY,
478 'BlogList',
479 array('Blog' => 'index'),
480 array(),
481 Tx_Extbase_Utility_Extension::PLUGIN_TYPE_CONTENT_ELEMENT
482 );
483 (The default value for the pluginType parameter is Tx_Extbase_Utility_Extension::PLUGIN_TYPE_PLUGIN)
485 Default Orderings & QuerySettings
486 ---------------------------------
488 It is now possible to change the default orderings of a repository without you having to modify the query by setting
489 the $defaultOrderings property of your Repository to a non-empty array:
491 protected $defaultOrderings = array(
492 'title' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING,
493 'date' => 'title' => Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING
494 );
496 This will change the default ordering for all queries created by this repository. Of course you can override the
497 ordering by calling $query->setOrderings() in your custom finder method.
499 Besides it's now possible to change the default query settings of a repository. This way you could for instance disable
500 "respect storage pid" for all queries. We added a life-cycle method "initializeObject" to the repository which will be
501 executed as soon as the repository is created. Just override it like the following:
503 public function initializeObject() {
504 $querySettings = $this->objectManager->create('Tx_Extbase_Persistence_Typo3QuerySettings');
505 $querySettings->setRespectStoragePage(FALSE);
506 $this->setDefaultQuerySettings($querySettings);
507 }
509 Of course, QuerySettings can be overridden too in your custom finder method by calling $query->setQuerySettings();
512 Full Changes for 1.3.0 Beta 1a:
513 ===============================
514 [+TASK] Extbase: Re-implement support for BE modules
515 [+FEATURE] Extbase (Utility): Allow plugins to be registered as new content element
516 Added a fifth parameter to Tx_Extbase_Utility_Extension::configurePlugin that allows
517 you to specify the plugin type (currently "list_type" and "CType" are supported).
518 Thanks to Marc Bastian Heinrichs, Rens Admiraal & Franz Koch for your help!
519 Resolves: #10666
520 [+BUGFIX] Extbase (Utility): Added condition to Tx_Extbase_Utility_Extension::getTargetPidByPlugin() in order to only select tt_content entries that are of CType "list". Thanks to Marc Bastian Heinrichs
521 [!!!][~TASK] Extbase (Configuration): Major rework of the ConfigurationManager
522 Configuration of controllers and actions is now stored in a global registry
523 ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions']). But you
524 should never access this directly. Instead always retrieve the frameworkConfiguration
525 from the ConfigurationManager.
526 Inserting an Extbase plugin is now as simple as:
527 lib.foo = USER
528 lib.foo {
529 userFunc = tx_extbase_core_bootstrap->run
530 extensionName = YourExtension
531 pluginName = YourPlugin
532 }
533 This is not really a breaking change as it does not change the public API. But it's not unlikely that it changes the behavior of your Extension in case you modified the TypoScript, that is generated by Tx_Extbase_Utility_Extension::configurePlugin().
534 NOTE: Unit tests of Extbase and Fluid v4 are broken currently. We'll be fixing those asap
535 [~TAKS] Extbase (MVC): FrontendRequestHandler now retrieves the current cObject through the ConfigurationManager
536 [+BUGFIX] Extbase (MVC): FrontendRequestHandler was refering to $this->frameworkConfiguration which wasn't available
537 [-API] Extbase (MVC): marked Tx_Extbase_MVC_Web_Request::getContentObjectData() deprecated as should retrieve the current cObject through the ConfigurationManager
538 [+TASK] Extbase (MVC): modified the Tx_Extbase_MVC_Web_RequestBuilder so that it's possible to change the action only by specifying the action parameter. Before you had to specify the controller as well, even if it was the default controller
539 [+BUGFIX] Extbase (MVC): Flashmessages now share a scope throughout the extension. Before, every plugin had it's own scope leading to the messages only being output when entering the same plugin again (e.g. redirecting from one plugin to another would never display the messages)
540 [~TASK] Extbase (Core): The Flashmessages now get persisted in the Bootstrap in resetSingletons()
541 [-TASK] Extbase (Core): Removed some commented lines from Bootstrap
542 [FEATURE] Extbase (Object): Make DI Class Mapping configurable through TS
543 It is now possible to configure the Dependency Injection class mapping by specifying:
544 config.tx_extbase.objects.[FullyQualifiedObjectName].className = [NewClassName]
545 This has the effect of effectively replacing [FullyQualifiedObjectName] with
546 [NewClassName].
547 Resolves: #10559
548 [-TASK] Extbase (Utility): Removed two obsolete checks for $GLOBALS['TSFE']->tmpl->setup['tt_content.']['list.']['20.'] in Tx_Extbase_Utility_Extension
549 [~TASK] Extbase: added two doc comments that were missing
550 [+BUGFIX] Extbase (Persistence): Extbase still used PHPs current() on some QueryResults in Persistence/Repository. Replaced these by calls to the getFirst() method of the QueryResult
551 [+TASK] Extbase (Persistence): added a private field to the QueryResult to make the above case easier to debug: When calling current() on an Iterator, PHP returns the first field of that object instead of calling the current() method of the Iterator interface.. With our somewhat pragmatic approach you'll see the warning if you debug the results of current($query->execute())
552 [+BUGFIX] Extbase (Persistence): Replaced two occurrences of Query->count() by Query->execute()->count() to avoid deprecated warnings in the Core
553 [+BUGFIX] Extbase (MVC): view configuration (templateRootPath, ...) has to be set before View::canRender() is called
554 [!!!][+TASK] Extbase (MVC): The UriBuilder now uses the current cObject instead of creating a new instance in the constructor. This is a breaking change if you instantiated the UriBuilder in your code. Please use the Extbase ObjectManager or inject the ConfigurationManager manually.
555 [+BUGFIX] Extbase (Reflection): ReflectionService now uses a cacheIdentifier per Extension. Besides the Bootstrap now resets the ReflectionService after dispatching a request. This resolves #10146
556 [+TASK] Extbase (Configuration): The ConfigurationManager now holds the current cObject. You can retrieve it via ConfigurationManagerInterface::getContentObject()
557 [+BUGFIX] Extbase (Configuration): When loading configuration of other plugins, the context specific configuration (e.g. flexform settings) are no longer merged with the frameworkConfiguration
558 [+BUGFIX] Extbase (MVC): Controllers are no Singletons by default. If a controller contains stateful fields (e.g. $this->settings) this breaks multiple plugins on one page
559 [+TASK] Extbase (Persistence): QuerySettings now also store the storage page id(s). This is required for the upcoming Ajax Widgets
560 [+BUGFIX] Extbase: fixed php warning in Tx_Extbase_Persistence_LazyLoadingProxy when loading the real instance would return NULL. Resolves #10683
561 [+BUGFIX] Extbase: use 3rd parameter = TRUE of t3lib_div::trimExplode to split switchableControllerActionParts from flexform. Thanks to Georg Ringer. Resolves #10688
562 [+TASK] Extbase: Replaced "public static" by "static public" in various places to be CGL conform
563 [+TASK] Extbase: Marked Utitlity_Extension camelCase/underscore helper functions deprecated
564 [+TASK] Extbase: Removed obsolete FIXME comments, whitespace fixes
565 [!!!] Extbase: Reintegrating branch "dispatcher" to trunk. Resolves: #10605
566 Branch history:
567 [+FEATURE] Extbase (Configuration): Extend ConfigurationManager so that it can load configuration of different plugins
568 [+FEATURE] Extbase (Configuration): 1st level cache for ConfigurationManager. Resolves: #10717. Resolves: #10716
569 [+TASK] Extbase: cleaned up Configuration* implementation, replaced t3lib_div::makeInstance() calls
570 Streamlined ConfigurationManager API and enforced its usage throughout the Extbase classes.
571 Replaced all t3lib_div::makeInstance() calls by $objectManager->create()/$objectManager->get() throughout the Extbase classes.
572 Some smaller tweaks and fixes. Resolves: #10655. Resolves: #10712
573 [TASK] Extbase (Object): Make tests work again. Resolves: #10709
574 [TASK] Extbase (Object): Updated autoload.php and emconf. Relates to: #10561
575 [TASK] Extbase (Object): Use typed exceptions. Relates to: #10561
576 [TASK] Extbase (Object): CGL cleanup
577 Additionally, removed support for @inject annotations at methods. Relates to: #10561
578 [TASK] Extbase (Object): Remove getParents. Relates to: #10561
579 [TASK] Extbase (Object): Remove isSingleton. Relates to: #10561
580 [TASK] Extbase (Object): Remove injectExtensionSettings feature. Relates to: #10561
581 [TASK] Extbase (Object): Change namespaces to Tx_Extbase_Object_Container. Relates to: #10561
582 [TASK] Extbase (Object): Add Container to Extbase. Relates to: #10561
583 [+TASK] Extbase (Core): moved Tx_Extbase_Bootstrap to Tx_Extbase_Core_Bootstrap
584 Moving Bootstrap to be compliant with FLOW3
585 Removed obsolete Classes. Resolves: #10704
586 [+TASK] Extbase: Merged current trunk (r2689) with local modifications into dispatcher branch
587 Note: This still needs a cleanup and some fixes (see FIXME comments) before it can be merged back to the trunk. Relates to: #10605. Relates to: #10655
588 [+TASK] Extbase (Configuration): Moved CONFIGURATION_TYPE_* constraints to ConfigurationManagerInterface. Resolves #10604.
589 [~TASK] Extbase (Configuration): The concrete configuration management strategy gets instanciate only once now.
590 [+FEATURE] Extbase (MVC): Decoupled framework settings from Dispatcher.
591 With the new dependency injection feature you can get the Configuration Manager injected by adding the lines
592 protected $configurationManager;
593 public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) {
594 $this->configurationManager = $configurationManager;
595 }
596 You can get various types of configuration invoking
597 $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManager::CONFIGURATION_TYPE_EXTBASE)
598 where the class constant must be either CONFIGURATION_TYPE_EXTBASE (for Extbase settings), or CONFIGURATION_TYPE_SETTINGS (for the current module/plugin settings), or CONFIGURATION_TYPE_TYPOSCRIPT (for a raw TS array). Resolves #4741.
599 [~TAKS] Extbase: Removed obsolete code.
600 [~TASK] Extbase: Added core patch for mod.php (see previous commit).
601 [+TASK] Extbase: Changed the way a module gets called.
602 - You can now specify a function name to be invoked by mod.php:
603 $TBE_MODULES['_dispatcher'][] = 'Tx_Extbase_Bootstrap->callModule';
604 - This requires a core patch.
605 [~TASK] Extbase: Changed configuration of the RequestHandler class names to TypoScript.
606 - The request handlers can now be registered in TypoScript with the setting:
607 config.tx_extbase.mvc.requestHandlers.[RequestHandlerClassName] = [RequestHandlerClassName].
608 - There are now two RequestHandlers in Extbase: FrontendRequestHandler and BackendRequestHandler. Common functionality is in the AbstractRequestHandler.
609 [+API][+FEATURE] Extbase (Utility): Implemented mechanism to register RequestHandlers.
610 [+TASK] Extbase: Backported Request Handler Resolver.
611 [~TASK] Extbase: Added "deprecated" annotation to Dispatcher.
612 [~TASK] Extbase: Added missing comment.
613 [+BUGFIX] Extbase (Reflection): The ReflectionService now gets injected to the dispatcher. Related to #10146.
614 [+BUGFIX] Extbase (Reflection): Changed the way the Reflection Service and it's cache gets initialized.
615 * Removed check for pre-initialized Reflection Service in the Bootstrap.
616 * Now using a fixed cache key ('ReflectionData').
617 Related to #10146.
618 [~TASK] Extbase: First step of the Dispatcher refactoring.
619 * Added and adapted some Unit Tests.
620 * Moved the Dispatcher to MVC.
621 * Added a backwards compatibility Dispatcher on root level.
622 * Added a Bootstrap class.
623 * Removed all backend module support for now.
624 Related to #7153.
625 [+TASK] Extbase: Added branch for the dispatcher refactoring.
626 [!!!][+BUGFIX] Extbase: fixed typo in getter and setter of Tx_Extbase_Domain_Model_FrontendUser::lastlogin . Thanks to Christian Schwan. Resolves #9345
627 [+FEATURE] Extbase (MVC): Backport possibility to change the view object class name more easily
628 Backported FLOW3s improved resolveView() mechanism. Tx_Fluid_View_TemplateView is still the default implementation, but can be easily changed by setting $defaultViewObjectName in your controller. Besides it's possible to specifying different views depending on the current request format by setting $viewFormatToObjectNameMap.
629 NOTE: If the view can't be rendered, the new template based "NotFoundView" will be created. So instead of the invisible HTML comments of the EmptyView, you'll get a more meaningful error message if the template file could not be found
630 Resolves: #8990
631 [!!!][+FEATURE] Extbase (Persistence): Backport QueryResult from FLOW3
632 Now Query::execute() returns an instance of QueryResultInterface that allows it to modify the query before actually accessing the records that it retrieves. This is required for the upcoming "Fluid widgets" backport (#10568).
633 NOTE: This change is not backwards compatible, if you work with PHPs array_* functions on the query result. To work around this issue, you'll have to convert the query result to an array before by calling the QueryResult::toArray() method. We're planning to add a compatibility mode, but that's not yet implemented.
634 Resolves: #10566
635 [+BUGFIX] Extbase (Object): Minor fix in ObjectManager to make it compatible with PHP 5.2.x
636 Relates to: #9062
637 [+BUGFIX] Extbase (Object): Refactor Object Manager
638 The Object Manager is now at the same location and
639 has the same API as in FLOW3.
640 [+BUGFIX] Extbase: Major cleanups to Dependency Injection and Persistence
641 Now, DI finally works with Persistence, cleaning
642 this greatly up. Additionally, all internal
643 t3lib_div::makeInstance calls have been replaced.
644 Now, dependency injection is actually usable.
645 Additionally, we completely thought over which
646 persistence classes need to be singleton and which
647 should be prototype, leading finally to a
648 coherent design in the persistence layer.
649 [+BUGFIX] Extbase: remove non-used interfaces
650 Removed classes which were not used.
651 Relates to: #9062
652 Resolves: #10585
653 Resolves: #10564
654 * Cleaned up Persistence Backend
655 * Cleaned up QOM Factory
656 [+BUGFIX] Extbase (MVC): Fix arguments object
657 The arguments object is now correctly inheriting from ArrayObject
658 Resolves: #10562
659 [+BUGFIX] Extbase (MVC): Make database connection work again
660 Resolves: #10585
661 [+FEATURE] Extbase (DI): merging DI into trunk. (resolves #10558)
662 [+TASK] Extbase: Undefined identifier in Tx_Extbase_Persistence_Storage_Typo3DbBackend::removeRow
663 Method clearPageCache was given an undefined variable $uid as second parameter.
664 Resolves: #10570
665 [+TASK] Extbase: $query->contains generate incomplete SQL
666 Use FIND_IN_SET instead of a self-constructed query of LIKE statements
667 Resolves: #8959
668 [+BUGFIX] Extbase (Persistence): Removed method createQuery from the QOMFactory. It is neither part of the API nor is it used by Extbase. Resolves #10215
669 [+BUGFIX] Extbase (Property): Minor fix in PHP doc comment
670 Fix the order of @param annotation in Tx_Extbase_Property_Mapper::mapAndValidate()
671 Resolves: #5887
672 [~CONFIGURATION] Extbase (MVC): Changed default value for automatic target page determination
673 The page id gets automatically detected if plugin.tx_extensionname_pluginname.view.defaultPid
674 is an empty string (was "auto" before). This ensures backwards compatibility.
675 Resolves #9121
676 [TASK] Extbase: moved Release Notes to ChangeLog.txt.
677 [+FEATURE] Extbase (MVC): Automatic target page determination
678 you can use the "pageUid" argument of the link.* and uri.* view helpers
679 to link to a different page. That is deprecated though as we won't have
680 the notion of "page uids" in v5. Instead the target page is now determined
681 automatically.
682 If the target page can't be determined because more than one active
683 plugin is capable of handling the action an exception will be thrown.
684 In that case you'll have to define the target page either by using the
685 pageUid argument or - preferably - by setting
686 plugin.tx_extensionname_pluginname.view.defaultPid to a fixed page uid.
687 Note: This feature still has to be documented!
688 Resolves: #9121
689 [+FEATURE] Extbase (MVC): Configurable plugin namespace
690 until now the namespace (aka prefix) of Extbase plugins was
691 fixed (tx_extensionname_pluginname). This is now configurable
692 via TypoScript. Just write:
693 plugin.tx_extensionname_pluginname.view.pluginNamespace = my_custom_namespace
694 to change the prefix for a specific plugin or
695 plugin.tx_extensionname.view.pluginNamespace = my_custom_namespace
696 to change if for the whole extension.
697 Note: This feature still has to be documented!
698 Resolves: #8365
700 Changes for 1.3.0 Alpha 2:
701 ==========================
702 included in TYPO3 4.5.0 Alpha 2.
704 Since the last version, one (possible BREAKING) change happened:
706 * Fixed Extbase Caching Bug.
707 Non-cacheable actions were cached due to the fact that TYPO3s
708 TypoScript condition "GP" does not merge GET & POST vars.
709 Additionally "switchableControllerActions" that were overridden
710 in the plugin flexform were not taken into account.
712 !!! This is a breaking change if you set up your TS configuration
713 of the plugin manually.
715 Full Changes:
716 -------------
718 [!!!][+BUGFIX] Extbase: Fix Extbase Caching Bug (thanks to Bastian Waidelich)
720 [-TASK] Extbase (MVC): removed fallback to current page in AbstractController::redirect() as that's already done within the UriBuilder if $targetPageUid is NULL
723 Changes for 1.3.0 Alpha 1:
724 ==========================
725 included in TYPO3 4.5.0 Alpha 1.
727 Since the last version, the following notable things happened:
729 * All methods trying to find an object by uid now ignore the storagePid. This changes the behavior of argument mapping and the way extbase fetches 1:1 relations. Resolves #5631. You should not experience any negative side-effects of this change, i.e. if your extension worked before, it will definitely after this change. However, it makes the record handling more robust.
730 * Performance improvements in TypoScript::convertTypoScriptArrayToPlainArray. Thanks to Timo Schmidt.
731 * Numerous other bugfixes, see below.
733 Full Changes:
734 -------------
735 [~TASK] Extbase: Raised version number to 1.3.0-devel to reflect the version scheme defined in the wiki. Resolves #9152. Thanks Xavier for pointing to it.
736 [+TASK] Extbase (MVC): cleaned up View implementations and added assign() and assignMultiple() methods to ViewInterface. This resolves #9137
737 [+BUGFIX] Extbase: Fixed a small typo in extension description.
738 [+BUGFIX] Extbase (Persistence): DataMapper now mapps NULL into a property on non-existing related object instead of FALSE. Resolves #8973.
739 [+BUGFIX] Extbase (Reflection): getParentClass() in Tx_Extbase_Reflection_ClassReflection no longer causes a fatal error if no parent class exists. Resolves #8800.
740 [+BUGFIX] Extbase (Utility): Improved performance of TypoScript::convertTypoScriptArrayToPlainArray. Thanks to Timo Schmidt. Resolves #8857.
741 [~TASK] Extbase: Changed state to 'stable'. Resolves #8768.
742 [+BUGFIX] Extbase: Fixed EOL and encoding of several files. Resolves #8876.
743 [+BUGFIX] Extbase (MVC): Fixed a problem where a non-required action argument throwed Exception if it was not found in the Backend. Thanks to Marc Bastian Heinrichs. Resolves #7277.
744 [!!!][+BUGFIX] Extbase (Persistence): All methods trying to find an object by uid now ignores the storagePid. This changes the behavior of argument mapping and the way extbase fetches 1:1 relations. Resolves #5631.
745 [+BUGFIX] Extbase (Persistence): Fixed a problem where localized objects inside an aggregate are not translated. Resolves #8555.
746 [~TASK] Extbase: Removed new lines at the end of php files.
748 RELEASE NOTES of Extbase v1.0.0
749 ===============================
751 This package contains the Extbase Framework for Extensions. You may
752 also want to install the BlogExample (blog_example) to experiment
753 with. This little example extension demonstrates some of the main
754 features of Extbase. The documentation is bundled in a separate
755 extension called doc_extbase. Both, the blog_example and the
756 doc_extbase can downloaded via TER.
758 http://typo3.org/extensions/repository/view/blog_example/current/
759 http://typo3.org/extensions/repository/view/doc_extbase/current/
761 Currently Extbase is in ALPHA state. Do not expect everything in the
762 right place and shape. And keep in mind that the API may change
763 until TYPO3 v4.3beta1 is released.
765 If you have any feature requests or encountered issues regarding
766 this package please use the facilities on forge to report.
768 We are very open to answer your questions. Please use the newsgroup
770 typo3.projects.typo3v4mvc on lists.netfielders.de
772 so other developers can react to your comments and also
773 profit from the postet solutions. Do not contact a member of the
774 development team via private email (or skype, or visits, or ...)
775 until he accepted this channel. We all do coding for Extbase on
776 our sparetime and must handle our regular work load - and don't
777 forget about our families ;-).
779 We hope you have fun with this package!
781 -- Your Extbase Development Team
784 ===========================
785 git log [startRevision]..HEAD --pretty=format:"%s%n%b%n" | grep -v "^$" | grep -v "git-svn-id"
787 Verify that the merge into the Core succeeded:
788 diff -urNw --exclude=".git" --exclude=".svn" -I "@version" ../../../typo3/sysext/extbase/ .