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

Commit 44cd92e

Browse files
committed
Symfony min dep = 3.0
- Added BaseBundle as main dep - Changed classes to use BaseBundle
1 parent b7bd55f commit 44cd92e

33 files changed

+413
-175
lines changed

.formatter.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ header: |
1616
* Feel free to edit as you please, and have fun.
1717
*
1818
* @author Marc Morera <yuhu@mmoreram.com>
19-
* @author PuntMig Technologies
2019
*/

.php_cs.cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"php":"7.1.18-1+ubuntu18.04.1+deb.sury.org+1","version":"2.11.1:v2.11.1#ad94441c17b8ef096e517acccdbf3238af8a2da8","rules":{"blank_line_after_namespace":true,"braces":{"allow_single_line_closure":true},"class_definition":{"singleLine":true},"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_constants":true,"lowercase_keywords":true,"method_argument_space":true,"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":true,"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"binary_operator_spaces":true,"blank_line_after_opening_tag":true,"blank_line_before_statement":{"statements":["return"]},"cast_spaces":true,"class_attributes_separation":{"elements":["method"]},"concat_space":{"spacing":"none"},"declare_equal_normalize":true,"function_typehint_space":true,"include":true,"increment_style":true,"lowercase_cast":true,"magic_constant_casing":true,"native_function_casing":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["curly_brace_block","extra","parenthesis_brace_block","square_brace_block","throw","use"]},"no_leading_import_slash":true,"no_leading_namespace_whitespace":true,"no_mixed_echo_print":{"use":"echo"},"no_multiline_whitespace_around_double_arrow":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_trailing_comma_in_list_call":true,"no_trailing_comma_in_singleline_array":true,"no_unneeded_control_parentheses":true,"no_unneeded_curly_braces":true,"no_unneeded_final_method":true,"no_unused_imports":true,"no_whitespace_before_comma_in_array":true,"no_whitespace_in_blank_line":true,"normalize_index_brace":true,"object_operator_without_whitespace":true,"php_unit_fqcn_annotation":true,"phpdoc_align":{"tags":["method","param","property","return","throws","type","var"]},"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_empty_return":true,"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_types":true,"phpdoc_var_without_name":true,"protected_to_private":true,"return_type_declaration":true,"semicolon_after_instruction":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_line_comment_style":{"comment_types":["hash"]},"single_quote":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"ternary_operator_spaces":true,"trailing_comma_in_multiline_array":true,"trim_array_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"yoda_style":true},"hashes":{"Twig\/MethodAccessorExtension.php":1937766330,"Twig\/AggregationTranslationExtension.php":1168064907,"Twig\/UrlBuilderExtension.php":1238295593,"DependencyInjection\/CompilerPass\/ExporterCompilerPass.php":3859400892,"DependencyInjection\/CompilerPass\/ReadTransformerCompilerPass.php":407060565,"DependencyInjection\/CompilerPass\/WriteTransformerCompilerPass.php":3787221228,"DependencyInjection\/CompilerPass\/RepositoryCompilerPass.php":3492158054,"DependencyInjection\/CompilerPass\/TagCompilerPass.php":1857409043,"DependencyInjection\/ApisearchExtension.php":2861843414,"DependencyInjection\/ApisearchConfiguration.php":2562035961,"ApisearchBundle.php":452340142,"Translator\/AggregationTranslator.php":2950948888,"Command\/ExportIndexCommand.php":3751299339,"Command\/ImportIndexCommand.php":1722481554,"Command\/PrintTokensCommand.php":2265717038,"Command\/DeleteTokensCommand.php":2095195833,"Command\/ApisearchCommand.php":3025110659,"Command\/ApisearchFormattedCommand.php":3372612923,"Command\/AddTokenCommand.php":2707377316,"Command\/WithRepositoryBucketCommand.php":835091977,"Command\/WithAppRepositoryBucketCommand.php":245049441,"Command\/DeleteTokenCommand.php":2469160876,"Command\/CreateIndexCommand.php":3612862136,"Command\/DeleteIndexCommand.php":2188655061,"Command\/ResetIndexCommand.php":4289827141,"Tests\/Functional\/DependencyInjection\/ApisearchConfigurationTest.php":379272062}}
1+
{"php":"7.1.18-1+ubuntu18.04.1+deb.sury.org+1","version":"2.12.2:v2.12.2#dcc87d5414e9d0bd316fce81a5bedb9ce720b183","rules":{"blank_line_after_namespace":true,"braces":{"allow_single_line_closure":true},"class_definition":{"single_line":true},"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_constants":true,"lowercase_keywords":true,"method_argument_space":true,"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":true,"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"binary_operator_spaces":true,"blank_line_after_opening_tag":true,"blank_line_before_statement":{"statements":["return"]},"cast_spaces":true,"class_attributes_separation":{"elements":["method"]},"concat_space":{"spacing":"none"},"declare_equal_normalize":true,"function_typehint_space":true,"include":true,"increment_style":true,"lowercase_cast":true,"lowercase_static_reference":true,"magic_constant_casing":true,"native_function_casing":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["curly_brace_block","extra","parenthesis_brace_block","square_brace_block","throw","use"]},"no_leading_import_slash":true,"no_leading_namespace_whitespace":true,"no_mixed_echo_print":{"use":"echo"},"no_multiline_whitespace_around_double_arrow":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_trailing_comma_in_list_call":true,"no_trailing_comma_in_singleline_array":true,"no_unneeded_control_parentheses":true,"no_unneeded_curly_braces":true,"no_unneeded_final_method":true,"no_unused_imports":true,"no_whitespace_before_comma_in_array":true,"no_whitespace_in_blank_line":true,"normalize_index_brace":true,"object_operator_without_whitespace":true,"php_unit_fqcn_annotation":true,"phpdoc_align":{"tags":["method","param","property","return","throws","type","var"]},"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_empty_return":true,"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_types":true,"phpdoc_var_without_name":true,"protected_to_private":true,"return_type_declaration":true,"semicolon_after_instruction":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_line_comment_style":{"comment_types":["hash"]},"single_quote":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"ternary_operator_spaces":true,"trailing_comma_in_multiline_array":true,"trim_array_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"yoda_style":true},"hashes":{"Twig\/MethodAccessorExtension.php":2679933104,"Twig\/AggregationTranslationExtension.php":3642617554,"Twig\/UrlBuilderExtension.php":1291295672,"DependencyInjection\/CompilerPass\/ExporterCompilerPass.php":4087972938,"DependencyInjection\/CompilerPass\/ReadTransformerCompilerPass.php":1677896883,"DependencyInjection\/CompilerPass\/WriteTransformerCompilerPass.php":42015903,"DependencyInjection\/CompilerPass\/RepositoryCompilerPass.php":4290304794,"DependencyInjection\/ApisearchExtension.php":2334454061,"DependencyInjection\/ApisearchConfiguration.php":52611421,"ApisearchBundle.php":3428693615,"Translator\/AggregationTranslator.php":2149846265,"Command\/ExportIndexCommand.php":1299768170,"Command\/ImportIndexCommand.php":2053986604,"Command\/PrintTokensCommand.php":2519214187,"Command\/DeleteTokensCommand.php":3099131500,"Command\/ApisearchCommand.php":2877563410,"Command\/ApisearchFormattedCommand.php":2568151029,"Command\/AddTokenCommand.php":1962164575,"Command\/WithRepositoryBucketCommand.php":3726182334,"Command\/WithAppRepositoryBucketCommand.php":1019748087,"Command\/DeleteTokenCommand.php":1679260907,"Command\/CreateIndexCommand.php":426700519,"Command\/DeleteIndexCommand.php":3216247700,"Command\/ResetIndexCommand.php":2080515326,"Tests\/Functional\/ProductReadTransformer.php":2626856266,"Tests\/Functional\/DependencyInjection\/ApisearchConfigurationTest.php":1733355149,"Tests\/Functional\/DependencyInjection\/CompilerPass\/TransformersCompilerPassTest.php":3384386198,"Tests\/Functional\/ProductBothTransformer.php":867457285,"Tests\/Functional\/ProductWriteTransformer.php":2104628656}}

