From 39b601ba19ee70d8ba9e61fe1e21d77c8f8e8d45 Mon Sep 17 00:00:00 2001 From: Ernest Rekel Date: Tue, 30 May 2017 17:45:27 +0300 Subject: [PATCH 1/7] Change sylius requirement --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9307021..fb2984e 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": "^5.6|^7.0", - "sylius/sylius": "dev-master", + "sylius/sylius": "1.0.0-beta.2", "friendsofsymfony/elastica-bundle": "^4.0", "ongr/elasticsearch-dsl": "^2.0" From ec390acd24923aa0f4e0bc6dddd72cdc37dd58fd Mon Sep 17 00:00:00 2001 From: Ernest Rekel Date: Wed, 31 May 2017 08:56:50 +0300 Subject: [PATCH 2/7] Set composer install instead of update. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1ffb05b..dd1a196 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ before_install: - composer validate install: - - composer update --prefer-dist + - composer install --prefer-dist - tests/Application/bin/console doctrine:schema:create --env=test -vvv --no-interaction - tests/Application/bin/console fos:elastica:reset --env=test -vvv --no-interaction From 9022a68a81557893f9d33b6b710d7af714838318 Mon Sep 17 00:00:00 2001 From: Ernest Rekel Date: Wed, 31 May 2017 10:19:06 +0300 Subject: [PATCH 3/7] Fix version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fb2984e..d3ca5f7 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": "^5.6|^7.0", - "sylius/sylius": "1.0.0-beta.2", + "sylius/sylius": "^1.0@beta", "friendsofsymfony/elastica-bundle": "^4.0", "ongr/elasticsearch-dsl": "^2.0" From 895081423854ca6aad6a137d00fc54ab608928c0 Mon Sep 17 00:00:00 2001 From: Ernest Rekel Date: Fri, 2 Jun 2017 17:32:53 +0300 Subject: [PATCH 4/7] Move fos_elastica host and port to parameters --- src/Resources/config/app/config.yml | 5 ++++- src/Resources/config/app/parameters.yml | 3 +++ tests/Application/app/config/config.yml | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/Resources/config/app/parameters.yml diff --git a/src/Resources/config/app/config.yml b/src/Resources/config/app/config.yml index 9474c28..025835f 100644 --- a/src/Resources/config/app/config.yml +++ b/src/Resources/config/app/config.yml @@ -1,8 +1,11 @@ +imports: + - { resource: "parameters.yml" } + fos_elastica: clients: default: servers: - - { host: 127.0.0.1, port: 9200 } + - { host: '%fos_elastica_host%', port: '%fos_elastica_port%' } indexes: sylius: client: default diff --git a/src/Resources/config/app/parameters.yml b/src/Resources/config/app/parameters.yml new file mode 100644 index 0000000..c1ac6d1 --- /dev/null +++ b/src/Resources/config/app/parameters.yml @@ -0,0 +1,3 @@ +parameters: + fos_elastica_host: 127.0.0.1 + fos_elastica_port: 9200 diff --git a/tests/Application/app/config/config.yml b/tests/Application/app/config/config.yml index f3b761c..2473bda 100644 --- a/tests/Application/app/config/config.yml +++ b/tests/Application/app/config/config.yml @@ -1,6 +1,8 @@ parameters: locale: "en_US" secret: "Three can keep a secret, if two of them are dead." + fos_elastica_host: 127.0.0.1 + fos_elastica_port: 9200 imports: - { resource: "@SyliusCoreBundle/Resources/config/app/config.yml" } From 802f26a1a9008e88223689406bb31d787c6dd535 Mon Sep 17 00:00:00 2001 From: Ernest Rekel Date: Fri, 2 Jun 2017 18:22:57 +0300 Subject: [PATCH 5/7] Add info to README --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ba7e30..da634bb 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Elastic search for Sylius. resource: "@LakionSyliusElasticSearchBundle/Resources/config/routing.yml" ``` -8. Configuration reference: +9. Configuration reference: ```yaml lakion_sylius_elastic_search: @@ -71,3 +71,14 @@ Elastic search for Sylius. product_price: type: price ``` + +10. ElasticSearch server parameters ( optional ): + + In order to change default ElasticSearch server parameters add this to `parameters.yml`: + ```yaml + fos_elastica_host: 127.0.0.1 # ElasticSearch host + fos_elastica_port: 9200 # ElasticSearch host + + ``` + + Default values are: `host 127.0.0.1, port 9200` From 4613e8f7c7642ee0fe8e69d469d272f51b0c477b Mon Sep 17 00:00:00 2001 From: Ernest Rekel Date: Fri, 2 Jun 2017 18:26:26 +0300 Subject: [PATCH 6/7] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da634bb..17da7b4 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Elastic search for Sylius. In order to change default ElasticSearch server parameters add this to `parameters.yml`: ```yaml fos_elastica_host: 127.0.0.1 # ElasticSearch host - fos_elastica_port: 9200 # ElasticSearch host + fos_elastica_port: 9200 # ElasticSearch port ``` From c691e4d3017c4891249571c36ad4589031c28d1e Mon Sep 17 00:00:00 2001 From: Ernest Date: Fri, 2 Jun 2017 21:57:02 +0300 Subject: [PATCH 7/7] Remove trusted_proxies. Support for symfony 3.3 --- tests/Application/app/config/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Application/app/config/config.yml b/tests/Application/app/config/config.yml index 2473bda..4b2ed3b 100644 --- a/tests/Application/app/config/config.yml +++ b/tests/Application/app/config/config.yml @@ -24,7 +24,6 @@ framework: validation: { enable_annotations: true } templating: { engines: ["twig"] } default_locale: "%locale%" - trusted_proxies: ~ session: handler_id: ~ test: ~