Skip to content

Commit afc63a4

Browse files
committed
Clearing deprecation notices
1 parent 50fffdd commit afc63a4

18 files changed

+26
-48
lines changed

src/CacheWarmer/MetadataCacheWarmer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ public function isOptional(): bool
1616
return true;
1717
}
1818

19-
public function warmUp(string $cacheDir): array
19+
public function warmUp(string $cacheDir, ?string $buildDir = null): array
2020
{
21-
return $this->metadataCollector->warmUp($cacheDir);
21+
return $this->metadataCollector->warmUp($cacheDir, $buildDir);
2222
}
2323
}

src/Command/IndexBuildCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Sineflow\ElasticsearchBundle\Command;
44

55
use Sineflow\ElasticsearchBundle\Manager\IndexManagerRegistry;
6+
use Symfony\Component\Console\Attribute\AsCommand;
67
use Symfony\Component\Console\Command\Command;
78
use Symfony\Component\Console\Input\InputArgument;
89
use Symfony\Component\Console\Input\InputInterface;
@@ -12,10 +13,9 @@
1213
/**
1314
* Command for (re)building elasticsearch index.
1415
*/
16+
#[AsCommand('sineflow:es:index:build', '(Re)builds elasticsearch index.')]
1517
class IndexBuildCommand extends Command
1618
{
17-
protected static $defaultName = 'sineflow:es:index:build';
18-
1919
public function __construct(private readonly IndexManagerRegistry $indexManagerRegistry)
2020
{
2121
parent::__construct();
@@ -29,7 +29,6 @@ protected function configure(): void
2929
parent::configure();
3030

3131
$this
32-
->setDescription('(Re)builds elasticsearch index.')
3332
->addArgument(
3433
'index',
3534
InputArgument::REQUIRED,

src/Command/IndexCreateCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Sineflow\ElasticsearchBundle\Command;
44

55
use Sineflow\ElasticsearchBundle\Manager\IndexManagerRegistry;
6+
use Symfony\Component\Console\Attribute\AsCommand;
67
use Symfony\Component\Console\Command\Command;
78
use Symfony\Component\Console\Input\InputArgument;
89
use Symfony\Component\Console\Input\InputInterface;
@@ -11,10 +12,9 @@
1112
/**
1213
* Command for creating elasticsearch index.
1314
*/
15+
#[AsCommand('sineflow:es:index:create', 'Creates elasticsearch index.')]
1416
class IndexCreateCommand extends Command
1517
{
16-
protected static $defaultName = 'sineflow:es:index:create';
17-
1818
public function __construct(private readonly IndexManagerRegistry $indexManagerRegistry)
1919
{
2020
parent::__construct();
@@ -28,7 +28,6 @@ protected function configure(): void
2828
parent::configure();
2929

3030
$this
31-
->setDescription('Creates elasticsearch index.')
3231
->addArgument(
3332
'index',
3433
InputArgument::REQUIRED,

src/Mapping/DocumentMetadataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function __construct(
5757
*
5858
* @throws InvalidArgumentException
5959
*/
60-
public function warmUp(string $cacheDir): array
60+
public function warmUp(string $cacheDir, ?string $buildDir = null): array
6161
{
6262
// force cache generation
6363
foreach ($this->documentClassToIndexManagerNames as $documentClass => $indexManagerName) {

src/SineflowElasticsearchBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SineflowElasticsearchBundle extends Bundle
1616
/**
1717
* {@inheritdoc}
1818
*/
19-
public function build(ContainerBuilder $container)
19+
public function build(ContainerBuilder $container): void
2020
{
2121
parent::build($container);
2222

tests/AbstractContainerAwareTestCase.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ abstract class AbstractContainerAwareTestCase extends KernelTestCase
2222
*/
2323
abstract class AbstractContainerAwareTestCase extends KernelTestCase
2424
{
25-
/**
26-
* @var ContainerInterface
27-
*/
28-
private $cachedContainer;
25+
private ?ContainerInterface $cachedContainer;
2926

3027
/**
3128
* {@inheritDoc}

tests/AbstractElasticsearchTestCase.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ abstract class AbstractElasticsearchTestCase extends AbstractContainerAwareTestC
3232
* ]
3333
* ]
3434
* ]
35-
*
36-
* @return array
3735
*/
38-
protected function getDataArray()
36+
protected function getDataArray(): array
3937
{
4038
return [];
4139
}

tests/Functional/Document/Provider/ElasticsearchProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ElasticsearchProviderTest extends AbstractElasticsearchTestCase
1111
/**
1212
* {@inheritdoc}
1313
*/
14-
protected function getDataArray()
14+
protected function getDataArray(): array
1515
{
1616
return [
1717
'bar' => [

tests/Functional/Document/Provider/ProviderRegistryTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,12 @@
1414

1515
class ProviderRegistryTest extends AbstractElasticsearchTestCase
1616
{
17-
/**
18-
* @var ProviderRegistry
19-
*/
20-
private $providerRegistry;
17+
private ProviderRegistry $providerRegistry;
2118

2219
/**
2320
* {@inheritdoc}
2421
*/
25-
protected function getDataArray()
22+
protected function getDataArray(): array
2623
{
2724
return [
2825
'bar' => [

tests/Functional/Document/RepositoryTest.php

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,18 @@ class RepositoryTest extends AbstractElasticsearchTestCase
1313
{
1414
use AssertThrows;
1515

16-
/**
17-
* @var Repository
18-
*/
19-
private $repository;
16+
private Repository $repository;
2017

21-
/**
22-
* @var IndexManager
23-
*/
24-
private $indexManager;
18+
private IndexManager $indexManager;
2519

26-
/**
27-
* @var Finder
28-
*/
29-
private $finder;
20+
private Finder $finder;
3021

31-
/**
32-
* @var DocumentMetadataCollector
33-
*/
34-
private $metadataCollector;
22+
private DocumentMetadataCollector $metadataCollector;
3523

3624
/**
3725
* {@inheritdoc}
3826
*/
39-
protected function getDataArray()
27+
protected function getDataArray(): array
4028
{
4129
return [
4230
'bar' => [

tests/Functional/Finder/Adapter/KnpPaginatorAdapterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class KnpPaginatorAdapterTest extends AbstractElasticsearchTestCase
1515
/**
1616
* {@inheritdoc}
1717
*/
18-
protected function getDataArray()
18+
protected function getDataArray(): array
1919
{
2020
return [
2121
'bar' => [

tests/Functional/Finder/Adapter/ScrollAdapterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ScrollAdapterTest extends AbstractElasticsearchTestCase
1313
/**
1414
* {@inheritdoc}
1515
*/
16-
protected function getDataArray()
16+
protected function getDataArray(): array
1717
{
1818
return [
1919
'bar' => [

tests/Functional/Finder/FinderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class FinderTest extends AbstractElasticsearchTestCase
2121
/**
2222
* {@inheritdoc}
2323
*/
24-
protected function getDataArray()
24+
protected function getDataArray(): array
2525
{
2626
return [
2727
'bar' => [

tests/Functional/Manager/IndexManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class IndexManagerTest extends AbstractElasticsearchTestCase
2525
/**
2626
* {@inheritdoc}
2727
*/
28-
protected function getDataArray()
28+
protected function getDataArray(): array
2929
{
3030
return [
3131
'bar' => [

tests/Functional/Profiler/ElasticsearchProfilerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ElasticsearchProfilerTest extends AbstractElasticsearchTestCase
1616
/**
1717
* {@inheritdoc}
1818
*/
19-
protected function getDataArray()
19+
protected function getDataArray(): array
2020
{
2121
return [
2222
'default' => [

tests/Functional/Result/DocumentIteratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class DocumentIteratorTest extends AbstractElasticsearchTestCase
1818
/**
1919
* {@inheritdoc}
2020
*/
21-
protected function getDataArray()
21+
protected function getDataArray(): array
2222
{
2323
return [
2424
'bar' => [

tests/Unit/Annotation/DocumentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function testDump(): void
1717
{
1818
$doc = new Document();
1919

20-
$doc->type = 'product';
20+
$doc->repositoryClass = 'some class name';
2121
$doc->options = [
2222
'dynamic' => 'strict',
2323
'foo' => 'bar',

tests/Unit/Annotation/PropertyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testDump(): void
2727
'analyzer' => 'standard',
2828
'foo' => 'bar',
2929
];
30-
$type->foo = 'bar';
30+
$type->enumType = 'bar';
3131

3232
$this->assertEquals(
3333
[

0 commit comments

Comments
 (0)