ApisearchBundle.php

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Feel free to edit as you please, and have fun.
1010
*
1111
* @author Marc Morera <yuhu@mmoreram.com>
12-
* @author PuntMig Technologies
1312
*/
1413

1514
declare(strict_types=1);
@@ -21,28 +20,30 @@
2120
use Apisearch\DependencyInjection\CompilerPass\ReadTransformerCompilerPass;
2221
use Apisearch\DependencyInjection\CompilerPass\RepositoryCompilerPass;
2322
use Apisearch\DependencyInjection\CompilerPass\WriteTransformerCompilerPass;
24-
use Symfony\Component\DependencyInjection\ContainerBuilder;
23+
use Mmoreram\BaseBundle\BaseBundle;
24+
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
25+
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
2526
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
26-
use Symfony\Component\HttpKernel\Bundle\Bundle;
27+
use Symfony\Component\HttpKernel\KernelInterface;
2728

2829
/**
2930
* Class ApisearchBundle.
3031
*/
31-
class ApisearchBundle extends Bundle
32+
class ApisearchBundle extends BaseBundle
3233
{
3334
/**
34-
* Builds bundle.
35+
* Return a CompilerPass instance array.
3536
*
36-
* @param ContainerBuilder $container Container
37+
* @return CompilerPassInterface[]
3738
*/
38-
public function build(ContainerBuilder $container)
39+
public function getCompilerPasses(): array
3940
{
40-
parent::build($container);
41-
42-
$container->addCompilerPass(new RepositoryCompilerPass());
43-
$container->addCompilerPass(new ReadTransformerCompilerPass());
44-
$container->addCompilerPass(new WriteTransformerCompilerPass());
45-
$container->addCompilerPass(new ExporterCompilerPass());
41+
return [
42+
new RepositoryCompilerPass(),
43+
new ReadTransformerCompilerPass(),
44+
new WriteTransformerCompilerPass(),
45+
new ExporterCompilerPass(),
46+
];
4647
}
4748

4849
/**
@@ -54,4 +55,19 @@ public function getContainerExtension()
5455
{
5556
return new ApisearchExtension();
5657
}
58+
59+
/**
60+
* Return all bundle dependencies.
61+
*
62+
* Values can be a simple bundle namespace or its instance
63+
*
64+
* @return array
65+
*/
66+
public static function getBundleDependencies(KernelInterface $kernel): array
67+
{
68+
return [
69+
BaseBundle::class,
70+
FrameworkBundle::class,
71+
];
72+
}
5773
}

