JINSTALLER-ADAPTER-001
JInstallerComponent
JInstallerComponent (old adapter class names)
Installer adapter class names changed in Joomla 4. The old JInstallerComponent name is gone.
JInstallerComponent → InstallerAdapterComponent (and module/plugin/template adapters)
What you will see
- Class "JInstallerComponent" not found
- Class "JInstallerPlugin" not found
- Class "JInstallerModule" not found
- Class "JInstallerTemplate" not found
- Class "JInstallerLanguage" not found
- Class "JInstallerLibrary" not found
- Class "JInstallerPackage" not found
Symptoms people search
custom installer adapter fatal · custom installer adapter 500
Replace this code
Swap JInstallerComponent for InstallerAdapterComponent (and module/plugin/template adapters).
Joomla 3
Remove or stop calling this
class JInstallerComponent extends JAdapterInstance {}Joomla 4 / 6
Use this instead
Use Joomla\CMS\Installer\Adapter\ComponentAdapter. Do not subclass the J3 names.How to fix it
- 1Update custom install adapters to the new namespace.
- 2Use script.php installer script APIs.
Also known as
JInstallerComponent · JInstallerPlugin · JInstallerModule · JInstallerTemplate · JInstallerLanguage · JInstallerLibrary · JInstallerPackage · InstallerAdapter · InstallerAdapterComponent
There is no 1:1 swap for this one. The architecture changed. If you cannot rewrite it, Infyways can.
Related issues
- Joomla 3 → 4Joomla API
JRequest::getVar() and the whole JRequest API
JRequest::getVar() → $app->getInput()->get('id')
- Joomla 3 → 4Joomla API
JError / JException
JError::raiseError() → throw new RuntimeException() / try-catch
- Joomla 3 → 4PHP
jimport() autoloader calls
jimport('joomla.filesystem.file') → use Joomla\CMS\Filesystem\File;
- Joomla 3 → 4Joomla API
isAdmin() / isSite()
$app->isAdmin() → $app->isClient('administrator') / isClient('site')
- Joomla 3 → 4Joomla API
Factory::getUri()
JFactory::getUri() → Uri::getInstance()
- Joomla 3 → 4Joomla API
Factory::getXml() / JXMLElement
JFactory::getXML() → SimpleXMLElement