Are pibase extensions still working in TYPO3 8?
Resources
I found the following ressources helpful for porting:
Update to 6.2+
- ClassAliasMap.php (mapping of old to new classes)
Update to 7+
- Wiki: TYPO3 7 migration guide
- Official "Changelog" for 7 (look at "Breaking Changes" for everything that you must replace, look at "Deprecations" for everything that is recommended to replace)
Update to 8+
- Official "Changelog" for 8
Update to 9+
- Official "Changelog" for 9
- Migrating from TYPO3_DB in "TYPO3 Explained" for converting old database functions to QueryBuilder. You can convert to QueryBuilder or Extbase Query. ($GLOBALS['TYPO3_DB'] is no longer available since 9, except if you use the extension typo3db_legacy!)
Also:
- Cleaning up TCA: Andreas Fernandez: Cleaning the hood
- Daniel Goerz (usetypo3): Upgrading Projects
In general
The changes, that you need to make, may be trivial. In other cases, significant.
All things considered, I would usually recommend a rewrite using Extbase or Doctrine and Fluid, Namespaces, TYPO3 9 API (maybe even TYPO3 10 if possible). Your extension will (probably) be better maintainable in the long run.
Tip
If you migrate to TYPO3 9 or above, use the extension scanner to detect code that will most likely cause problems. It is incredibly helpful for cleaning up legacy code. (You can also scan uninstalled extensions in a TYPO3 9 installation).
Changes
You may need to change one or more of the following (and this is not a complete list!):
Replace old with new classes
In most cases, I needed to replace a subset of:
- Tx_Extbase_Utility_Extension : \TYPO3\CMS\Extbase\Utility\ExtensionUtility
- t3lib_extMgm : \TYPO3\CMS\Core\Utility\ExtensionManagementUtility
- t3lib_div : \TYPO3\CMS\Core\Utility\GeneralUtility
- tslib_cObj : \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
- t3lib_utility_VersionNumber : \TYPO3\CMS\Core\Utility\VersionNumberUtility
- t3lib_BEfunc : \TYPO3\CMS\Backend\Utility\BackendUtility
- t3lib_TCEmain : \TYPO3\CMS\Core\DataHandling\DataHandler
- t3lib_parsehtml_proc : \TYPO3\CMS\Core\Html\RteHtmlParser
See ClassAliasMap.php for a complete list.
TCA
- Use $GLOBALS['TCA'] instead of $TCA
- Move override TCA to Configuration/TCA/Overrides, see Breaking Change #78384, TCA for your own model to Configuration/TCA. ext_tables.php will eventually be deprecated.
- Third Parameter in addTCAColums is deprecated
See "Andreas Fernandez: Cleaning the hood" for a very nice description of cleaning up the TCA with real examples.
PageRenderer
- replace $this->getPageRenderer with
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
page.includeJSlibs
"page.includeJSlibs is marked for deprecation and will be removed in TYPO3 CMS 8. Please use page.includeJSLibs (with an uppercase L) instead"
All previous answers have been correct but some words from a TYPO3 core team member: There are no plans to drop the support of "pibase" in the core. It is absolutely ok to use that API even though it does not provide much help to developers.
However I recommend to use at least fluid standalone to be able to create nice templates without all those ###
stuff.
you don't need to redevelop these extensions, but you might need to change the call to core functions.
In 6.2 you still could use the old class names like t3lib
.
These class names are available only with compatibility layer (together with a lot of delay).
For the future you need to use namespaces (and the correct new classes). You also should use namespaces for your own classes.
Depending on your used functions you might need to replace some calls with the newer functions as some functions got deprecated meanwhile.