Migratie van TYPO3 4.5 LTS naar TYPO3 6.2 LTS

Eenvoudig migreren naar de nieuwe Long Term Support versie

Michiel Roos <@TuurlijkNiet>

Michiel Roos

  • Werkt al meer dan 10 jaar met TYPO3
  • Op dit moment werkzaam bij MaxServ als Senior Software Architect
  • Houdt zich onder andere bezig met solr implementaties, het schrijven van extensies, het uitvoeren van migraties van TemplaVoila naar backend_layouts en de configuratie van Varnish
  • Werkt ook aan de 'smoothmigration' extensie die de migratie van 4.5 naar 6.2 zeer eenvoudig zal maken

MaxServ

  • Opgericht in 2006
  • Team van 18 specialisten
  • TYPO3 Web ontwikkeling & onderhoud
  • Responsive websites
  • Hosting, Support & SLA

MaxServ & TYPO3

  • Geoptimaliseerde project afhandeling
  • Geoptimaliseerde ontwikkel procedures
  • Ontwikkel en publicatie management (OTAP)
  • O/Ontwikkel, T/Test, A/Acceptatie, P/Productie
  • 8 jaar ervaring in TYPO3 ontwikkeling
  • 8 gecertificeerde TYPO3 ontwikkelaars
  • Geoptimaliseerde support desk
  • Grote groep referenties

Referenties

TYPO3 LTS

Long Term Support

TYPO3 6.2 LTS is uit!

Toch?

6.2.0beta1 (2013-10-15)

beta2, rc1, rc2, final

Als het af is, is het af

4.5 nog ondersteund tot oktober 2014

Ondersteuning van 4.7 verlengd tot april 2014

Woord van T3CON13: release op 10 december

Breaking Changes

  • Namespaces
  • Vervallen functies
  • Vervallen viewhelpers
  • Verdwenen constantes
  • require_once / include_once
  • DAM => FAL
  • Andere Xclass definitie
  • mysql_* => mysqli_*

Opschoning typo3_src

  • t3lib/ is weg
  • r.i.p. PATH_t3lib
  • tslib/ is verplaatst
  • typo3/ is opgeschoond

require_once / include_once

require_once en include_once zijn niet meer. Leve de autoloader!


Fatal error: require_once() [function.require]: Failed opening required 'PATH_t3libclass.t3lib_treeview.php'
				

require_once (PATH_t3lib . 'class.t3lib_page.php');
require_once (PATH_t3lib . 'class.t3lib_tstemplate.php');
require_once (PATH_t3lib . 'class.t3lib_tsparser_ext.php');
				

Namespaces

  • Refactoring [1] [2]
  • t3lib_div heet nu . . .
  • \TYPO3\CMS\Core\Utility\GeneralUtility
  • Er is een compatibility laag. Namespaces worden pas is 7.0 een breaking change.
  • Migrations/Code/ClassAliasMap.php
  • Migrations/Code/LegacyClassesForIde.php

ClassAliasMap.php


<?php
return array(
	't3lib_cli' => 'TYPO3\\CMS\\Core\\Controller\\CommandLineController',
	'extDirect_DataProvider_ContextHelp' => 'TYPO3\\CMS\\ContextHelp\\ExtDirect\\ContextHelpDataProvider',
	't3lib_userAuth' => 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication',
	't3lib_beUserAuth' => 'TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication',
	't3lib_autoloader' => 'TYPO3\\CMS\\Core\\Core\\ClassLoader',
	't3lib_cache_backend_AbstractBackend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\AbstractBackend',
	't3lib_cache_backend_ApcBackend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\ApcBackend',
	't3lib_cache_backend_Backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\BackendInterface',
	't3lib_cache_backend_FileBackend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\FileBackend',
	't3lib_cache_backend_MemcachedBackend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\MemcachedBackend',
	't3lib_cache_backend_NullBackend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\NullBackend',
	't3lib_cache_backend_PdoBackend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\PdoBackend',
	't3lib_cache_backend_PhpCapableBackend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\PhpCapableBackendInterface',
	't3lib_cache_backend_RedisBackend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend',
	't3lib_cache_backend_TransientMemoryBackend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\TransientMemoryBackend',
	't3lib_cache_backend_DbBackend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
	't3lib_cache' => 'TYPO3\\CMS\\Core\\Cache\\Cache',
	't3lib_div' => 'TYPO3\\CMS\\Core\\Utility\\GeneralUtility',
	...
);
				

