From 1310e25d068ce156aff9c7b8388c27a614abcd89 Mon Sep 17 00:00:00 2001
From: "lee.5151" <lee.5151@osu.edu>
Date: Mon, 17 Jul 2023 13:42:52 -0400
Subject: [PATCH] Upgrading drupal/view_unpublished (1.0.0 => 1.1.0)

---
 composer.json                                 |  2 +-
 composer.lock                                 | 18 ++--
 vendor/composer/ClassLoader.php               | 96 +++++++++----------
 vendor/composer/InstalledVersions.php         | 17 +++-
 vendor/composer/installed.json                | 26 +++--
 vendor/composer/installed.php                 | 10 +-
 web/modules/view_unpublished/composer.json    |  1 +
 .../src/ViewUnpublishedInstallHelper.php      | 13 ++-
 .../ViewUnpublishedMultilingualTest.php       | 20 ++--
 .../Functional/ViewUnpublishedViewsTest.php   | 18 +++-
 .../Kernel/ViewUnpublishedDependencyTest.php  |  4 +-
 .../view_unpublished.info.yml                 |  9 +-
 12 files changed, 134 insertions(+), 100 deletions(-)

diff --git a/composer.json b/composer.json
index b5779e3856..4e99e78aca 100644
--- a/composer.json
+++ b/composer.json
@@ -166,7 +166,7 @@
         "drupal/ultimate_cron": "^2.0@alpha",
         "drupal/userprotect": "1.1",
         "drupal/video_embed_field": "2.4",
-        "drupal/view_unpublished": "1.0",
+        "drupal/view_unpublished": "1.1",
         "drupal/views_ajax_history": "1.7",
         "drupal/views_autocomplete_filters": "1.3",
         "drupal/views_bootstrap": "3.6",
