Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Commit edde102

Browse files
authored
Using autowiring in all services (#61)
1 parent c9a6dc0 commit edde102

29 files changed

+2688
-2416
lines changed

.circleci/config.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
11
version: 2
22
jobs:
3-
test-php72:
3+
test-php73:
44
docker:
5-
- image: circleci/php:7.2-cli
5+
- image: circleci/php:7.4-cli
66

77
working_directory: ~/project
88
steps:
99
- checkout
1010

11-
- run:
12-
name: Install PHPUnit
13-
command: |
14-
composer require phpunit/phpunit:7.5.17 --prefer-dist --prefer-stable --prefer-lowest --no-suggest
15-
16-
- run:
17-
name: Run tests / Symfony 3^3
18-
command: |
19-
php vendor/bin/phpunit
20-
2111
- run:
2212
name: Run tests / Symfony 4^3
2313
command: |
24-
composer update -n --prefer-dist --prefer-stable --no-suggest
14+
composer update -n --prefer-dist --prefer-lowest --no-suggest
2515
php vendor/bin/phpunit
2616
2717
- run:
@@ -38,21 +28,15 @@ jobs:
3828
steps:
3929
- checkout
4030

41-
- run:
42-
name: Install PHPUnit
43-
command: |
44-
composer require phpunit/phpunit:7.5.17 --prefer-dist --prefer-stable --prefer-lowest --no-suggest
45-
4631
- run:
4732
name: Run tests / Symfony 5^0
4833
command: |
4934
composer update -n --prefer-dist --no-suggest
5035
php vendor/bin/phpunit
5136
52-
5337
workflows:
5438
version: 2
5539
test:
5640
jobs:
57-
- test-php72
41+
- test-php73
5842
- test-php74

ApisearchBundle.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Apisearch\DependencyInjection\CompilerPass\RepositoryCompilerPass;
2222
use Apisearch\DependencyInjection\CompilerPass\WriteTransformerCompilerPass;
2323
use Mmoreram\BaseBundle\BaseBundle;
24+
use Mmoreram\SymfonyBundleDependencies\DependentBundleInterface;
2425
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
2526
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
2627
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
@@ -29,7 +30,7 @@
2930
/**
3031
* Class ApisearchBundle.
3132
*/
32-
class ApisearchBundle extends BaseBundle
33+
class ApisearchBundle extends BaseBundle implements DependentBundleInterface
3334
{
3435
/**
3536
* Return a CompilerPass instance array.

Command/AddTokenCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
*/
2929
class AddTokenCommand extends WithAppRepositoryBucketCommand
3030
{
31+
/**
32+
* @var string
33+
*/
34+
protected static $defaultName = 'apisearch:add-token';
35+
3136
/**
3237
* Configures the current command.
3338
*/

Command/ConfigureIndexCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
*/
2727
class ConfigureIndexCommand extends IndexBasedCommand
2828
{
29+
/**
30+
* @var string
31+
*/
32+
protected static $defaultName = 'apisearch:configure-index';
33+
2934
/**
3035
* Dispatch domain event.
3136
*

Command/CreateIndexCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
*/
2727
class CreateIndexCommand extends IndexBasedCommand
2828
{
29+
/**
30+
* @var string
31+
*/
32+
protected static $defaultName = 'apisearch:create-index';
33+
2934
/**
3035
* Dispatch domain event.
3136
*

Command/DeleteIndexCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
*/
2626
class DeleteIndexCommand extends WithAppRepositoryBucketCommand
2727
{
28+
/**
29+
* @var string
30+
*/
31+
protected static $defaultName = 'apisearch:delete-index';
32+
2833
/**
2934
* Configures the current command.
3035
*/

Command/DeleteTokenCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
*/
2626
class DeleteTokenCommand extends WithAppRepositoryBucketCommand
2727
{
28+
/**
29+
* @var string
30+
*/
31+
protected static $defaultName = 'apisearch:delete-token';
32+
2833
/**
2934
* Configures the current command.
3035
*/

Command/DeleteTokensCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
*/
2525
class DeleteTokensCommand extends WithAppRepositoryBucketCommand
2626
{
27+
/**
28+
* @var string
29+
*/
30+
protected static $defaultName = 'apisearch:delete-tokens';
31+
2732
/**
2833
* Configures the current command.
2934
*/

Command/ExportIndexCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@
2727
*/
2828
class ExportIndexCommand extends WithRepositoryBucketCommand
2929
{
30+
/**
31+
* @var string
32+
*/
33+
protected static $defaultName = 'apisearch:export-index';
34+
3035
/**
3136
* Configures the current command.
3237
*/
3338
protected function configure()
3439
{
3540
$this
36-
->setName('apisearch:export-index')
3741
->setDescription('Export your index')
3842
->addArgument(
3943
'app-name',

Command/ImportIndexCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,17 @@
2525
*/
2626
class ImportIndexCommand extends WithRepositoryBucketCommand
2727
{
28+
/**
29+
* @var string
30+
*/
31+
protected static $defaultName = 'apisearch:import-index';
32+
2833
/**
2934
* Configures the current command.
3035
*/
3136
protected function configure()
3237
{
3338
$this
34-
->setName('apisearch:import-index')
3539
->setDescription('Import your index')
3640
->addArgument(
3741
'app-name',

0 commit comments

Comments
 (0)