Verified Commit 4f89536d authored by Andrei Mateescu's avatar Andrei Mateescu
Browse files

task: #3582888 Tidy up and tighten deprecation ignores and tests marked...

task: #3582888 Tidy up and tighten deprecation ignores and tests marked #[IgnoreDeprecations] where no deprecations are triggered

By: mondrake
By: smustgrave
parent 0923b693
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -13,12 +13,12 @@

# Skip some dependencies' DebugClassLoader forward compatibility warnings, in
# order to let contrib modules make their necessary fixes first.
#
# (none at the moment)

# Indirect deprecations. These are not in Drupal's remit to fix, but it is
# worth keeping track of dependencies' issues.
%Method "Iterator::[^"]+" might add "void" as a native return type declaration in the future. Do the same in implementation "org\\bovigo\\vfs\\vfsStreamContainerIterator" now to avoid errors or add an explicit @return annotation to suppress this message%
%The "SebastianBergmann\\Comparator\\ObjectComparator" class is considered internal This class is not covered by the backward compatibility promise for sebastian/comparator%

# Drupal 13.
%The "cache.backend.memory" service is deprecated in drupal:11.3.0 and is removed from drupal:13.0.0. Use cache.backend.memory.memory instead. See https://www.drupal.org/node/3546856%
+0 −2
Original line number Diff line number Diff line
@@ -7,14 +7,12 @@
use Drupal\KernelTests\KernelTestBase;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
 * Checks the status and definition contents of deprecated libraries.
 */
#[Group('Asset')]
#[IgnoreDeprecations]
#[RunTestsInSeparateProcesses]
class DeprecatedAssetsTest extends KernelTestBase {

+0 −2
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
use Drupal\KernelTests\KernelTestBase;
use Drupal\Tests\block\Traits\BlockCreationTrait;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
use PHPUnit\Framework\Attributes\TestWith;

@@ -271,7 +270,6 @@ public function testSetPropertiesWillNotChangeEntityKeys(string $key): void {
  /**
   * Tests that the simpleConfigUpdate action cannot be used on entities.
   */
  #[IgnoreDeprecations]
  public function testSimpleConfigUpdateFailsOnEntities(): void {
    $view_display = $this->container->get(EntityDisplayRepositoryInterface::class)
      ->getViewDisplay('entity_test_with_bundle', 'test');
+1 −3
Original line number Diff line number Diff line
@@ -8,20 +8,18 @@
use Drupal\Tests\UnitTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;

/**
 * Tests the Layout attribute.
 */
#[CoversClass(Layout::class)]
#[Group('Layout')]
#[IgnoreDeprecations]
class LayoutAttributeTest extends UnitTestCase {

  /**
   * Test deprecating plugins without a label or category.
   */
  public function testDeprecatedMissingProperties(): void {
  public function testMissingProperties(): void {
    $this->expectException(\InvalidArgumentException::class);
    $this->expectExceptionMessage('The "layout_without_label" layout plugin must have at least one of the label or deriver properties.');
    new Layout('layout_without_label');
+1 −1
Original line number Diff line number Diff line
@@ -282,9 +282,9 @@ public static function providerTestFakeDeprecatedSettings(): array {
   *   The expected deprecation message.
   */
  #[DataProvider('providerTestRealDeprecatedSettings')]
  #[IgnoreDeprecations]
  public function testRealDeprecatedSettings(string $legacy_setting, string $expected_deprecation): void {
    $this->markTestSkipped('No settings to test real deprecated settings with.');

    $settings_file_content = "<?php\n\$settings['$legacy_setting'] = 'foo';\n";
    $class_loader = NULL;
    $vfs_root = vfsStream::setup('root');