diff --git a/composer.lock b/composer.lock
index d2ce6f94d0..d57cb1d3cd 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "12bd67cbe8783bcbbc1e4c2879d4a532",
+    "content-hash": "0eaf8401a7ad7ec701a7e30a2a19c381",
     "packages": [
         {
             "name": "alchemy/zippy",
@@ -7498,26 +7498,26 @@
         },
         {
             "name": "drupal/view_unpublished",
-            "version": "1.0.0",
+            "version": "1.1.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/view_unpublished.git",
-                "reference": "8.x-1.0"
+                "reference": "8.x-1.1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/view_unpublished-8.x-1.0.zip",
-                "reference": "8.x-1.0",
-                "shasum": "74ebdf1b4f6963f7bb63192bc314014c0132d03c"
+                "url": "https://ftp.drupal.org/files/projects/view_unpublished-8.x-1.1.zip",
+                "reference": "8.x-1.1",
+                "shasum": "f9f5e88cbaf1a1e71952d94cf67ef2f180e292be"
             },
             "require": {
-                "drupal/core": "^8 || ^9"
+                "drupal/core": "^9.4 || ^10"
             },
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-1.0",
-                    "datestamp": "1597688978",
+                    "version": "8.x-1.1",
+                    "datestamp": "1681757575",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index a72151c77c..7824d8f7ea 100644
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -45,35 +45,34 @@ class ClassLoader
     /** @var \Closure(string):void */
     private static $includeFile;
 
-    /** @var ?string */
+    /** @var string|null */
     private $vendorDir;
 
     // PSR-4
     /**
-     * @var array[]
-     * @psalm-var array<string, array<string, int>>
+     * @var array<string, array<string, int>>
      */
     private $prefixLengthsPsr4 = array();
     /**
-     * @var array[]
-     * @psalm-var array<string, array<int, string>>
+     * @var array<string, list<string>>
      */
     private $prefixDirsPsr4 = array();
     /**
-     * @var array[]
-     * @psalm-var array<string, string>
+     * @var list<string>
      */
     private $fallbackDirsPsr4 = array();
 
     // PSR-0
     /**
-     * @var array[]
-     * @psalm-var array<string, array<string, string[]>>
+     * List of PSR-0 prefixes
+     *
+     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
+     *
+     * @var array<string, array<string, list<string>>>
      */
     private $prefixesPsr0 = array();
     /**
-     * @var array[]
-     * @psalm-var array<string, string>
+     * @var list<string>
      */
     private $fallbackDirsPsr0 = array();
 
@@ -81,8 +80,7 @@ class ClassLoader
     private $useIncludePath = false;
 
     /**
-     * @var string[]
-     * @psalm-var array<string, string>
+     * @var array<string, string>
      */
     private $classMap = array();
 
@@ -90,21 +88,20 @@ class ClassLoader
     private $classMapAuthoritative = false;
 
     /**
-     * @var bool[]
-     * @psalm-var array<string, bool>
+     * @var array<string, bool>
      */
     private $missingClasses = array();
 
-    /** @var ?string */
+    /** @var string|null */
     private $apcuPrefix;
 
     /**
-     * @var self[]
+     * @var array<string, self>
      */
     private static $registeredLoaders = array();
 
     /**
-     * @param ?string $vendorDir
+     * @param string|null $vendorDir
      */
     public function __construct($vendorDir = null)
     {
@@ -113,7 +110,7 @@ public function __construct($vendorDir = null)
     }
 
     /**
-     * @return string[]
+     * @return array<string, list<string>>
      */
     public function getPrefixes()
     {
@@ -125,8 +122,7 @@ public function getPrefixes()
     }
 
     /**
-     * @return array[]
-     * @psalm-return array<string, array<int, string>>
+     * @return array<string, list<string>>
      */
     public function getPrefixesPsr4()
     {
@@ -134,8 +130,7 @@ public function getPrefixesPsr4()
     }
 
     /**
-     * @return array[]
-     * @psalm-return array<string, string>
+     * @return list<string>
      */
     public function getFallbackDirs()
     {
@@ -143,8 +138,7 @@ public function getFallbackDirs()
     }
 
     /**
-     * @return array[]
-     * @psalm-return array<string, string>
+     * @return list<string>
      */
     public function getFallbackDirsPsr4()
     {
@@ -152,8 +146,7 @@ public function getFallbackDirsPsr4()
     }
 
     /**
-     * @return string[] Array of classname => path
-     * @psalm-return array<string, string>
+     * @return array<string, string> Array of classname => path
      */
     public function getClassMap()
     {
@@ -161,8 +154,7 @@ public function getClassMap()
     }
 
     /**
-     * @param string[] $classMap Class to filename map
-     * @psalm-param array<string, string> $classMap
+     * @param array<string, string> $classMap Class to filename map
      *
      * @return void
      */
@@ -179,24 +171,25 @@ public function addClassMap(array $classMap)
      * Registers a set of PSR-0 directories for a given prefix, either
      * appending or prepending to the ones previously set for this prefix.
      *
-     * @param string          $prefix  The prefix
-     * @param string[]|string $paths   The PSR-0 root directories
-     * @param bool            $prepend Whether to prepend the directories
+     * @param string              $prefix  The prefix
+     * @param list<string>|string $paths   The PSR-0 root directories
+     * @param bool                $prepend Whether to prepend the directories
      *
      * @return void
      */
     public function add($prefix, $paths, $prepend = false)
     {
+        $paths = (array) $paths;
         if (!$prefix) {
             if ($prepend) {
                 $this->fallbackDirsPsr0 = array_merge(
-                    (array) $paths,
+                    $paths,
                     $this->fallbackDirsPsr0
                 );
             } else {
                 $this->fallbackDirsPsr0 = array_merge(
                     $this->fallbackDirsPsr0,
-                    (array) $paths
+                    $paths
                 );
             }
 
@@ -205,19 +198,19 @@ public function add($prefix, $paths, $prepend = false)
 
         $first = $prefix[0];
         if (!isset($this->prefixesPsr0[$first][$prefix])) {
-            $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+            $this->prefixesPsr0[$first][$prefix] = $paths;
 
             return;
         }
         if ($prepend) {
             $this->prefixesPsr0[$first][$prefix] = array_merge(
-                (array) $paths,
+                $paths,
                 $this->prefixesPsr0[$first][$prefix]
             );
         } else {
             $this->prefixesPsr0[$first][$prefix] = array_merge(
                 $this->prefixesPsr0[$first][$prefix],
-                (array) $paths
+                $paths
             );
         }
     }
@@ -226,9 +219,9 @@ public function add($prefix, $paths, $prepend = false)
      * Registers a set of PSR-4 directories for a given namespace, either
      * appending or prepending to the ones previously set for this namespace.
      *
-     * @param string          $prefix  The prefix/namespace, with trailing '\\'
-     * @param string[]|string $paths   The PSR-4 base directories
-     * @param bool            $prepend Whether to prepend the directories
+     * @param string              $prefix  The prefix/namespace, with trailing '\\'
+     * @param list<string>|string $paths   The PSR-4 base directories
+     * @param bool                $prepend Whether to prepend the directories
      *
      * @throws \InvalidArgumentException
      *
@@ -236,17 +229,18 @@ public function add($prefix, $paths, $prepend = false)
      */
     public function addPsr4($prefix, $paths, $prepend = false)
     {
+        $paths = (array) $paths;
         if (!$prefix) {
             // Register directories for the root namespace.
             if ($prepend) {
                 $this->fallbackDirsPsr4 = array_merge(
-                    (array) $paths,
+                    $paths,
                     $this->fallbackDirsPsr4
                 );
             } else {
                 $this->fallbackDirsPsr4 = array_merge(
                     $this->fallbackDirsPsr4,
-                    (array) $paths
+                    $paths
                 );
             }
         } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@@ -256,18 +250,18 @@ public function addPsr4($prefix, $paths, $prepend = false)
                 throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
             }
             $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
-            $this->prefixDirsPsr4[$prefix] = (array) $paths;
+            $this->prefixDirsPsr4[$prefix] = $paths;
         } elseif ($prepend) {
             // Prepend directories for an already registered namespace.
             $this->prefixDirsPsr4[$prefix] = array_merge(
-                (array) $paths,
+                $paths,
                 $this->prefixDirsPsr4[$prefix]
             );
         } else {
             // Append directories for an already registered namespace.
             $this->prefixDirsPsr4[$prefix] = array_merge(
                 $this->prefixDirsPsr4[$prefix],
-                (array) $paths
+                $paths
             );
         }
     }