Command/AddTokenCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Feel free to edit as you please, and have fun.
1010
*
1111
* @author Marc Morera <yuhu@mmoreram.com>
12-
* @author PuntMig Technologies
1312
*/
1413

1514
declare(strict_types=1);

Command/ApisearchCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Feel free to edit as you please, and have fun.
1010
*
1111
* @author Marc Morera <yuhu@mmoreram.com>
12-
* @author PuntMig Technologies
1312
*/
1413

1514
declare(strict_types=1);

Command/ApisearchFormattedCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Feel free to edit as you please, and have fun.
1010
*
1111
* @author Marc Morera <yuhu@mmoreram.com>
12-
* @author PuntMig Technologies
1312
*/
1413

1514
declare(strict_types=1);

Command/CreateIndexCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Feel free to edit as you please, and have fun.
1010
*
1111
* @author Marc Morera <yuhu@mmoreram.com>
12-
* @author PuntMig Technologies
1312
*/
1413

1514
declare(strict_types=1);

Command/DeleteIndexCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Feel free to edit as you please, and have fun.
1010
*
1111
* @author Marc Morera <yuhu@mmoreram.com>
12-
* @author PuntMig Technologies
1312
*/
1413

1514
declare(strict_types=1);

Command/DeleteTokenCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Feel free to edit as you please, and have fun.
1010
*
1111
* @author Marc Morera <yuhu@mmoreram.com>
12-
* @author PuntMig Technologies
1312
*/
1413

1514
declare(strict_types=1);

Command/DeleteTokensCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* Feel free to edit as you please, and have fun.
1010
*
1111
* @author Marc Morera <yuhu@mmoreram.com>
12-
* @author PuntMig Technologies
1312
*/
1413

1514
declare(strict_types=1);

0 commit comments

Comments
 (0)