Skip to content

Commit

Permalink
fix test errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
mike4git committed Jan 16, 2024
1 parent a43daca commit fd3e819
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion config/index/elastically.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:

Neusta\ElasticBundle\Index\Elastically\IndexesRepository:
Neusta\ElasticIndexBundle\Index\Elastically\IndexesRepository:
arguments:
$client: '@JoliCode\Elastically\Client'
4 changes: 2 additions & 2 deletions config/index/registry.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
services:

neusta.elastic_bundle.registry.converter:
class: Neusta\ElasticBundle\Index\Registry\ObjectRegistry
class: Neusta\ElasticIndexBundle\Index\Registry\ObjectRegistry
arguments:
$name: 'converter'

neusta.elastic_bundle.registry.repository:
class: Neusta\ElasticBundle\Index\Registry\ObjectRegistry
class: Neusta\ElasticIndexBundle\Index\Registry\ObjectRegistry
arguments:
$name: 'repository'
5 changes: 5 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ services:
autowire: true
autoconfigure: true

# auto-register all commands as services
Neusta\ElasticIndexBundle\Command\:
resource: '../src/Command/*'
tags: [ 'console.command' ]

JoliCode\Elastically\Client:
arguments:
$config:
Expand Down
8 changes: 3 additions & 5 deletions src/DependencyInjection/NeustaElasticIndexExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

final class NeustaElasticIndexExtension extends ConfigurableExtension
final class NeustaElasticIndexExtension extends Extension
{
protected function loadInternal(array $mergedConfig, ContainerBuilder $container): void // @phpstan-ignore-line
public function load(array $configs, ContainerBuilder $container): void // @phpstan-ignore-line
{
$loader = new Loader\YamlFileLoader($container, new FileLocator(\dirname(__DIR__, 2) . '/config'));
$loader->load('services.yaml');

$container->setParameter('neusta_elastic.elasticsearch_hosts', $mergedConfig['hosts']);
}
}
2 changes: 1 addition & 1 deletion src/NeustaElasticIndexBundle.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types=1);

namespace Neusta\ElasticBundle;
namespace Neusta\ElasticIndexBundle;

use Neusta\ElasticIndexBundle\DependencyInjection\Compiler\ConverterRegistryPass;
use Neusta\ElasticIndexBundle\DependencyInjection\Compiler\RepositoryRegistryPass;
Expand Down
2 changes: 1 addition & 1 deletion tests/app/TestKernel.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types=1);

use Neusta\ElasticBundle\NeustaElasticIndexBundle;
use Neusta\ElasticIndexBundle\NeustaElasticIndexBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\HttpKernel\Kernel;
Expand Down

0 comments on commit fd3e819

Please sign in to comment.