@@ -276,8 +270,8 @@ public function addPsr4($prefix, $paths, $prepend = false)
      * Registers a set of PSR-0 directories for a given prefix,
      * replacing any others previously set for this prefix.
      *
-     * @param string          $prefix The prefix
-     * @param string[]|string $paths  The PSR-0 base directories
+     * @param string              $prefix The prefix
+     * @param list<string>|string $paths  The PSR-0 base directories
      *
      * @return void
      */
@@ -294,8 +288,8 @@ public function set($prefix, $paths)
      * Registers a set of PSR-4 directories for a given namespace,
      * replacing any others previously set for this namespace.
      *
-     * @param string          $prefix The prefix/namespace, with trailing '\\'
-     * @param string[]|string $paths  The PSR-4 base directories
+     * @param string              $prefix The prefix/namespace, with trailing '\\'
+     * @param list<string>|string $paths  The PSR-4 base directories
      *
      * @throws \InvalidArgumentException
      *
@@ -481,9 +475,9 @@ public function findFile($class)
     }
 
     /**
-     * Returns the currently registered loaders indexed by their corresponding vendor directories.
+     * Returns the currently registered loaders keyed by their corresponding vendor directories.
      *
-     * @return self[]
+     * @return array<string, self>
      */
     public static function getRegisteredLoaders()
     {
diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php
index c6b54af7ba..51e734a774 100644
--- a/vendor/composer/InstalledVersions.php
+++ b/vendor/composer/InstalledVersions.php
@@ -98,7 +98,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
     {
         foreach (self::getInstalled() as $installed) {
             if (isset($installed['versions'][$packageName])) {
-                return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
+                return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
             }
         }
 
@@ -119,7 +119,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
      */
     public static function satisfies(VersionParser $parser, $packageName, $constraint)
     {
-        $constraint = $parser->parseConstraints($constraint);
+        $constraint = $parser->parseConstraints((string) $constraint);
         $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
 
         return $provided->matches($constraint);
@@ -328,7 +328,9 @@ private static function getInstalled()
                 if (isset(self::$installedByVendor[$vendorDir])) {
                     $installed[] = self::$installedByVendor[$vendorDir];
                 } elseif (is_file($vendorDir.'/composer/installed.php')) {
-                    $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
+                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
+                    $required = require $vendorDir.'/composer/installed.php';
+                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
                     if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
                         self::$installed = $installed[count($installed) - 1];
                     }
@@ -340,12 +342,17 @@ private static function getInstalled()
             // only require the installed.php file if this file is loaded from its dumped location,
             // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
             if (substr(__DIR__, -8, 1) !== 'C') {
-                self::$installed = require __DIR__ . '/installed.php';
+                /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
+                $required = require __DIR__ . '/installed.php';
+                self::$installed = $required;
             } else {
                 self::$installed = array();
             }
         }
-        $installed[] = self::$installed;
+
+        if (self::$installed !== array()) {
+            $installed[] = self::$installed;
+        }
 
         return $installed;
     }
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 2fcf345706..7734fa1c2d 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -7762,27 +7762,27 @@
         },
         {
             "name": "drupal/view_unpublished",
-            "version": "1.0.0",
-            "version_normalized": "1.0.0.0",
+            "version": "1.1.0",
+            "version_normalized": "1.1.0.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/view_unpublished.git",
-                "reference": "8.x-1.0"
+                "reference": "8.x-1.1"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/view_unpublished-8.x-1.0.zip",
-                "reference": "8.x-1.0",
-                "shasum": "74ebdf1b4f6963f7bb63192bc314014c0132d03c"
+                "url": "https://ftp.drupal.org/files/projects/view_unpublished-8.x-1.1.zip",
+                "reference": "8.x-1.1",
+                "shasum": "f9f5e88cbaf1a1e71952d94cf67ef2f180e292be"
             },
             "require": {
-                "drupal/core": "^8 || ^9"
+                "drupal/core": "^9.4 || ^10"
             },
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-1.0",
-                    "datestamp": "1597688978",
+                    "version": "8.x-1.1",
+                    "datestamp": "1681757575",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
@@ -7811,6 +7811,14 @@
                 {
                     "name": "entendu",
                     "homepage": "https://www.drupal.org/user/173461"
+                },
+                {
+                    "name": "fathima.asmat",
+                    "homepage": "https://www.drupal.org/user/3622664"
+                },
+                {
+                    "name": "tobiasb",
+                    "homepage": "https://www.drupal.org/user/183956"
                 }
             ],
             "description": "Select which roles should be able to see unpublished nodes.",
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index 088738fa4f..c6118e5c17 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -3,7 +3,7 @@
         'name' => 'osu-asc-webservices/d8-upstream',
         'pretty_version' => 'dev-master',
         'version' => 'dev-master',
