code: protected function writeToLocalconf($key, array $config)
      {
          /** @var $objectManager \TYPO3\CMS\Extbase\Object\ObjectManager */
          $objectManager = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
          /** @var $configurationManager \TYPO3\CMS\Core\Configuration\ConfigurationManager */
          $configurationManager = $objectManager->get(\TYPO3\CMS\Core\Configuration\ConfigurationManager::class);
          return $configurationManager->setLocalConfigurationValueByPath('EXT/extConf/' . $key, serialize($config));
      }
docs: Writes a configuration line to AdditionalConfiguration.php.
  We don't use the <code>tx_install</code> methods as they add unneeded
  comments at the end of the file.
  
  @param string $key
  @param array $config
  @return bool