From f50b372e857fab3cc2a7039a5be3e4b7662bf374 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Tue, 7 Jun 2022 12:37:04 +0100
Subject: [PATCH] Issue #3282315 by mondrake, mallezie, alexpott: Update
 phpstan/phpstan and mglaman/phpstan-drupal to latest versions

---
 composer.json                                 |  4 +--
 composer.lock                                 | 31 +++++++++----------
 .../Metapackage/DevDependencies/composer.json |  4 +--
 .../PinnedDevDependencies/composer.json       |  4 +--
 core/modules/comment/comment.module           |  2 +-
 core/modules/history/history.module           |  2 +-
 core/phpstan-baseline.neon                    |  2 +-
 7 files changed, 23 insertions(+), 26 deletions(-)

diff --git a/composer.json b/composer.json
index 0fa2329bbdb3..3b5e5bd714df 100644
--- a/composer.json
+++ b/composer.json
@@ -21,12 +21,12 @@
         "composer/composer": "^2.3.5",
         "drupal/coder": "^8.3.10",
         "instaclick/php-webdriver": "^1.4.1",
-        "mglaman/phpstan-drupal": "^1.1.9",
+        "mglaman/phpstan-drupal": "1.1.19",
         "mikey179/vfsstream": "^1.6.8",
         "phpunit/phpunit": "^9.5",
         "phpspec/prophecy-phpunit": "^2",
         "phpstan/extension-installer": "^1.1",
-        "phpstan/phpstan": "^1.4.0",
+        "phpstan/phpstan": "1.7.10",
         "symfony/css-selector": "^6.0",
         "symfony/phpunit-bridge": "^6.0",
         "symfony/var-dumper": "^6.0",