-        'reference' => 'bbc324b913982bc5f7acfcabab8daa2200f6622b',
+        'reference' => '52c5f239f26a10cfa3c2d3933c105ad12c2230cf',
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -1238,9 +1238,9 @@
             'dev_requirement' => false,
         ),
         'drupal/view_unpublished' => array(
-            'pretty_version' => '1.0.0',
-            'version' => '1.0.0.0',
-            'reference' => '8.x-1.0',
+            'pretty_version' => '1.1.0',
+            'version' => '1.1.0.0',
+            'reference' => '8.x-1.1',
             'type' => 'drupal-module',
             'install_path' => __DIR__ . '/../../web/modules/view_unpublished',
             'aliases' => array(),
@@ -1549,7 +1549,7 @@
         'osu-asc-webservices/d8-upstream' => array(
             'pretty_version' => 'dev-master',
             'version' => 'dev-master',
-            'reference' => 'bbc324b913982bc5f7acfcabab8daa2200f6622b',
+            'reference' => '52c5f239f26a10cfa3c2d3933c105ad12c2230cf',
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
diff --git a/web/modules/view_unpublished/composer.json b/web/modules/view_unpublished/composer.json
index 53d451f4f4..fcea783cd4 100644
--- a/web/modules/view_unpublished/composer.json
+++ b/web/modules/view_unpublished/composer.json
@@ -1,5 +1,6 @@
 {
     "name": "drupal/view_unpublished",
+    "type": "drupal-module",
     "description": "Select which roles should be able to see unpublished nodes.",
     "license": "GPL-2.0-or-later",
     "authors": [
diff --git a/web/modules/view_unpublished/src/ViewUnpublishedInstallHelper.php b/web/modules/view_unpublished/src/ViewUnpublishedInstallHelper.php
index de63ec48c5..46d740b967 100644
--- a/web/modules/view_unpublished/src/ViewUnpublishedInstallHelper.php
+++ b/web/modules/view_unpublished/src/ViewUnpublishedInstallHelper.php
@@ -7,9 +7,12 @@
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 
 /**
- * Class ViewUnpublishedInstallHelper.
+ * A helper class used by un-/install hooks.
+ *
+ * @see view_unpublished_install
+ * @see view_unpublished_uninstall
  */
-class ViewUnpublishedInstallHelper {
+final class ViewUnpublishedInstallHelper {
 
   /**
    * Drupal\Core\Config\ConfigFactoryInterface definition.
@@ -53,7 +56,11 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Con
    */
   public function flagRebuild() {
     $query = $this->entityTypeManager->getStorage('node')->getQuery();
-    $count_unpublished = (int) $query->condition('status', FALSE)->count()->execute();
+    $count_unpublished = (int) $query
+      ->condition('status', FALSE)
+      ->accessCheck(FALSE)
+      ->count()
+      ->execute();
     if ($count_unpublished > 0) {
       node_access_needs_rebuild(TRUE);
     }
diff --git a/web/modules/view_unpublished/tests/src/Functional/ViewUnpublishedMultilingualTest.php b/web/modules/view_unpublished/tests/src/Functional/ViewUnpublishedMultilingualTest.php
index ec79a1cb81..475d6666af 100644
--- a/web/modules/view_unpublished/tests/src/Functional/ViewUnpublishedMultilingualTest.php
+++ b/web/modules/view_unpublished/tests/src/Functional/ViewUnpublishedMultilingualTest.php
@@ -23,7 +23,11 @@ class ViewUnpublishedMultilingualTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['view_unpublished', 'node', 'content_translation'];
+  protected static $modules = [
+    'view_unpublished',
+    'node',
+    'content_translation',
+  ];
 
   /**
    * {@inheritdoc}
@@ -40,7 +44,7 @@ class ViewUnpublishedMultilingualTest extends BrowserTestBase {
   /**
    * Sets up the test.
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Create Basic page node type.
@@ -80,7 +84,8 @@ public function testIt() {
     $edit[$title_key] = $this->randomMachineName(8);
     $edit[$body_key] = $this->randomMachineName(16);
     $edit[$status_key] = 1;
-    $this->drupalPostForm('node/add/page', $edit, $this->t('Save'));
+    $this->drupalGet('node/add/page');
+    $this->submitForm($edit, 'Save');
 
     // Check the node language.
     $node = $this->getNodeByTitle($edit[$title_key]);
@@ -95,7 +100,8 @@ public function testIt() {
     $this->drupalLogin($this->adminUser);
     $edit[$body_key] = $this->randomMachineName(16);
     $edit[$status_key] = 0;
-    $this->drupalPostForm($node->toUrl('edit-form'), $edit, $this->t('Save'));
+    $this->drupalGet($node->toUrl('edit-form'));
+    $this->submitForm($edit, 'Save');
     $this->drupalLogout();
     $this->drupalGet($node->toUrl());
     $this->assertSession()->statusCodeEquals(403);
@@ -109,7 +115,8 @@ public function testIt() {
     $this->drupalLogin($this->adminUser);
     $edit[$body_key] = $this->randomMachineName(16);
     $edit[$status_key] = 1;
-    $this->drupalPostForm($node->toUrl('edit-form'), $edit, $this->t('Save'));
+    $this->drupalGet($node->toUrl('edit-form'));
+    $this->submitForm($edit, 'Save');
     $this->drupalLogout();
 
     // Anonymous users should have access.
@@ -129,7 +136,8 @@ public function testIt() {
     $edit[$status_key] = 0;
     // Unpublish the node and now anonymous users should not have access.
     $edit[$status_key] = 0;
-    $this->drupalPostForm($add_translation_url, $edit, $this->t('Save (this translation)'));
+    $this->drupalGet($add_translation_url);
+    $this->submitForm($edit, 'Save (this translation)');
     // Reset the node so we pick up the translation.
     $node = $this->getNodeByTitle($edit[$title_key], TRUE);
     $this->drupalLogout();
diff --git a/web/modules/view_unpublished/tests/src/Functional/ViewUnpublishedViewsTest.php b/web/modules/view_unpublished/tests/src/Functional/ViewUnpublishedViewsTest.php
index f44640dc25..20e550e707 100644
--- a/web/modules/view_unpublished/tests/src/Functional/ViewUnpublishedViewsTest.php
+++ b/web/modules/view_unpublished/tests/src/Functional/ViewUnpublishedViewsTest.php
@@ -19,7 +19,11 @@ class ViewUnpublishedViewsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['view_unpublished', 'node', 'views'];
+  protected static $modules = [
+    'view_unpublished',
+    'node',
+    'views',
+  ];
 
   /**
    * {@inheritdoc}
@@ -29,7 +33,7 @@ class ViewUnpublishedViewsTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Rebuild node access which we have to do after installing the module.
@@ -52,12 +56,18 @@ public function testIt() {
     $article_node->setUnPublished();
     $article_node->save();
 
-    $this->drupalLogin($this->createUser(['view any unpublished content', 'access content overview']));
+    $this->drupalLogin($this->createUser([
+      'view any unpublished content',
+      'access content overview',
+    ]));
     $this->drupalGet('admin/content');
     $this->assertSession()->pageTextContains($page_node->label());
     $this->assertSession()->pageTextContains($article_node->label());
 
-    $this->drupalLogin($this->createUser(['view any unpublished page content', 'access content overview']));
+    $this->drupalLogin($this->createUser([
+      'view any unpublished page content',
+      'access content overview',
+    ]));
     $this->drupalGet('admin/content');
     $this->assertSession()->pageTextContains($page_node->label());
     $this->assertSession()->pageTextNotContains($article_node->label());
diff --git a/web/modules/view_unpublished/tests/src/Kernel/ViewUnpublishedDependencyTest.php b/web/modules/view_unpublished/tests/src/Kernel/ViewUnpublishedDependencyTest.php
index b43938a722..f480ad0d2c 100644
--- a/web/modules/view_unpublished/tests/src/Kernel/ViewUnpublishedDependencyTest.php
+++ b/web/modules/view_unpublished/tests/src/Kernel/ViewUnpublishedDependencyTest.php
@@ -17,7 +17,7 @@ class ViewUnpublishedDependencyTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'field',
     'node',
     'system',
@@ -30,7 +30,7 @@ class ViewUnpublishedDependencyTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->installEntitySchema('user');
diff --git a/web/modules/view_unpublished/view_unpublished.info.yml b/web/modules/view_unpublished/view_unpublished.info.yml
index 1fc12ba4cb..67a62a09a1 100644
--- a/web/modules/view_unpublished/view_unpublished.info.yml
+++ b/web/modules/view_unpublished/view_unpublished.info.yml
@@ -1,13 +1,12 @@
 name: 'View Unpublished'
 description: 'Select which roles should be able to see unpublished nodes.'
 package: Permissions
-core: 8.x
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^9.4 || ^10
 type: module
 dependencies:
   - drupal:node
 
-# Information added by Drupal.org packaging script on 2020-08-17
-version: '8.x-1.0'
+# Information added by Drupal.org packaging script on 2023-04-17
+version: '8.x-1.1'
 project: 'view_unpublished'
-datestamp: 1597688980
+datestamp: 1681757576
-- 
GitLab