LegacyClassesForIde.php


<?php
die('Access denied');

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class Tx_About_Controller_AboutController extends \TYPO3\CMS\About\Controller\AboutController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class Tx_About_Domain_Model_Extension extends \TYPO3\CMS\About\Domain\Model\Extension {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class Tx_About_Domain_Repository_ExtensionRepository extends \TYPO3\CMS\About\Domain\Repository\ExtensionRepository {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class Tx_About_ViewHelpers_SkinImageViewHelper extends \TYPO3\CMS\About\ViewHelpers\SkinImageViewHelper {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class Tx_Aboutmodules_Controller_ModulesController extends \TYPO3\CMS\Aboutmodules\Controller\ModulesController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class tx_adodb_tceforms extends \TYPO3\CMS\Adodb\DataHandling\DatabaseTypeItemsFunction {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class tx_adodb_checkconnectionwizard extends \TYPO3\CMS\Adodb\View\CheckConnectionWizardView {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class AjaxLogin extends \TYPO3\CMS\Backend\AjaxLoginHandler {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class clickMenu extends \TYPO3\CMS\Backend\ClickMenu\ClickMenu {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class t3lib_clipboard extends \TYPO3\CMS\Backend\Clipboard\Clipboard {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class t3lib_transl8tools extends \TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class t3lib_TSparser_TSconfig extends \TYPO3\CMS\Backend\Configuration\TsConfigParser {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class t3lib_matchCondition_backend extends \TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
abstract class t3lib_contextmenu_AbstractContextMenu extends \TYPO3\CMS\Backend\ContextMenu\AbstractContextMenu {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
abstract class t3lib_contextmenu_AbstractDataProvider extends \TYPO3\CMS\Backend\ContextMenu\AbstractContextMenuDataProvider {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class t3lib_contextmenu_Action extends \TYPO3\CMS\Backend\ContextMenu\ContextMenuAction {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class t3lib_formmail extends \TYPO3\CMS\Frontend\Controller\DataSubmissionController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class t3lib_contextmenu_ActionCollection extends \TYPO3\CMS\Backend\ContextMenu\ContextMenuActionCollection {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
abstract class t3lib_contextmenu_extdirect_ContextMenu extends \TYPO3\CMS\Backend\ContextMenu\Extdirect\AbstractExtdirectContextMenu {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class t3lib_contextmenu_pagetree_DataProvider extends \TYPO3\CMS\Backend\ContextMenu\Pagetree\ContextMenuDataProvider {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class t3lib_contextmenu_pagetree_extdirect_ContextMenu extends \TYPO3\CMS\Backend\ContextMenu\Pagetree\Extdirect\ContextMenuConfiguration {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
abstract class t3lib_contextmenu_renderer_Abstract extends \TYPO3\CMS\Backend\ContextMenu\Renderer\AbstractContextMenuRenderer {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class TYPO3backend extends \TYPO3\CMS\Backend\Controller\BackendController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_wizard_backend_layout extends \TYPO3\CMS\Backend\Controller\BackendLayoutWizardController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_alt_clickmenu extends \TYPO3\CMS\Backend\Controller\ClickMenuController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_show_rechis extends \TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_show_item extends \TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_move_el extends \TYPO3\CMS\Backend\Controller\ContentElement\MoveElementController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_db_new_content_el extends \TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_dummy extends \TYPO3\CMS\Backend\Controller\DummyController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_alt_doc extends \TYPO3\CMS\Backend\Controller\EditDocumentController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_file_newfolder extends \TYPO3\CMS\Backend\Controller\File\CreateFolderController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_file_edit extends \TYPO3\CMS\Backend\Controller\File\EditFileController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class TYPO3_tcefile extends \TYPO3\CMS\Backend\Controller\File\FileController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_file_upload extends \TYPO3\CMS\Backend\Controller\File\FileUploadController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_file_rename extends \TYPO3\CMS\Backend\Controller\File\RenameFileController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_alt_file_navframe extends \TYPO3\CMS\Backend\Controller\FileSystemNavigationFrameController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_listframe_loader extends \TYPO3\CMS\Backend\Controller\ListFrameLoaderController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_index extends \TYPO3\CMS\Backend\Controller\LoginController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_login_frameset extends \TYPO3\CMS\Backend\Controller\LoginFramesetController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_logout extends \TYPO3\CMS\Backend\Controller\LogoutController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_db_new extends \TYPO3\CMS\Backend\Controller\NewRecordController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_alt_doc_nodoc extends \TYPO3\CMS\Backend\Controller\NoDocumentsOpenController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_db_layout extends \TYPO3\CMS\Backend\Controller\PageLayoutController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_alt_db_navframe extends \TYPO3\CMS\Backend\Controller\PageTreeNavigationController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_alt_shortcut extends \TYPO3\CMS\Backend\Controller\ShortcutFrameController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_tce_db extends \TYPO3\CMS\Backend\Controller\SimpleDataHandlerController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_wizard_add extends \TYPO3\CMS\Backend\Controller\Wizard\AddController {}

/**
 * @deprecated since 6.0 will be removed in 7.0
 */
class SC_wizard_colorpicker extends \TYPO3\CMS\Backend\Controller\Wizard\ColorpickerController {}

				

Deprecations

t3lib_div::GPvar

@deprecated since TYPO3 3.6, will be removed in TYPO3 4.6 - Use t3lib_div::_GP instead (ALWAYS delivers a value with un-escaped values!)

Vervallen functies zijn nu echt uit de core verwijderd.

Tussen 3.6 en 6.2: 479 functies

RegEx \o/


/**
 * @var string
 */
private $matchDeprecationsPattern = '/
	(?s)
	(?-s:[^\/]\s+(@dep.*)) # Also match @depreciated etc. ;-)
	.+?
	(?=function|public|private|protected|static)
	(?:(public|private|protected|static)\s+)?
	(?:(public|private|protected|static)\s+)?
	function\s+(\w+)\s?\(
/xm';
				

Extensies

  • TER extensies worden (hopelijk) door de auteur bijgewerkt
  • Eigen extensies, zelf fixen
  • Ja maar . . .

Dat klinkt als werk :-(

DAM => FAL Migratie

Media Management

http://forge.typo3.org/projects/extension-media/

  • Advanced metadata handling of Assets
  • API for querying Image, Text, Audio, Video, Application from their repository
  • A user friendly BE module
  • Mass upload of files and post processing of files
  • Multi language handling of metadata
  • File permission management
  • Automatic Metadata extraction upon upload provided by EXT:metadata
  • Integration with the text editor (RTE)
  • ...

SmoothMigration Project

  • Documentatie migratie 4.5 => 6.2
  • Rapportage van prolemen in 4.5 installatie
  • Patches aanleveren aan extensie auteurs
  • smoothmigration: PHP Code Migraties
  • :-)

Beschikbare tests

  • Vervallen statische functies
  • Vervallen viewhelpers
  • Vervallen constantes
  • Gebruik van mysql_* functies
  • require_ / include_once
  • Gewijzigde xClass registratie
  • DAM classes
  • UTF-8 gereedheid

Beschikbare migraties

  • Vervallen statische functies
  • Vervallen constantes
  • require_ / include_once
  • UTF-8 gereedheid

Demo Time

Demo smoothmigration extensie

Einde!

Bedankt voor jullie aandacht

Nieuw in TYPO3 6.1

Wat is er nieuw?

En wat nog meer?

Highlights

Install Tool

Core Updater

Zoute Wachtwoorden

Ditstributies

Documentatie module

Responsive images

Instelbare view

Backend Layout data provider

Metadata vertaling in FAL

FLOW like CLI control (o.a. extensies installeren via de cli)

Testing

We added a bunch of new unit tests with the new additions, and cleaned up and optimized the existing ones. Through Travis CI we now execute 6.247 unit tests after every commit, in three different environments (PHP 5.3, 5.4, 5.5).