Skip to content

Commit 406dc8f

Browse files
authored
Merge pull request #49 from apisearch-io/feature/using-async-test-client
AsyncTestClient is now usable
2 parents 70d34ee + ef27883 commit 406dc8f

File tree

4 files changed

+831
-492
lines changed

4 files changed

+831
-492
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/php:7.1-cli
5+
- image: circleci/php:7.2-cli
66

77
working_directory: ~/project
88
steps:

.php_cs.cache

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"php":"7.1.27-1+ubuntu18.04.1+deb.sury.org+1","version":"2.14.2:v2.14.2#ff401e58261ffc5934a58f795b3f95b355e276cb","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,"magic_method_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_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"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":2939807874,"Twig\/AggregationTranslationExtension.php":2415810000,"Twig\/UrlBuilderExtension.php":2201893333,"DependencyInjection\/CompilerPass\/ExporterCompilerPass.php":857546720,"DependencyInjection\/CompilerPass\/ReadTransformerCompilerPass.php":3948110591,"DependencyInjection\/CompilerPass\/WriteTransformerCompilerPass.php":2530587380,"DependencyInjection\/CompilerPass\/RepositoryCompilerPass.php":774594588,"DependencyInjection\/ApisearchExtension.php":112225700,"DependencyInjection\/ApisearchConfiguration.php":1136730770,"ApisearchBundle.php":3640212495,"Translator\/AggregationTranslator.php":4238166597,"Command\/ExportIndexCommand.php":1133721139,"Command\/ImportIndexCommand.php":3461230433,"Command\/PrintTokensCommand.php":1079623314,"Command\/DeleteTokensCommand.php":290859330,"Command\/ApisearchCommand.php":3872958448,"Command\/ConfigureIndexCommand.php":2680853722,"Command\/ApisearchFormattedCommand.php":1111995920,"Command\/PrintIndicesCommand.php":2224987197,"Command\/AddTokenCommand.php":684681072,"Command\/WithRepositoryBucketCommand.php":3434324818,"Command\/WithAppRepositoryBucketCommand.php":2197592132,"Command\/DeleteTokenCommand.php":121828308,"Command\/QueryCommand.php":3024631832,"Command\/CreateIndexCommand.php":3731774129,"Command\/DeleteIndexCommand.php":1350714493,"Command\/ResetIndexCommand.php":3426927232,"Tests\/Functional\/ApisearchBundleFunctionalTest.php":1130132530,"Tests\/Functional\/ProductReadTransformer.php":1666987200,"Tests\/Functional\/DependencyInjection\/DisableCommandsTest.php":2956180423,"Tests\/Functional\/DependencyInjection\/ApisearchConfigurationTest.php":271608124,"Tests\/Functional\/DependencyInjection\/CompilerPass\/InMemoryRepositoryCompilerPassTest.php":3052848166,"Tests\/Functional\/DependencyInjection\/CompilerPass\/TransformersCompilerPassTest.php":1388027657,"Tests\/Functional\/DependencyInjection\/CompilerPass\/HttpRepositoryCompilerPassTest.php":2500445244,"Tests\/Functional\/DependencyInjection\/EnableCommandsTest.php":1149363544,"Tests\/Functional\/ProductBothTransformer.php":3061253314,"Tests\/Functional\/Command\/QueryCommandTest.php":2580406218,"Tests\/Functional\/Command\/IndexCommandTest.php":4092266881,"Tests\/Functional\/Command\/AddDeleteTokensCommandTest.php":1868952970,"Tests\/Functional\/Command\/PrintIndicesCommandTest.php":481741707,"Tests\/Functional\/ProductWriteTransformer.php":4090808924}}
1+
{"php":"7.3.8-1+ubuntu16.04.1+deb.sury.org+1","version":"2.15.1:v2.15.1#20064511ab796593a3990669eff5f5b535001f7c","indent":" ","lineEnding":"\n","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,"magic_method_casing":true,"native_function_casing":true,"native_function_type_declaration_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_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"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,"single_trait_insert_per_statement":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":{"Tests\/Functional\/ProductBothTransformer.php":3061253314,"Tests\/Functional\/ProductReadTransformer.php":1666987200,"Tests\/Functional\/ApisearchBundleFunctionalTest.php":1130132530,"Tests\/Functional\/ProductWriteTransformer.php":4090808924,"Tests\/Functional\/Command\/IndexCommandTest.php":4092266881,"Tests\/Functional\/Command\/PrintIndicesCommandTest.php":481741707,"Tests\/Functional\/Command\/QueryCommandTest.php":2580406218,"Tests\/Functional\/Command\/AddDeleteTokensCommandTest.php":1868952970,"Tests\/Functional\/DependencyInjection\/EnableCommandsTest.php":1149363544,"Tests\/Functional\/DependencyInjection\/CompilerPass\/InMemoryRepositoryCompilerPassTest.php":3052848166,"Tests\/Functional\/DependencyInjection\/CompilerPass\/TransformersCompilerPassTest.php":1388027657,"Tests\/Functional\/DependencyInjection\/CompilerPass\/HttpRepositoryCompilerPassTest.php":2500445244,"Tests\/Functional\/DependencyInjection\/DisableCommandsTest.php":2956180423,"Tests\/Functional\/DependencyInjection\/ApisearchConfigurationTest.php":271608124,"Translator\/AggregationTranslator.php":4238166597,"ApisearchBundle.php":3640212495,"Twig\/MethodAccessorExtension.php":2939807874,"Twig\/AggregationTranslationExtension.php":2415810000,"Twig\/UrlBuilderExtension.php":2201893333,"Command\/ImportIndexCommand.php":3461230433,"Command\/CreateIndexCommand.php":3731774129,"Command\/ApisearchFormattedCommand.php":1111995920,"Command\/ResetIndexCommand.php":3426927232,"Command\/DeleteIndexCommand.php":1350714493,"Command\/ApisearchCommand.php":3872958448,"Command\/WithAppRepositoryBucketCommand.php":2197592132,"Command\/PrintIndicesCommand.php":2224987197,"Command\/DeleteTokensCommand.php":290859330,"Command\/AddTokenCommand.php":684681072,"Command\/PrintTokensCommand.php":1079623314,"Command\/ExportIndexCommand.php":1133721139,"Command\/ConfigureIndexCommand.php":2680853722,"Command\/WithRepositoryBucketCommand.php":3434324818,"Command\/DeleteTokenCommand.php":121828308,"Command\/QueryCommand.php":3024631832,"DependencyInjection\/CompilerPass\/WriteTransformerCompilerPass.php":2530587380,"DependencyInjection\/CompilerPass\/ExporterCompilerPass.php":857546720,"DependencyInjection\/CompilerPass\/RepositoryCompilerPass.php":863427065,"DependencyInjection\/CompilerPass\/ReadTransformerCompilerPass.php":3948110591,"DependencyInjection\/ApisearchConfiguration.php":187997719,"DependencyInjection\/ApisearchExtension.php":112225700}}

DependencyInjection/CompilerPass/RepositoryCompilerPass.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
use Apisearch\App\DiskAppRepository;
1919
use Apisearch\App\HttpAppRepository;
2020
use Apisearch\App\InMemoryAppRepository;
21+
use Apisearch\Http\AsyncTestClient;
2122
use Apisearch\Http\RetryMap;
2223
use Apisearch\Http\TCPClient;
23-
use Apisearch\Http\TestClient;
2424
use Apisearch\Model\AppUUID;
2525
use Apisearch\Model\IndexUUID;
2626
use Apisearch\Model\TokenUUID;
@@ -204,9 +204,9 @@ private function createClient(
204204
$clientRetryMapName = rtrim("apisearch.retry_map_$name", '.');
205205
('http_test' === $repositoryConfiguration['adapter'])
206206
? $container
207-
->register($clientName, TestClient::class)
207+
->register($clientName, AsyncTestClient::class)
208208
->setArguments([
209-
new Reference('test.client'),
209+
new Reference('kernel'),
210210
$repositoryConfiguration['version'],
211211
new reference($clientRetryMapName),
212212
])

0 commit comments

Comments
 (0)