reverted: --- b/config_track.install +++ a/config_track.install @@ -1,7 +1,5 @@ setTitle(t('Initializing config revisions')) ->addOperation('config_track_init', []); batch_set($batch_builder->toArray()); reverted: --- b/config_track.module +++ a/config_track.module @@ -1,8 +1,5 @@ ' . t('About') . ''; + $output .= '

' . t('This module allows to log any configuration change in Drupal 9/10.') . '

'; + $output .= '

' . t('All changes to configuration in any config collection will be tracked as well as that the order of changes will be preserved.') . '

'; + $output .= '

' . t('The module provides a nice UI where you can see a list of all recent config changes in the system as well as the user that triggered those changes. A diff is also available in order to see the exact change. .') . '

'; + return $output; + + default: + } - return \Drupal::service(ConfigTrackHooks::class)->help($route_name, $route_match); } /** @@ -58,7 +65,7 @@ if (!isset($config_data['data']) && in_array($config_data['operation'], ['create', 'update']) && ($config_data['uuid'] === $entity->uuid())) { $config_data['name'] = $entity->getEntityType()->getConfigPrefix() . '.' . $entity->id();; $config_data['data'] = $entity->toArray(); + $config_data['original_data'] = !$entity->isNew() ? $entity->original->toArray() : NULL; - $config_data['original_data'] = !$entity->isNew() ? DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.2.0', fn() => $entity->getOriginal(), fn() => $entity->original)->toArray() : NULL; $config_data['collection'] = \Drupal::configFactory() ->getEditable($config_data['name']) ->getStorage() reverted: --- b/config_track.services.yml +++ a/config_track.services.yml @@ -10,7 +10,3 @@ decorates: module_handler arguments: [ '@config_track.module_handler.inner', '@entity.last_installed_schema.repository' ] decoration_priority: 9 - - Drupal\config_track\Hook\ConfigTrackHooks: - class: Drupal\config_track\Hook\ConfigTrackHooks - autowire: true reverted: --- b/src/Controller/ConfigTrackController.php +++ a/src/Controller/ConfigTrackController.php @@ -2,8 +2,6 @@ namespace Drupal\config_track\Controller; -use Drupal\Component\Utility\DeprecationHelper; -use Drupal\Core\Database\Statement\FetchAs; use Drupal\Component\Datetime\DateTimePlus; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\ConfigManagerInterface; @@ -120,7 +118,7 @@ ->fetchField(); $this->pagerManager->createPager($total_entries, $this->limit); + $config_tracks = $this->database->select('config_track', 'cv') - $config_tracks = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.2.0', fn() => $this->database->select('config_track', 'cv') ->fields('cv', [ 'timestamp', 'revision_id', @@ -133,20 +131,7 @@ ->orderBy('revision_id', 'DESC') ->range($page * $this->limit, $this->limit) ->execute() + ->fetchAllAssoc('revision_id', \PDO::FETCH_ASSOC); - ->fetchAllAssoc('revision_id', FetchAs::Associative), fn() => $this->database->select('config_track', 'cv') - ->fields('cv', [ - 'timestamp', - 'revision_id', - 'name', - 'collection', - 'operation', - 'uid', - ]) - ->orderBy('timestamp', 'DESC') - ->orderBy('revision_id', 'DESC') - ->range($page * $this->limit, $this->limit) - ->execute() - ->fetchAllAssoc('revision_id', \PDO::FETCH_ASSOC)); $build['table']['#rows'] = $config_tracks; foreach ($build['table']['#rows'] as $revision_id => &$row) { reverted: --- b/src/Extension/ModuleHandler.php +++ a/src/Extension/ModuleHandler.php @@ -174,15 +174,15 @@ /** * {@inheritdoc} */ + public function addModule($name, $path) { + $this->innerModuleHandler->addModule($name, $path); - public function addModule($name, $path) - { } /** * {@inheritdoc} */ + public function addProfile($name, $path) { + $this->innerModuleHandler->addProfile($name, $path); - public function addProfile($name, $path) - { } /** @@ -202,8 +202,8 @@ /** * {@inheritdoc} */ + public function loadAllIncludes($type, $name = NULL) { + $this->innerModuleHandler->addProfile($type, $name); - public function loadAllIncludes($type, $name = NULL) - { } /** @@ -217,7 +217,7 @@ * {@inheritdoc} */ public function getHookInfo() { + return $this->innerModuleHandler->getHookInfo(); - return []; } /** @@ -230,8 +230,8 @@ /** * {@inheritdoc} */ + public function writeCache() { + $this->innerModuleHandler->writeCache(); - public function writeCache() - { } /** @@ -301,7 +301,7 @@ * {@inheritdoc} */ public function getName($module) { + return $this->innerModuleHandler->getName($module); - return \Drupal::service('extension.list.module')->getName($module); } /** reverted: --- b/src/Hook/ConfigTrackHooks.php +++ /dev/null @@ -1,38 +0,0 @@ -' . $this->t('About') . ''; - $output .= '

' . $this->t('This module allows to log any configuration change in Drupal 9/10.') . '

'; - $output .= '

' . $this->t('All changes to configuration in any config collection will be tracked as well as that the order of changes will be preserved.') . '

'; - $output .= '

' . $this->t('The module provides a nice UI where you can see a list of all recent config changes in the system as well as the user that triggered those changes. A diff is also available in order to see the exact change. .') . '

'; - return $output; - default: - } - } -}