Skip to content

Commit

Permalink
Merge branch '8.x-4.x' into dataproducer-default-value
Browse files Browse the repository at this point in the history
  • Loading branch information
klausi authored Jun 14, 2024
2 parents 621a78a + d9ad85d commit d4a35c6
Show file tree
Hide file tree
Showing 36 changed files with 42 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
jangregor/phpstan-prophecy:^1.0.0 \
phpstan/phpstan-phpunit:^1.0.0 \
phpstan/extension-installer:^1.0
composer --no-interaction --no-progress --with-all-dependencies upgrade drupal/coder:8.3.23
composer --no-interaction --no-progress --with-all-dependencies upgrade drupal/coder:8.3.24
- name: Run PHPStan
if: ${{ matrix.phpstan == '1' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct(
array $configuration,
$pluginId,
$pluginDefinition,
EntityTypeManagerInterface $entityTypeManager
EntityTypeManagerInterface $entityTypeManager,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->entityTypeManager = $entityTypeManager;
Expand Down
4 changes: 2 additions & 2 deletions src/GraphQL/Execution/Executor.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function __construct(
$root,
$variables,
$operation,
callable $resolver
callable $resolver,
) {
$this->contextsManager = $contextsManager;
$this->cacheBackend = $cacheBackend;
Expand Down Expand Up @@ -191,7 +191,7 @@ public static function create(
$root,
$variables,
$operation,
callable $resolver
callable $resolver,
) {
return new static(
$container->get('cache_contexts_manager'),
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Execution/ExecutorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function create(
ResolveContext $context,
$variables,
$operation,
callable $resolver
callable $resolver,
) {
return Executor::create($this->container,
$adapter,
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Execution/ResolveContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function __construct(
OperationParams $operation,
DocumentNode $document,
$type,
array $config
array $config,
) {
$this->addCacheContexts(['user.permissions']);

Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Resolver/DefaultValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function resolve(
$args,
ResolveContext $context,
ResolveInfo $info,
FieldContext $field
FieldContext $field,
) {
$result = $this->value->resolve($value, $args, $context, $info, $field);
if ($result === NULL) {
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Utility/FileUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function __construct(
ConfigFactoryInterface $config_factory,
RendererInterface $renderer,
EventDispatcherInterface $eventDispatcher,
ImageFactory $image_factory
ImageFactory $image_factory,
) {
/** @var \Drupal\file\FileStorageInterface $file_storage */
$file_storage = $entityTypeManager->getStorage('file');
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/DataProducerPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __construct(
CacheBackendInterface $resultCacheBackend,
$pluginInterface,
$pluginAnnotationName,
array $config
array $config,
) {
parent::__construct(
$pluginSubdirectory,
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/DataProducer/DataProducerProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function __construct(
DataProducerPluginManager $pluginManager,
RequestStack $requestStack,
CacheContextsManager $contextsManager,
CacheBackendInterface $cacheBackend
CacheBackendInterface $cacheBackend,
) {
$this->id = $id;
$this->mapping = $mapping;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/DataProducer/Entity/EntityLoad.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function __construct(
array $pluginDefinition,
EntityTypeManagerInterface $entityTypeManager,
EntityRepositoryInterface $entityRepository,
EntityBuffer $entityBuffer
EntityBuffer $entityBuffer,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->entityTypeManager = $entityTypeManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function __construct(
array $pluginDefinition,
EntityTypeManagerInterface $entityTypeManager,
EntityRepositoryInterface $entityRepository,
EntityUuidBuffer $entityBuffer
EntityUuidBuffer $entityBuffer,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->entityTypeManager = $entityTypeManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function __construct(
array $pluginDefinition,
EntityTypeManagerInterface $entityTypeManager,
EntityRepositoryInterface $entityRepository,
EntityBuffer $entityBuffer
EntityBuffer $entityBuffer,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->entityTypeManager = $entityTypeManager;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/DataProducer/Entity/EntityQueryBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct(
string $pluginId,
array $pluginDefinition,
EntityTypeManager $entityTypeManager,
AccountProxyInterface $current_user
AccountProxyInterface $current_user,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->entityTypeManager = $entityTypeManager;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/DataProducer/Entity/EntityRendered.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function __construct(
$pluginId,
$pluginDefinition,
EntityTypeManagerInterface $entityTypeManager,
RendererInterface $renderer
RendererInterface $renderer,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->entityTypeManager = $entityTypeManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function __construct(
array $configuration,
$pluginId,
$pluginDefinition,
RendererInterface $renderer
RendererInterface $renderer,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->renderer = $renderer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function __construct(
$pluginId,
$pluginDefinition,
RendererInterface $renderer,
FileUrlGeneratorInterface $fileUrlGenerator
FileUrlGeneratorInterface $fileUrlGenerator,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->renderer = $renderer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function __construct(
array $configuration,
string $plugin_id,
array $plugin_definition,
EntityTypeManager $entity_type_manager
EntityTypeManager $entity_type_manager,
) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->entityTypeManager = $entity_type_manager;
Expand All @@ -100,10 +100,11 @@ public function __construct(
* @return \Drupal\Core\Entity\EntityTypeInterface
* The entity definition.
*/
public function resolve(string $entity_type,
public function resolve(
string $entity_type,
?string $bundle,
?string $field_types,
FieldContext $field_context
FieldContext $field_context,
): EntityTypeInterface {
if ($bundle) {
$bundle_info = \Drupal::service('entity_type.bundle.info')->getBundleInfo($entity_type);
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/GraphQL/DataProducer/EntityDefinition/Fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function __construct(
string $plugin_id,
array $plugin_definition,
EntityTypeManager $entity_type_manager,
EntityFieldManager $entity_field_manager
EntityFieldManager $entity_field_manager,
) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->entityTypeManager = $entity_type_manager;
Expand Down Expand Up @@ -119,7 +119,7 @@ public function resolve(
EntityTypeInterface $entity_definition,
?array $bundle_context,
?string $field_types_context,
FieldContext $field_context
FieldContext $field_context,
): \Iterator {

if ($entity_definition instanceof ContentEntityTypeInterface) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Hidden extends DataProducerPluginBase {
*/
public function resolve(
FieldDefinitionInterface $entity_definition_field,
?EntityFormDisplay $entity_form_display_context
?EntityFormDisplay $entity_form_display_context,
): bool {
if ($entity_form_display_context) {
$hidden = $entity_form_display_context->get('hidden');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Settings extends DataProducerPluginBase {
*/
public function resolve(
FieldDefinitionInterface $entity_definition_field,
?EntityFormDisplay $entity_form_display_context
?EntityFormDisplay $entity_form_display_context,
): \Iterator {
$settings = $entity_definition_field->getSettings();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Weight extends DataProducerPluginBase {
*/
public function resolve(
FieldDefinitionInterface $entity_definition_field,
?EntityFormDisplay $entity_form_display_context
?EntityFormDisplay $entity_form_display_context,
): int {
if ($entity_form_display_context) {
$content = $entity_form_display_context->get('content');
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/DataProducer/Field/EntityReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function __construct(
array $pluginDefinition,
EntityTypeManagerInterface $entityTypeManager,
EntityRepositoryInterface $entityRepository,
EntityBuffer $entityBuffer
EntityBuffer $entityBuffer,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->entityTypeManager = $entityTypeManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function __construct(
string $pluginId,
array $pluginDefinition,
EntityTypeManager $entityTypeManager,
EntityRevisionBuffer $entityRevisionBuffer
EntityRevisionBuffer $entityRevisionBuffer,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->entityTypeManager = $entityTypeManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function __construct(
string $pluginId,
array $pluginDefinition,
EntityTypeManager $entityTypeManager,
EntityRevisionBuffer $entityRevisionBuffer
EntityRevisionBuffer $entityRevisionBuffer,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->entityTypeManager = $entityTypeManager;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/DataProducer/Routing/RouteEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function __construct(
$pluginId,
$pluginDefinition,
EntityTypeManagerInterface $entityTypeManager,
EntityBuffer $entityBuffer
EntityBuffer $entityBuffer,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->entityTypeManager = $entityTypeManager;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/DataProducer/Routing/RouteLoad.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function __construct(
$pluginId,
$pluginDefinition,
PathValidatorInterface $pathValidator,
?RedirectRepository $redirectRepository = NULL
?RedirectRepository $redirectRepository = NULL,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->pathValidator = $pathValidator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function __construct(
string $pluginId,
array $pluginDefinition,
EntityTypeManagerInterface $entityTypeManager,
EntityBuffer $entityBuffer
EntityBuffer $entityBuffer,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->entityTypeManager = $entityTypeManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function __construct(
$plugin_definition,
Connection $database,
EntityTypeManagerInterface $entity_type_manager,
ModuleHandlerInterface $module_handler
ModuleHandlerInterface $module_handler,
) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->database = $database;
Expand Down Expand Up @@ -271,7 +271,7 @@ public function resolve(
?string $match_string,
bool $prioritize_start_with,
int $limit,
FieldContext $context
FieldContext $context,
): ?array {
if ($limit <= 0) {
$limit = 10;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/DataProducer/User/PasswordReset.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function __construct(
string $plugin_id,
array $plugin_definition,
Request $current_request,
LoggerChannelInterface $logger
LoggerChannelInterface $logger,
) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->currentRequest = $current_request;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/GraphQL/Schema/SdlSchemaPluginBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function __construct(
CacheBackendInterface $astCache,
ModuleHandlerInterface $moduleHandler,
SchemaExtensionPluginManager $extensionManager,
array $config
array $config,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->inDevelopment = !empty($config['development']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(
array $configuration,
$pluginId,
array $pluginDefinition,
ModuleHandlerInterface $moduleHandler
ModuleHandlerInterface $moduleHandler,
) {
parent::__construct($configuration, $pluginId, $pluginDefinition);
$this->moduleHandler = $moduleHandler;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/PersistedQueryPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(
CacheBackendInterface $definitionCacheBackend,
$pluginInterface,
$pluginAnnotationName,
array $config
array $config,
) {
parent::__construct(
$pluginSubdirectory,
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/SchemaExtensionPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct(
CacheBackendInterface $cacheBackend,
$pluginInterface,
$pluginAnnotationName,
array $config
array $config,
) {
parent::__construct(
$pluginSubdirectory,
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/SchemaPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(
CacheBackendInterface $cacheBackend,
$pluginInterface,
$pluginAnnotationName,
array $config
array $config,
) {
parent::__construct(
$pluginSubdirectory,
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/Framework/UploadFileServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ protected function getUploadedFile(
int $error_status,
int $size = 0,
string $dest_filename = 'test.txt',
string $source_filename = 'graphql_upload_test.txt'
string $source_filename = 'graphql_upload_test.txt',
): UploadedFile {

$source_filepath = $this->getSourceTestFilePath($source_filename);
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Traits/HttpRequestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function query(
array $extensions = [],
bool $persisted = FALSE,
string $method = Request::METHOD_GET,
string $operationName = ''
string $operationName = '',
) {
$server = $server ?: $this->server;
$endpoint = $this->server->get('endpoint');
Expand Down

0 comments on commit d4a35c6

Please sign in to comment.