Index: web/modules/contrib/visitors/src/Controller/Report/UserActivity.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/UserActivity.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/UserActivity.php	(revision )
@@ -32,7 +32,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -46,7 +46,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -64,11 +64,11 @@
     return array(
       'visitors_date_filter_form' => $form,
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header),
       ),
-      'visitors_pager' => array('#theme' => 'pager')
+      'visitors_pager' => array('#type' => 'pager')
     );
   }
 
@@ -170,7 +170,7 @@
 
     foreach ($results as $data) {
       $user = user_load($data->uid);
-      $username = array('#theme' => 'username', '#account' => $user);
+      $username = array('#type' => 'username', '#account' => $user);
       if ($is_comment_module_exist) {
         $rows[] = array(
           ++$i,
Index: web/modules/contrib/visitors/src/Controller/Report/DaysOfMonth.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/DaysOfMonth.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/DaysOfMonth.php	(revision )
@@ -32,7 +32,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -46,7 +46,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -84,7 +84,7 @@
         '#height' => $config->get('chart_height'),
       ),
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header),
       ),
Index: web/modules/contrib/visitors/src/Controller/Report/HitDetails.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/HitDetails.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/HitDetails.php	(revision )
@@ -10,6 +10,7 @@
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\Datetime\Date;
 use Symfony\Component\DependencyInjection\ContainerInterface;
+use Drupal\Component\Utility\SafeMarkup;
 
 class HitDetails extends ControllerBase {
   /**
@@ -23,7 +24,7 @@
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container) {
-    return new static($container->get('date'));
+    return new static($container->get('date.formatter'));
   }
 
   /**
@@ -32,7 +33,7 @@
    * @param \Drupal\Core\Datetime\Date $date
    *   The date service.
    */
-  public function __construct(Date $date) {
+  public function __construct(\Drupal\Core\Datetime\DateFormatter $date) {
     $this->date = $date;
   }
 
@@ -45,7 +46,7 @@
   public function display($hit_id) {
     return array(
       'visitors_table' => array(
-        '#theme' => 'table',
+        '#type' => 'table',
         '#rows'  => $this->_getData($hit_id),
       ),
     );
@@ -62,7 +63,7 @@
    */
   protected function _getData($hit_id) {
     $query = db_select('visitors', 'v');
-    $query->leftJoin('users', 'u', 'u.uid=v.visitors_uid');
+    $query->leftJoin('users_field_data', 'u', 'u.uid=v.visitors_uid');
     $query->fields('v');
     $query->fields('u', array('name', 'uid'));
     $query->condition('v.visitors_id', (int) $hit_id);
@@ -74,7 +75,7 @@
       $url          = urldecode($hit_details->visitors_url);
       $referer      = $hit_details->visitors_referer;
       $date         = $this->date->format($hit_details->visitors_date_time, 'large');
-      $whois_enable = module_exists('whois');
+      $whois_enable = \Drupal::service('module_handler')->moduleExists('whois');
 
       $attr         = array(
         'attributes' => array(
@@ -84,31 +85,27 @@
       );
       $ip = long2ip($hit_details->visitors_ip);
       $user = user_load($hit_details->visitors_uid);
-      $username = array(
-        '#theme'   => 'username',
-        '#account' => $user
-      );
-
+      //@TODO make url, referer and username as link
       $array = array(
-        'URL'        => l($url, $url),
-        'Title'      => check_plain($hit_details->visitors_title),
-        'Referer'    => $referer ? l($referer, $referer) : '',
+        'URL'        => $url,
+        'Title'      => SafeMarkup::checkPlain($hit_details->visitors_title),
+        'Referer'    => $referer,
         'Date'       => $date,
-        'User'       => drupal_render($username),
-        'IP'         => $whois_enable ? l($ip, 'whois/' . $ip, $attr) : $ip,
-        'User Agent' => check_plain($hit_details->visitors_user_agent)
+        'User'       => $user->getAccountName(),
+        'IP'         => $whois_enable ? \Drupal::l($ip, 'whois/' . $ip, $attr) : $ip,
+        'User Agent' => SafeMarkup::checkPlain($hit_details->visitors_user_agent)
       );
 
-      if (module_exists('visitors_geoip')) {
+      if (\Drupal::service('module_handler')->moduleExists('visitors_geoip')) {
         $geoip_data_array = array(
-          'Country'        => check_plain($hit_details->visitors_country_name),
-          'Region'         => check_plain($hit_details->visitors_region),
-          'City'           => check_plain($hit_details->visitors_city),
-          'Postal Code'    => check_plain($hit_details->visitors_postal_code),
-          'Latitude'       => check_plain($hit_details->visitors_latitude),
-          'Longitude'      => check_plain($hit_details->visitors_longitude),
-          'DMA Code'       => check_plain($hit_details->visitors_dma_code),
-          'PSTN Area Code' => check_plain($hit_details->visitors_area_code),
+          'Country'        => SafeMarkup::checkPlain($hit_details->visitors_country_name),
+          'Region'         => SafeMarkup::checkPlain($hit_details->visitors_region),
+          'City'           => SafeMarkup::checkPlain($hit_details->visitors_city),
+          'Postal Code'    => SafeMarkup::checkPlain($hit_details->visitors_postal_code),
+          'Latitude'       => SafeMarkup::checkPlain($hit_details->visitors_latitude),
+          'Longitude'      => SafeMarkup::checkPlain($hit_details->visitors_longitude),
+          'DMA Code'       => SafeMarkup::checkPlain($hit_details->visitors_dma_code),
+          'PSTN Area Code' => SafeMarkup::checkPlain($hit_details->visitors_area_code),
         );
         $array = array_merge($array, $geoip_data_array);
       }
Index: web/modules/contrib/visitors/src/Controller/Report/MonthlyHistory.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/MonthlyHistory.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/MonthlyHistory.php	(revision )
@@ -32,7 +32,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -46,7 +46,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -81,7 +81,7 @@
         '#height' => $config->get('chart_height'),
       ),
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header),
       ),
Index: web/modules/contrib/visitors/src/Controller/Report/CityHits.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/CityHits.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/CityHits.php	(revision )
@@ -32,7 +32,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -46,7 +46,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -65,11 +65,11 @@
       '#title' => t('Hits from') . ' ' . t($city) . ', ' . t($country),
       'visitors_date_filter_form' => $form,
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header, $country, $city),
       ),
-      'visitors_pager' => array('#theme' => 'pager')
+      'visitors_pager' => array('#type' => 'pager')
     );
   }
 
