Commit 2d8018be authored by catch's avatar catch
Browse files

Issue #3255804 by godotislate, longwave, berdir, alexpott, catch, andypost,...

Issue #3255804 by godotislate, longwave, berdir, alexpott, catch, andypost, smustgrave: Hidden dependency on block_content in layout_builder

(cherry picked from commit b6f09451)
parent bdffe218
Loading
Loading
Loading
Loading
Loading
+49 −67
Original line number Diff line number Diff line
@@ -11725,18 +11725,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\block_content\\\\Access\\\\AccessGroupAnd\\:\\:addDependency\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/block_content/src/Access/AccessGroupAnd.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\block_content\\\\Access\\\\AccessGroupAnd\\:\\:getDependencies\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/block_content/src/Access/AccessGroupAnd.php',
];
$ignoreErrors[] = [
	'message' => '#^Variable \\$dependency in empty\\(\\) always exists and is not falsy\\.$#',
	'identifier' => 'empty.variable',
@@ -12085,12 +12073,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Unit\\\\Access\\\\DependentAccessTest\\:\\:providerTestSetFirst\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Unit\\\\Menu\\\\BlockContentLocalTasksTest\\:\\:getBlockContentListingRoutes\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
@@ -27007,6 +26989,30 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/Form/NodeDeleteForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeForm\\:\\:create\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/Form/NodeForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeForm\\:\\:form\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/Form/NodeForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeForm\\:\\:preview\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/Form/NodeForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#',
	'identifier' => 'return.missing',
	'count' => 2,
	'path' => __DIR__ . '/modules/node/src/Form/NodeForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodePreviewForm\\:\\:create\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
@@ -27050,58 +27056,58 @@
	'path' => __DIR__ . '/modules/node/src/Form/NodeRevisionRevertTranslationForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\RebuildPermissionsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#',
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeTypeForm\\:\\:create\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/Form/RebuildPermissionsForm.php',
	'path' => __DIR__ . '/modules/node/src/Form/NodeTypeForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandler\\:\\:deleteGrants\\(\\) has no return type specified\\.$#',
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeTypeForm\\:\\:form\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/NodeAccessControlHandler.php',
	'path' => __DIR__ . '/modules/node/src/Form/NodeTypeForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandler\\:\\:writeDefaultGrant\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeTypeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#',
	'identifier' => 'return.missing',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/NodeAccessControlHandler.php',
	'path' => __DIR__ . '/modules/node/src/Form/NodeTypeForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandlerInterface\\:\\:deleteGrants\\(\\) has no return type specified\\.$#',
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeTypeForm\\:\\:validateForm\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/NodeAccessControlHandlerInterface.php',
	'path' => __DIR__ . '/modules/node/src/Form/NodeTypeForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandlerInterface\\:\\:writeDefaultGrant\\(\\) has no return type specified\\.$#',
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\RebuildPermissionsForm\\:\\:submitForm\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/NodeAccessControlHandlerInterface.php',
	'path' => __DIR__ . '/modules/node/src/Form/RebuildPermissionsForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeForm\\:\\:create\\(\\) has no return type specified\\.$#',
	'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandler\\:\\:deleteGrants\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/Form/NodeForm.php',
	'path' => __DIR__ . '/modules/node/src/NodeAccessControlHandler.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeForm\\:\\:form\\(\\) has no return type specified\\.$#',
	'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandler\\:\\:writeDefaultGrant\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/Form/NodeForm.php',
	'path' => __DIR__ . '/modules/node/src/NodeAccessControlHandler.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeForm\\:\\:preview\\(\\) has no return type specified\\.$#',
	'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandlerInterface\\:\\:deleteGrants\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/Form/NodeForm.php',
	'path' => __DIR__ . '/modules/node/src/NodeAccessControlHandlerInterface.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#',
	'identifier' => 'return.missing',
	'count' => 2,
	'path' => __DIR__ . '/modules/node/src/Form/NodeForm.php',
	'message' => '#^Method Drupal\\\\node\\\\NodeAccessControlHandlerInterface\\:\\:writeDefaultGrant\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/NodeAccessControlHandlerInterface.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\NodeGrantDatabaseStorage\\:\\:alterQuery\\(\\) should return int but return statement is missing\\.$#',
@@ -27187,30 +27193,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/NodeTranslationHandler.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeTypeForm\\:\\:create\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/Form/NodeTypeForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeTypeForm\\:\\:form\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/Form/NodeTypeForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeTypeForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#',
	'identifier' => 'return.missing',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/Form/NodeTypeForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\Form\\\\NodeTypeForm\\:\\:validateForm\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/node/src/Form/NodeTypeForm.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\node\\\\NodeTypeInterface\\:\\:setDisplaySubmitted\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
+11 −5
Original line number Diff line number Diff line
<?php

namespace Drupal\block_content\Access;
namespace Drupal\Core\Access;

use Drupal\Core\Access\AccessibleInterface;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Session\AccountInterface;

/**
@@ -21,7 +19,12 @@ class AccessGroupAnd implements AccessibleInterface {
  protected $dependencies = [];

  /**
   * {@inheritdoc}
   * Adds an access dependency.
   *
   * @param \Drupal\Core\Access\AccessibleInterface $dependency
   *   The access dependency to be added.
   *
   * @return $this
   */
  public function addDependency(AccessibleInterface $dependency) {
    $this->dependencies[] = $dependency;
@@ -40,7 +43,10 @@ public function access($operation, ?AccountInterface $account = NULL, $return_as
  }

  /**
   * {@inheritdoc}
   * Gets all the access dependencies.
   *
   * @return list<\Drupal\Core\Access\AccessibleInterface>
   *   The list of access dependencies.
   */
  public function getDependencies() {
    return $this->dependencies;
+1 −1
Original line number Diff line number Diff line
<?php

namespace Drupal\block_content\Access;
namespace Drupal\Core\Access;

/**
 * Interface for AccessibleInterface objects that have an access dependency.
+1 −3
Original line number Diff line number Diff line
<?php

namespace Drupal\block_content\Access;

use Drupal\Core\Access\AccessibleInterface;
namespace Drupal\Core\Access;

/**
 * An interface to allow adding an access dependency.
+2 −4
Original line number Diff line number Diff line
<?php

namespace Drupal\block_content\Access;

use Drupal\Core\Access\AccessibleInterface;
namespace Drupal\Core\Access;

/**
 * Trait for \Drupal\block_content\Access\RefinableDependentAccessInterface.
 * Trait for \Drupal\Core\Access\RefinableDependentAccessInterface.
 *
 * @internal
 */
Loading