Claudiu Cristea commented on merge request !60 at project / babel

Claudiu Cristea
2025-10-01T07:27:16Z

This is a suggestion determined by !60 (diffs, comment 597751)

use Drupal\Core\DestructableInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Lock\LockBackendInterface;
use Symfony\Component\DependencyInjection\Attribute\Autowire;

/**
 * Factory for translated string collectors.
 */
class StringsCollectorFactory implements DestructableInterface {

  /**
   * Static cache of string collectors.
   *
   * @var list<\Drupal\babel\StringsCollector>
   */
  protected array $collectors = [];

  public function __construct(
    #[Autowire(service: 'cache.babel')]
    protected readonly CacheBackendInterface $cache,
    #[Autowire(service: 'lock')]
    protected readonly LockBackendInterface $lock,
    protected readonly BabelStorageInterface $babelStorage,