@@ -167,7 +167,7 @@
 
     foreach ($results as $data) {
       $user = user_load($data->visitors_uid);
-      $username = array('#theme' => 'username', '#account' => $user);
+      $username = array('#type' => 'username', '#account' => $user);
 
       $rows[] = array(
         ++$i,
Index: web/modules/contrib/visitors/src/Controller/Report/Countries.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/Countries.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/Countries.php	(revision )
@@ -32,7 +32,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -46,7 +46,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -64,11 +64,11 @@
     return array(
       'visitors_date_filter_form' => $form,
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header),
       ),
-      'visitors_pager' => array('#theme' => 'pager')
+      'visitors_pager' => array('#type' => 'pager')
     );
   }
 
Index: web/modules/contrib/visitors/src/Controller/Report/Hits.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/Hits.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/Hits.php	(revision )
@@ -32,7 +32,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -46,7 +46,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -65,11 +65,11 @@
       '#title' => check_plain(t('Hits from') . ' ' . $host),
       'visitors_date_filter_form' => $form,
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header, $host),
       ),
-      'visitors_pager' => array('#theme' => 'pager')
+      'visitors_pager' => array('#type' => 'pager')
     );
   }
 
@@ -172,7 +172,7 @@
 
     foreach ($results as $data) {
       $user = user_load($data->visitors_uid);
-      $username = array('#theme' => 'username', '#account' => $user);
+      $username = array('#type' => 'username', '#account' => $user);
       $rows[] = array(
         ++$i,
         $data->visitors_id,
Index: web/modules/contrib/visitors/src/Form/Settings.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Form/Settings.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Form/Settings.php	(revision )
@@ -5,14 +5,16 @@
 use Drupal\Component\Utility\NestedArray;
 use Drupal\Core\Datetime\DrupalDateTime;
 use Drupal\Core\Form\ConfigFormBase;
+use Drupal\Core\Form\FormStateInterface;
 use Drupal\datetime\DateHelper;
+use Drupal\Core\Url;
 
 class Settings extends ConfigFormBase {
   public function getFormID() {
     return 'visitors_admin_settings';
   }
 
-  public function buildForm(array $form, array &$form_state) {
+  public function buildForm(array $form, FormStateInterface $form_state) {
     $config = \Drupal::config('visitors.config');
     $form = array();
 
@@ -138,10 +140,10 @@
         31536000 => '1 year',
       ),
       '#description' =>
-        t('Older visitors log entries (including referrer statistics) will be ' .
+        $this->t('Older visitors log entries (including referrer statistics) will be ' .
           'automatically discarded. (Requires a correctly configured ' .
           '<a href="@cron">cron maintenance task</a>.)',
-          array('@cron' => url('admin/reports/status'))
+          array('@cron' => Url::fromRoute('system.status')->toString())
         )
     );
 
@@ -171,64 +173,75 @@
     return parent::buildForm($form, $form_state);;
   }
 
-  public function submitForm(array &$form, array &$form_state) {
-    $config = \Drupal::config('visitors.config');
+  public function submitForm(array &$form, FormStateInterface $form_state) {
+    $config = \Drupal::configFactory()->getEditable('visitors.config');
     $config
       ->set(
         'show_total_visitors',
-        (int) $form_state['values']['show_total_visitors']
+        (int) $form_state->getValue('show_total_visitors')
       )
       ->set(
         'start_count_total_visitors',
-        (int) $form_state['values']['start_count_total_visitors']
+        (int) $form_state->getValue('start_count_total_visitors')
       )
       ->set(
         'show_unique_visitor',
-        (int) $form_state['values']['show_unique_visitor']
+        (int) $form_state->getValue('show_unique_visitor')
       )
       ->set(
         'show_registered_users_count',
-        (int) $form_state['values']['show_registered_users_count']
+        (int) $form_state->getValue('show_registered_users_count')
       )
       ->set(
         'show_last_registered_user',
-        (int) $form_state['values']['show_last_registered_user']
+        (int) $form_state->getValue('show_last_registered_user')
       )
       ->set(
         'show_published_nodes',
-        (int) $form_state['values']['show_published_nodes']
+        (int) $form_state->getValue('show_published_nodes')
       )
       ->set(
         'show_user_ip',
-        (int) $form_state['values']['show_user_ip']
+        (int) $form_state->getValue('show_user_ip')
       )
       ->set(
         'show_since_date',
-        (int) $form_state['values']['show_since_date']
+        (int) $form_state->getValue('show_since_date')
       )
       ->set(
         'exclude_administer_users',
-        (int) $form_state['values']['exclude_administer_users']
+        (int) $form_state->getValue('exclude_administer_users')
       )
       ->set(
         'items_per_page',
-        (int) $form_state['values']['items_per_page']
+        (int) $form_state->getValue('items_per_page')
       )
       ->set(
         'flush_log_timer',
-        (int) $form_state['values']['flush_log_timer']
+        (int) $form_state->getValue('flush_log_timer')
       )
       ->set(
         'chart_width',
-        (int) $form_state['values']['chart_width']
+        (int) $form_state->getValue('chart_width')
       )
       ->set(
         'chart_height',
-        (int) $form_state['values']['chart_height']
+        (int) $form_state->getValue('chart_height')
       )
       ->save();
 
     parent::submitForm($form, $form_state);
   }
+
+  /**
+   * Gets the configuration names that will be editable.
+   *
+   * @return array
+   *   An array of configuration object names that are editable if called in
+   *   conjunction with the trait's config() method.
+   */
+  protected function getEditableConfigNames() {
+    return array();
+  }
 }
 
Index: web/modules/contrib/visitors/src/Controller/Report/Hosts.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/Hosts.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/Hosts.php	(revision )
@@ -32,7 +32,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -46,7 +46,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -64,11 +64,11 @@
     return array(
       'visitors_date_filter_form' => $form,
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header),
       ),
-      'visitors_pager' => array('#theme' => 'pager')
+      'visitors_pager' => array('#type' => 'pager')
     );
   }
 
