Commit 30e53dfe authored by catch's avatar catch
Browse files

Issue #3262937 by mallezie, alexpott, catch, mondrake, mglaman: PHPStan fails...

Issue #3262937 by mallezie, alexpott, catch, mondrake, mglaman: PHPStan fails when @legacy tests call deprecated code
parent 8b09bcf0
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -845,16 +845,6 @@ parameters:
			count: 1
			path: rebuild.php

		-
			message: "#^The \"%%alias_id%%\" alias is deprecated in drupal\\:9\\.0\\.0 and is removed from drupal\\:20\\.0\\.0\\. This is a test\\.$#"
			count: 1
			path: tests/Drupal/FunctionalTests/Core/Container/ServiceDeprecationTest.php

		-
			message: "#^The \"deprecation_test\\.service\" service is deprecated in drupal\\:9\\.0\\.0 and is removed from drupal\\:20\\.0\\.0\\. This is a test\\.$#"
			count: 1
			path: tests/Drupal/FunctionalTests/Core/Container/ServiceDeprecationTest.php

		-
			message: "#^Drupal\\\\Tests\\\\BrowserTestBase\\:\\:\\$defaultTheme is required\\. See https\\://www\\.drupal\\.org/node/3083055, which includes recommendations on which theme to use\\.$#"
			count: 1
@@ -870,11 +860,6 @@ parameters:
			count: 12
			path: tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php

		-
			message: "#^The \"%%alias_id%%\" service is deprecated in drupal\\:8\\.0\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use the \"config\\.storage\\.sync\" service instead\\. See https\\://www\\.drupal\\.org/node/2574957$#"
			count: 1
			path: tests/Drupal/KernelTests/Core/Config/ConfigStorageStagingTest.php

		-
			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:10\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
			count: 4
+2 −0
Original line number Diff line number Diff line
@@ -34,7 +34,9 @@ class ServiceDeprecationTest extends BrowserTestBase {
  public function testGetDeprecated() {
    $this->expectDeprecation('The "deprecation_test.service" service is deprecated in drupal:9.0.0 and is removed from drupal:20.0.0. This is a test.');
    $this->expectDeprecation('The "deprecation_test.alias" alias is deprecated in drupal:9.0.0 and is removed from drupal:20.0.0. This is a test.');
    // @phpstan-ignore-next-line
    \Drupal::service('deprecation_test.service');
    // @phpstan-ignore-next-line
    \Drupal::service('deprecation_test.alias');
  }

+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ class ConfigStorageStagingTest extends KernelTestBase {
   */
  public function testConfigStorageStagingDeprecation() {
    $this->expectDeprecation('The "config.storage.staging" service is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use the "config.storage.sync" service instead. See https://www.drupal.org/node/2574957');
    // @phpstan-ignore-next-line
    $storage_staging = \Drupal::service('config.storage.staging');
    // Ensure at least one assertion.
    $this->assertInstanceOf(FileStorage::class, $storage_staging);