Skip to content

Commit

Permalink
fix phpstan errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
mike4git committed Jan 16, 2024
1 parent 2a3e1db commit a43daca
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 109 deletions.
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@
},
"require": {
"php": "^8.0",
"jolicode/elastically": "^1.7",
"ruflin/elastica": "^7.0",
"symfony/config": "^5.4 || ^6.2",
"symfony/console": "^5.0 || ^6.0",
"symfony/dependency-injection": "^5.4 || ^6.2",
"symfony/framework-bundle": "^5.4 || ^6.2",
"symfony/messenger": "^5.0 || ^6.0",
"symfony/http-kernel": "^5.4 || ^6.2",
"symfony/property-access": "^5.4 || ^6.2"
"teamneusta/converter-bundle": "^1.2"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^v3.11",
Expand Down
66 changes: 0 additions & 66 deletions src/DependencyInjection/Configuration.php

This file was deleted.

42 changes: 0 additions & 42 deletions src/DependencyInjection/NeustaElasticExtension.php

This file was deleted.

19 changes: 19 additions & 0 deletions src/DependencyInjection/NeustaElasticIndexExtension.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php declare(strict_types=1);

namespace Neusta\ElasticIndexBundle\DependencyInjection;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension;

final class NeustaElasticIndexExtension extends ConfigurableExtension
{
protected function loadInternal(array $mergedConfig, 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']);
}
}
1 change: 1 addition & 0 deletions tests/app/TestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Neusta\ElasticBundle\NeustaElasticIndexBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\HttpKernel\Kernel;

class TestKernel extends Kernel
{
Expand Down

0 comments on commit a43daca

Please sign in to comment.