Index: web/modules/contrib/visitors/visitors.install
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/visitors.install	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/visitors.install	(revision )
@@ -11,7 +11,7 @@
  * Implements hook_install().
  */
 function visitors_install() {
-  \Drupal::config('visitors.config')
+  \Drupal::configFactory()->getEditable('visitors.config')
     ->set('chart_height', 430)
     ->set('chart_width', 700)
     ->set('exclude_administer_users', 0)
@@ -35,7 +35,7 @@
 function visitors_uninstall() {
   drupal_uninstall_schema('visitors');
 
-  \Drupal::config('visitors.config')->delete();
+  \Drupal::configFactory()->getEditable('visitors.config')->delete();
 }
 
 /**
Index: web/modules/contrib/visitors/src/Controller/Report/Cities.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/Cities.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/Cities.php	(revision )
@@ -32,7 +32,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -46,7 +46,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -65,11 +65,11 @@
       '#title' => t('Visitors from') . ' ' . t($country),
       'visitors_date_filter_form' => $form,
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header, $country),
       ),
-      'visitors_pager' => array('#theme' => 'pager')
+      'visitors_pager' => array('#type' => 'pager')
     );
   }
 
Index: web/modules/contrib/visitors/src/Form/DateFilter.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Form/DateFilter.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Form/DateFilter.php	(revision )
@@ -5,7 +5,8 @@
 use Drupal\Component\Utility\NestedArray;
 use Drupal\Core\Datetime\DrupalDateTime;
 use Drupal\Core\Form\FormBase;
-use Drupal\datetime\DateHelper;
+use Drupal\Core\Datetime\DateHelper;
+use Drupal\Core\Form\FormStateInterface;
 
 class DateFilter extends FormBase {
   protected $_order = array('month', 'day', 'year');
@@ -43,7 +44,7 @@
     }
   }
 
-  public function buildForm(array $form, array &$form_state) {
+  public function buildForm(array $form, FormStateInterface $form_state) {
     $this->_setSessionDateRange();
 
     $from = DrupalDateTime::createFromArray($_SESSION['visitors_from']);
@@ -89,19 +90,20 @@
     return $form;
   }
 
-  public function validateForm(array &$form, array &$form_state) {
-    $from          = $form_state['input']['from'];
-    $to            = $form_state['input']['to'];
+  public function validateForm(array &$form, FormStateInterface $form_state) {
+    $fromvalue          = $form_state->getValue('from');
+    $tovalue     = $form_state->getValue('to');
+    $from = array();
+    $to = array();
+    $from['month'] = (int) $fromvalue->format('m');
+    $from['day']   = (int) $fromvalue->format('d');
+    $from['year']  = (int) $fromvalue->format('y');
 
-    $from['month'] = (int) $from['month'];
-    $from['day']   = (int) $from['day'];
-    $from['year']  = (int) $from['year'];
+    $to['month']   = (int) $tovalue->format('m');
+    $to['day']     = (int) $tovalue->format('d');
+    $to['year']    = (int) $tovalue->format('y');
 
-    $to['month']   = (int) $to['month'];
-    $to['day']     = (int) $to['day'];
-    $to['year']    = (int) $to['year'];
-
-    $error_message = t('The specified date is invalid.');
+    $error_message = $this->t('The specified date is invalid.');
 
     if (!checkdate($from['month'], $from['day'], $from['year'])) {
       return $this->setFormError('from', $form_state, $error_message);
@@ -127,9 +129,9 @@
     }
   }
 
-  public function submitForm(array &$form, array &$form_state) {
-    $from = $form_state['values']['from'];
-    $to   = $form_state['values']['to'];
+  public function submitForm(array &$form, FormStateInterface $form_state) {
+    $from = $form_state->getValue('from');
+    $to   = $form_state->getValue('to');
 
     $_SESSION['visitors_from'] = array(
       'month' => $from->format('n'),
@@ -151,11 +153,11 @@
    * If the date is valid, the date is set in the form as a string
    * using the format designated in __toString().
    */
-  public function datelistValidate($element, &$form_state) {
+  public function datelistValidate($element, FormStateInterface $form_state) {
     $input_exists = FALSE;
 
     $input = NestedArray::getValue(
-      $form_state['values'],
+      $form_state->getValues(),
       $element['#parents'],
       $input_exists
     );
@@ -170,23 +172,20 @@
       empty($input['month']) ||
       empty($input['day'])
     ) {
-      form_error($element, $form_state, t('The %field date is required.'));
+      $form_state->setError($element,$this->t('The %field date is required.'));
       return;
     }
 
     if (!checkdate($input['month'], $input['day'], $input['year'])) {
-      form_error($element, $form_state, t('The specified date is invalid.'));
+      $this->setError($element,$this->t('The specified date is invalid.'));
       return;
     }
-
     $date = DrupalDateTime::createFromArray($input);
-
     if ($date instanceOf DrupalDateTime && !$date->hasErrors()) {
-      form_set_value($element, $date, $form_state);
+      $form_state->setValueForElement($element, $date);
       return;
     }
-
-    form_error($element, $form_state, t('The %field date is invalid.'));
+    $form_state->setError($element,$this->t('The %field date is invalid.'));
   }
 
   /**
Index: web/modules/contrib/visitors/src/Controller/Report/Hours.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/Hours.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/Hours.php	(revision )
@@ -32,7 +32,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -46,7 +46,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -84,7 +84,7 @@
         '#height' => $config->get('chart_height'),
       ),
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header),
       ),
Index: web/modules/contrib/visitors/src/Controller/Report/RecentHits.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/RecentHits.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/RecentHits.php	(revision )
@@ -11,6 +11,7 @@
 use Drupal\Core\Datetime\Date;
 use Drupal\Core\Form\FormBuilderInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
+use Drupal\Component\Utility\SafeMarkup;
 
 class RecentHits extends ControllerBase {
   /**
@@ -32,7 +33,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -46,7 +47,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct(\Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -64,11 +65,11 @@
     return array(
       'visitors_date_filter_form' => $form,
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header),
       ),
-      'visitors_pager' => array('#theme' => 'pager')
+      'visitors_pager' => array('#type' => 'pager')
     );
   }
 
@@ -128,7 +129,7 @@
     $query = db_select('visitors', 'v')
       ->extend('Drupal\Core\Database\Query\PagerSelectExtender')
       ->extend('Drupal\Core\Database\Query\TableSortExtender');
-    $query->leftJoin('users', 'u', 'u.uid=v.visitors_id');
+    $query->leftJoin('users_field_data', 'u', 'u.uid=v.visitors_id');
     $query->fields(
       'v',
       array(
@@ -156,24 +157,20 @@
     $page = isset($_GET['page']) ? (int) $_GET['page'] : '';
     $i = 0 + $page * $items_per_page;
     $timezone =  drupal_get_user_timezone();
-
     foreach ($results as $data) {
       $user = user_load($data->visitors_uid);
       $username = array(
-        '#theme' => 'username',
+        '#type' => 'username',
         '#account' => $user
       );
-
       $rows[] = array(
         ++$i,
         $data->visitors_id,
         $this->date->format($data->visitors_date_time, 'short'),
-        check_plain(
-          $data->visitors_title) . '<br/>' . l($data->visitors_path,
-          $data->visitors_url
-        ),
-        drupal_render($username),
-        l(t('details'), 'visitors/hits/' . $data->visitors_id)
+        $data->visitors_path,
+        $user->getAccountName(),
+        //\Drupal::l(t('details'), \Drupal\Core\Url::fromUri('visitors/hits/' . $data->visitors_id))
+        \Drupal::l($this->t('details'),\Drupal\Core\Url::fromRoute('visitors.hit_details',array("hit_id"=>$data->visitors_id)))
       );
     }
 
Index: web/modules/contrib/visitors/src/EventSubscriber/KernelTerminateSubscriber.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/EventSubscriber/KernelTerminateSubscriber.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/EventSubscriber/KernelTerminateSubscriber.php	(revision )
@@ -1,4 +1,4 @@
-<?
+<?php
 
 /**
  * @file
@@ -17,7 +17,7 @@
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Drupal\Core\Site\Settings;
-use Drupal\Core\Page\DefaultHtmlPageRenderer;
+use Drupal\Core\Url;
 
 /**
  * Store visitors data when a request terminates.
@@ -39,7 +39,7 @@
   public function onTerminate(PostResponseEvent $event) {
     $this->request = $event->getRequest();
 
-    global $user;
+    $user = \Drupal::currentUser();
     $not_admin = !in_array('administrator', $user->getRoles());
     $log_admin = !\Drupal::config('visitors.config')->get('exclude_administer_users');
 
@@ -51,12 +51,12 @@
         'visitors_date_time'  => time(),
         'visitors_url'        => $this->_getUrl(),
         'visitors_referer'    => $this->_getReferer(),
-        'visitors_path'       => _current_path(),
+        'visitors_path'       => Url::fromRoute('<current>')->toString(),
         'visitors_title'      => $this->_getTitle(),
         'visitors_user_agent' => $this->_getUserAgent()
       );
 
-      if (module_exists('visitors_geoip')) {
+      if (\Drupal::service('module_handler')->moduleExists('visitors_geoip')) {
         $geoip_data = $this->_getGeoipData($ip_str);
 
         $fields['visitors_continent_code'] = $geoip_data['continent_code'];
@@ -85,7 +85,7 @@
    *   An array of event listener definitions.
    */
   public static function getSubscribedEvents() {
-    $events[KernelEvents::TERMINATE][] = array('onTerminate', 100);
+    $events["kernel.terminate"] = ['onTerminate'];
 
     return $events;
   }
@@ -113,7 +113,7 @@
    */
   protected function _getUrl() {
     return
-      urldecode(sprintf('http://%s%s', $_SERVER['HTTP_HOST'], request_uri()));
+      urldecode(sprintf('http://%s%s', $_SERVER['HTTP_HOST'], $this->request->getRequestUri()));
   }
 
   /**
Index: web/modules/contrib/visitors/src/Controller/Report/Node.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/Node.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/Node.php	(revision )
@@ -33,7 +33,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -47,7 +47,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -65,11 +65,11 @@
     return array(
       'visitors_date_filter_form' => $form,
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header, $node),
       ),
-      'visitors_pager' => array('#theme' => 'pager')
+      'visitors_pager' => array('#type' => 'pager')
     );
   }
 
@@ -131,7 +131,7 @@
     $query = db_select('visitors', 'v')
       ->extend('Drupal\Core\Database\Query\PagerSelectExtender')
       ->extend('Drupal\Core\Database\Query\TableSortExtender');
-    $query->leftJoin('users', 'u', 'u.uid=v.visitors_id');
+    $query->leftJoin('users_field_data', 'u', 'u.uid=v.visitors_id');
     $query->fields(
       'v',
       array(
@@ -141,13 +141,15 @@
         'visitors_referer',
       )
     );
-    $value = $node->getValue();
-    $nid = (int) $value['nid'][0]['value'];
+
+
+    $nid = (int) $node->id();
     $query->fields('u', array('name', 'uid'));
     $db_or = db_or();
-    $db_or->condition('v.visitors_path', 'node/' . $nid, '=');
+    $db_or->condition('v.visitors_path', '/node/' . $nid, '=');
+    //@todo removed placeholder is this right?
     $db_or->condition(
-      'v.visitors_path', 'node/' . $nid . '/%', 'LIKE'
+      'v.visitors_path', '%/node/' . $nid."%", 'LIKE'
     );
     $query->condition($db_or);
 
@@ -161,7 +163,6 @@
     visitors_date_filter_sql_condition($count_query);
     $query->setCountQuery($count_query);
     $results = $query->execute();
-
     $rows = array();
 
     $page = isset($_GET['page']) ? (int) $_GET['page'] : '';
@@ -171,7 +172,7 @@
     foreach ($results as $data) {
       $user = user_load($data->visitors_uid);
       $username = array(
-        '#theme' => 'username',
+        '#type' => 'username',
         '#account' => $user
       );
 
@@ -179,9 +180,11 @@
         ++$i,
         $data->visitors_id,
         $this->date->format($data->visitors_date_time, 'short'),
-        l($data->visitors_referer, $data->visitors_referer),
-        drupal_render($username),
-        l(t('details'), 'visitors/hits/' . $data->visitors_id)
+        //l($data->visitors_referer, $data->visitors_referer),
+        !empty($data->visitors_referer) ? $data->visitors_referer : 'none',
+        //drupal_render($username),
+        $user->getAccountName(),
+        \Drupal::l($this->t('details'),\Drupal\Core\Url::fromRoute('visitors.hit_details',array("hit_id"=>$data->visitors_id)))
       );
     }
 
Index: web/modules/contrib/visitors/src/Controller/Report/TopPages.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/TopPages.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/TopPages.php	(revision )
@@ -11,6 +11,7 @@
 use Drupal\Core\Datetime\Date;
 use Drupal\Core\Form\FormBuilderInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
+use Drupal\Component\Utility\SafeMarkup;
 
 class TopPages extends ControllerBase {
   /**
@@ -32,7 +33,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -46,7 +47,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -64,11 +65,11 @@
     return array(
       'visitors_date_filter_form' => $form,
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header),
       ),
-      'visitors_pager' => array('#theme' => 'pager')
+      'visitors_pager' => array('#type' => 'pager')
     );
   }
 
@@ -134,12 +135,13 @@
 
     $page = isset($_GET['page']) ? $_GET['page'] : '';
     $i = 0 + $page * $items_per_page;
-
+    //@TODO add links
     foreach ($results as $data) {
       $rows[] = array(
         ++$i,
-        check_plain($data->visitors_title) . '<br/>' .
-        l($data->visitors_path, $data->visitors_url),
+        //SafeMarkup::checkPlain($data->visitors_title) . '<br/>' .$data->visitors_url,
+        $data->visitors_url,
+       // l($data->visitors_path, $data->visitors_url),
         $data->count,
       );
     }
Index: web/modules/contrib/visitors/visitors.local_tasks.yml
===================================================================
--- web/modules/contrib/visitors/visitors.local_tasks.yml	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/visitors.links.tasks.yml	(revision )
@@ -1,0 +1,0 @@
Index: web/modules/contrib/visitors/visitors.permissions.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/visitors.permissions.yml	(revision )
+++ web/modules/contrib/visitors/visitors.permissions.yml	(revision )
@@ -0,0 +1,6 @@
+administer visitors:
+  title: 'Administer visitors module'
+  description: 'Administer visitors settings'
+access visitors:
+  title: 'Access Visitors'
+  description: 'View reports'
\ No newline at end of file
Index: web/modules/contrib/visitors/templates/visitors_jqplot.html.twig
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/templates/visitors_jqplot.html.twig	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/templates/visitors_jqplot.html.twig	(revision )
@@ -1,9 +1,12 @@
 <div id="visitors_chart" style="width: {{ width }}px; height: {{ height }}px;"></div>
 
-<script type="text/javascript" src="/{{ path }}/jquery.jqplot/jquery.jqplot.min.js"></script>
-<script type="text/javascript" src="/{{ path }}/jquery.jqplot/plugins/jqplot.barRenderer.min.js"></script>
-<script type="text/javascript" src="/{{ path }}/jquery.jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>
-<script type="text/javascript" src="/{{ path }}/jquery.jqplot/plugins/jqplot.pointLabels.min.js"></script>
+
+
+
+{{ attach_library('visitors/jqplot.pointLabels') }}
+{{ attach_library('visitors/jqplot.categoryAxisRenderer') }}
+{{ attach_library('visitors/jqplot.barRenderer') }}
+{{ attach_library('visitors/jquery.jqplot') }}
 
 <script type="text/javascript">
   jQuery(document).ready(function($){
Index: web/modules/contrib/visitors/visitors.libraries.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/visitors.libraries.yml	(revision )
+++ web/modules/contrib/visitors/visitors.libraries.yml	(revision )
@@ -0,0 +1,29 @@
+jquery.jqplot:
+  header : true
+  js:
+    jquery.jqplot/jquery.jqplot.min.js: {}
+  dependencies:
+    - core/jquery
+
+jqplot.barRenderer:
+  header : true
+  js:
+    jquery.jqplot/plugins/jqplot.barRenderer.min.js: {}
+  dependencies:
+    - core/jquery
+
+jqplot.categoryAxisRenderer:
+  header : true
+  js:
+    jquery.jqplot/plugins/jqplot.categoryAxisRenderer.min.js: {}
+  dependencies:
+    - core/jquery
+
+jqplot.pointLabels:
+  header : true
+  js:
+    jquery.jqplot/plugins/jqplot.pointLabels.min.js: {}
+  dependencies:
+    - core/jquery
+
+
Index: web/modules/contrib/visitors/visitors.routing.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/visitors.routing.yml	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/visitors.routing.yml	(revision )
@@ -9,7 +9,7 @@
 visitors.index:
   path: '/visitors'
   defaults:
-    _content: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
+    _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
     _title: 'Visitors'
   requirements:
     _permission: 'access visitors'
@@ -17,7 +17,7 @@
 visitors.hits:
   path: '/visitors/hits'
   defaults:
-    _content: '\Drupal\visitors\Controller\Report\RecentHits::display'
+    _controller: '\Drupal\visitors\Controller\Report\RecentHits::display'
     _title: 'Recent hits'
   requirements:
     _permission: 'access visitors'
@@ -25,7 +25,7 @@
 visitors.hit_details:
   path: '/visitors/hits/{hit_id}'
   defaults:
-    _content: '\Drupal\visitors\Controller\Report\HitDetails::display'
+    _controller: '\Drupal\visitors\Controller\Report\HitDetails::display'
     _title: 'View access log'
   requirements:
     _permission: 'access visitors'
@@ -33,7 +33,7 @@
 visitors.top_pages:
   path: '/visitors/pages'
   defaults:
-    _content: '\Drupal\visitors\Controller\Report\TopPages::display'
+    _controller: '\Drupal\visitors\Controller\Report\TopPages::display'
     _title: 'Top pages'
   requirements:
     _permission: 'access visitors'
@@ -41,7 +41,7 @@
 visitors.node:
   path: '/node/{node}/visitors'
   defaults:
-    _content: '\Drupal\visitors\Controller\Report\Node::display'
+    _controller: '\Drupal\visitors\Controller\Report\Node::display'
     _title: 'Visitors'
   requirements:
     _permission: 'access visitors'
@@ -51,7 +51,7 @@
 visitors.hosts:
   path: '/visitors/hosts'
   defaults:
-    _content: '\Drupal\visitors\Controller\Report\Hosts::display'
+    _controller: '\Drupal\visitors\Controller\Report\Hosts::display'
     _title: 'Hosts'
   requirements:
     _permission: 'access visitors'
@@ -59,7 +59,7 @@
 visitors.host_hits:
   path: '/visitors/hosts/{host}'
   defaults:
-    _content: '\Drupal\visitors\Controller\Report\Hits::display'
+    _controller: '\Drupal\visitors\Controller\Report\Hits::display'
     _title: 'Hits'
   requirements:
     _permission: 'access visitors'
@@ -68,7 +68,7 @@
 visitors.user_activity:
   path: '/visitors/user_activity'
   defaults:
-    _content: '\Drupal\visitors\Controller\Report\UserActivity::display'
+    _controller: '\Drupal\visitors\Controller\Report\UserActivity::display'
     _title: 'User activity'
   requirements:
     _permission: 'access visitors'
@@ -76,7 +76,7 @@
 visitors.hours:
   path: '/visitors/hours'
   defaults:
-    _content: '\Drupal\visitors\Controller\Report\Hours::display'
+    _controller: '\Drupal\visitors\Controller\Report\Hours::display'
     _title: 'Hours'
   requirements:
     _permission: 'access visitors'
@@ -84,7 +84,7 @@
 visitors.days_of_month:
   path: '/visitors/days_of_month'
   defaults:
-    _content: '\Drupal\visitors\Controller\Report\DaysOfMonth::display'
+    _controller: '\Drupal\visitors\Controller\Report\DaysOfMonth::display'
     _title: 'Days of month'
   requirements:
     _permission: 'access visitors'
@@ -92,7 +92,7 @@
 visitors.days_of_week:
   path: '/visitors/days_of_week'
   defaults:
-    _content: '\Drupal\visitors\Controller\Report\DaysOfWeek::display'
+    _controller: '\Drupal\visitors\Controller\Report\DaysOfWeek::display'
     _title: 'Days of week'
   requirements:
     _permission: 'access visitors'
@@ -100,7 +100,7 @@
 visitors.monthly_history:
   path: '/visitors/monthly_history'
   defaults:
-    _content: '\Drupal\visitors\Controller\Report\MonthlyHistory::display'
+    _controller: '\Drupal\visitors\Controller\Report\MonthlyHistory::display'
     _title: 'Monthly history'
   requirements:
     _permission: 'access visitors'
@@ -108,7 +108,7 @@
 visitors.referers:
   path: '/visitors/referers'
   defaults:
-    _content: '\Drupal\visitors\Controller\Report\Referers::display'
+    _controller: '\Drupal\visitors\Controller\Report\Referers::display'
     _title: 'Referers'
   requirements:
     _permission: 'access visitors'
Index: web/modules/contrib/visitors/src/Controller/Report/Referers.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/Referers.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/Referers.php	(revision )
@@ -39,7 +39,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -53,7 +53,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -71,11 +71,11 @@
     return array(
       'visitors_date_filter_form' => $form,
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header),
       ),
-      'visitors_pager' => array('#theme' => 'pager')
+      'visitors_pager' => array('#type' => 'pager')
     );
   }
 
Index: web/modules/contrib/visitors/src/Controller/Report/DaysOfWeek.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/modules/contrib/visitors/src/Controller/Report/DaysOfWeek.php	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/src/Controller/Report/DaysOfWeek.php	(revision )
@@ -32,7 +32,7 @@
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('date'),
+      $container->get('date.formatter'),
       $container->get('form_builder')
     );
   }
@@ -46,7 +46,7 @@
    * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
    *   The form builder service.
    */
-  public function __construct(Date $date, FormBuilderInterface $form_builder) {
+  public function __construct( \Drupal\Core\Datetime\DateFormatter $date, FormBuilderInterface $form_builder) {
     $this->date        = $date;
     $this->formBuilder = $form_builder;
   }
@@ -88,7 +88,7 @@
         '#height' => $config->get('chart_height'),
       ),
       'visitors_table' => array(
-        '#theme'  => 'table',
+        '#type'  => 'table',
         '#header' => $header,
         '#rows'   => $this->_getData($header),
       ),
Index: web/modules/contrib/visitors/visitors.menu_links.yml
===================================================================
--- web/modules/contrib/visitors/visitors.menu_links.yml	(revision 7d6bb514e210ab9fe85fee9a2bef78df3338b6cc)
+++ web/modules/contrib/visitors/visitors.links.menu.yml	(revision )
@@ -1,5 +1,5 @@
 visitors.settings:
-  title: 'Visitors settings'
+  title: Visitors settings
   route_name: visitors.settings
   parent: system.admin_config_system
   description: 'Configure visitors settings.'