diff --git a/composer.lock b/composer.lock
index 216890bb1d34..8ff7d661df70 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": "ff19361e7e9a5766f37cf73a99d3e5ba",
+    "content-hash": "ebb4f2cb2ec7e1defce66b73926a53bd",
     "packages": [
         {
             "name": "asm89/stack-cors",
@@ -5250,21 +5250,21 @@
         },
         {
             "name": "mglaman/phpstan-drupal",
-            "version": "1.1.16",
+            "version": "1.1.19",
             "source": {
                 "type": "git",
                 "url": "https://github.com/mglaman/phpstan-drupal.git",
-                "reference": "2c72ac675e5630e1f421adb1bf4e6546310d6b05"
+                "reference": "b3dac214fa90d8b5e79a426693cf78313d154f5e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/mglaman/phpstan-drupal/zipball/2c72ac675e5630e1f421adb1bf4e6546310d6b05",
-                "reference": "2c72ac675e5630e1f421adb1bf4e6546310d6b05",
+                "url": "https://api.github.com/repos/mglaman/phpstan-drupal/zipball/b3dac214fa90d8b5e79a426693cf78313d154f5e",
+                "reference": "b3dac214fa90d8b5e79a426693cf78313d154f5e",
                 "shasum": ""
             },
             "require": {
                 "php": "^7.4 || ^8.0",
-                "phpstan/phpstan": "^1.0",
+                "phpstan/phpstan": "^1.7.0",
                 "symfony/finder": "~3.4.5 ||^4.2 || ^5.0 || ^6.0",
                 "symfony/yaml": "~3.4.5 || ^4.2|| ^5.0 || ^6.0",
                 "webflo/drupal-finder": "^1.2"
@@ -5317,9 +5317,6 @@
                 }
             },
             "autoload": {
-                "files": [
-                    "drupal-phpunit-hack.php"
-                ],
                 "psr-4": {
                     "mglaman\\PHPStanDrupal\\": "src/"
                 }
@@ -5337,7 +5334,7 @@
             "description": "Drupal extension and rules for PHPStan",
             "support": {
                 "issues": "https://github.com/mglaman/phpstan-drupal/issues",
-                "source": "https://github.com/mglaman/phpstan-drupal/tree/1.1.16"
+                "source": "https://github.com/mglaman/phpstan-drupal/tree/1.1.19"
             },
             "funding": [
                 {
@@ -5353,7 +5350,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-04-13T20:19:23+00:00"
+            "time": "2022-06-04T20:22:12+00:00"
         },
         {
             "name": "mikey179/vfsstream",
@@ -6002,16 +5999,16 @@
         },
         {
             "name": "phpstan/phpstan",
-            "version": "1.6.8",
+            "version": "1.7.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpstan/phpstan.git",
-                "reference": "d76498c5531232cb8386ceb6004f7e013138d3ba"
+                "reference": "25e069474cf00215b0f64c60a26230908ef3eefa"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d76498c5531232cb8386ceb6004f7e013138d3ba",
-                "reference": "d76498c5531232cb8386ceb6004f7e013138d3ba",
+                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/25e069474cf00215b0f64c60a26230908ef3eefa",
+                "reference": "25e069474cf00215b0f64c60a26230908ef3eefa",
                 "shasum": ""
             },
             "require": {
@@ -6037,7 +6034,7 @@
             "description": "PHPStan - PHP Static Analysis Tool",
             "support": {
                 "issues": "https://github.com/phpstan/phpstan/issues",
-                "source": "https://github.com/phpstan/phpstan/tree/1.6.8"
+                "source": "https://github.com/phpstan/phpstan/tree/1.7.10"
             },
             "funding": [
                 {
@@ -6057,7 +6054,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-05-10T06:54:21+00:00"
+            "time": "2022-06-03T14:12:23+00:00"
         },
         {
             "name": "phpunit/php-code-coverage",
diff --git a/composer/Metapackage/DevDependencies/composer.json b/composer/Metapackage/DevDependencies/composer.json
index 5ba3cf9f99d0..d727a96df248 100644
--- a/composer/Metapackage/DevDependencies/composer.json
+++ b/composer/Metapackage/DevDependencies/composer.json
@@ -15,11 +15,11 @@
         "easyrdf/easyrdf": "^1.0",
         "instaclick/php-webdriver": "^1.4.1",
         "justinrainbow/json-schema": "^5.2",
-        "mglaman/phpstan-drupal": "^1.1.9",
+        "mglaman/phpstan-drupal": "1.1.19",
         "mikey179/vfsstream": "^1.6.8",
         "phpspec/prophecy-phpunit": "^2",
         "phpstan/extension-installer": "^1.1",
-        "phpstan/phpstan": "^1.4.0",
+        "phpstan/phpstan": "1.7.10",
         "phpunit/phpunit": "^9.5",
         "symfony/browser-kit": "^6.0",
         "symfony/css-selector": "^6.0",
diff --git a/composer/Metapackage/PinnedDevDependencies/composer.json b/composer/Metapackage/PinnedDevDependencies/composer.json
index 7d59a9a0c389..ef736fbceb58 100644
--- a/composer/Metapackage/PinnedDevDependencies/composer.json
+++ b/composer/Metapackage/PinnedDevDependencies/composer.json
@@ -23,7 +23,7 @@
         "easyrdf/easyrdf": "1.1.1",
         "instaclick/php-webdriver": "1.4.14",
         "justinrainbow/json-schema": "5.2.12",
-        "mglaman/phpstan-drupal": "1.1.16",
+        "mglaman/phpstan-drupal": "1.1.19",
         "mikey179/vfsstream": "v1.6.10",
         "myclabs/deep-copy": "1.11.0",
         "nikic/php-parser": "v4.13.2",
@@ -36,7 +36,7 @@
         "phpspec/prophecy-phpunit": "v2.0.1",
         "phpstan/extension-installer": "1.1.0",
         "phpstan/phpdoc-parser": "1.5.1",
-        "phpstan/phpstan": "1.6.8",
+        "phpstan/phpstan": "1.7.10",
         "phpunit/php-code-coverage": "9.2.15",
         "phpunit/php-file-iterator": "3.0.6",
         "phpunit/php-invoker": "3.1.1",
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 8b3e026ba72a..0fac1d23e267 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -37,7 +37,7 @@
  *
  * @todo Remove when https://www.drupal.org/node/1029708 lands.
  */
-define('COMMENT_NEW_LIMIT', REQUEST_TIME - 30 * 24 * 60 * 60);
+define('COMMENT_NEW_LIMIT', REQUEST_TIME - 2592000);
 
 /**
  * Implements hook_help().
diff --git a/core/modules/history/history.module b/core/modules/history/history.module
index 02dd964fd7cd..95da9b651eba 100644
--- a/core/modules/history/history.module
+++ b/core/modules/history/history.module
@@ -21,7 +21,7 @@
  * Entities changed within this time may be marked as new, updated, or read,
  * depending on their state for the current user. Defaults to 30 days ago.
  */
-define('HISTORY_READ_LIMIT', REQUEST_TIME - 30 * 24 * 60 * 60);
+define('HISTORY_READ_LIMIT', REQUEST_TIME - 2592000);
 
 /**
  * Implements hook_help().
diff --git a/core/phpstan-baseline.neon b/core/phpstan-baseline.neon
index 2dcef51f45d8..09c6de4ca53e 100644
--- a/core/phpstan-baseline.neon
+++ b/core/phpstan-baseline.neon
@@ -1671,7 +1671,7 @@ parameters:
 			path: modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php
 
 		-
-			message: "#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\SectionStorage\\\\TestStateBasedSectionStorage\\:\\:access\\(\\) should return bool\\|Drupal\\\\Core\\\\Access\\\\AccessResultInterface but return statement is missing\\.$#"
+			message: "#^Method Drupal\\\\layout_builder_test\\\\Plugin\\\\SectionStorage\\\\TestStateBasedSectionStorage\\:\\:access\\(\\) should return \\(\\$return_as_object is true \\? Drupal\\\\Core\\\\Access\\\\AccessResultInterface \\: bool\\) but return statement is missing\\.$#"
 			count: 1
 			path: modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/TestStateBasedSectionStorage.php
 
-- 
GitLab