Issues (645)

src/GraphqlServiceProvider.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace Drupal\graphql;
4
5
use Drupal\Core\DependencyInjection\ContainerBuilder;
0 ignored issues
show
The type Drupal\Core\DependencyInjection\ContainerBuilder was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Drupal\Core\DependencyInjection\ServiceProviderBase;
0 ignored issues
show
The type Drupal\Core\DependencyIn...ion\ServiceProviderBase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
/**
9
 * GraphQL service provider.
10
 */
11
class GraphqlServiceProvider extends ServiceProviderBase {
12
13
  /**
14
   * {@inheritdoc}
15
   */
16
  public function alter(ContainerBuilder $container) {
17
    // Replace the language negotiator with a fixed one.
18
    // Can be removed if this is fixed.
19
    // https://www.drupal.org/project/drupal/issues/2952789
20
    if ($container->hasDefinition('language_negotiator')) {
21
      $container->getDefinition('language_negotiator')
22
        ->setClass(FixedLanguageNegotiator::class);
23
    }
24
  }
25
26
}
27