Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sylius Search Plugin v2 recipe #1534

Merged

Conversation

maximehuran
Copy link
Contributor

@maximehuran maximehuran commented Jul 27, 2023

Q A
License MIT
Packagist monsieurbiz/sylius-search-plugin

It's a Sylius plugin it will not works with Symfony only.
See our Recipe workflow which test it in our custom recipes repository.

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) July 27, 2023 14:00
@github-actions
Copy link

github-actions bot commented Jul 27, 2023

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1534/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1534/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'monsieurbiz/sylius-search-plugin:^2.0'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

monsieurbiz/sylius-search-plugin

1.0 vs 2.0
diff --git a/monsieurbiz/sylius-search-plugin/1.0/config/packages/monsieurbiz_sylius_search_plugin.yaml b/monsieurbiz/sylius-search-plugin/2.0/config/packages/monsieurbiz_sylius_search_plugin.yaml
index 97fe01bc..759ac0d9 100644
--- a/monsieurbiz/sylius-search-plugin/1.0/config/packages/monsieurbiz_sylius_search_plugin.yaml
+++ b/monsieurbiz/sylius-search-plugin/2.0/config/packages/monsieurbiz_sylius_search_plugin.yaml
@@ -1,24 +1,2 @@
 imports:
     - { resource: "@MonsieurBizSyliusSearchPlugin/Resources/config/config.yaml" }
-
-monsieur_biz_sylius_search:
-    files:
-        search: '%kernel.project_dir%/vendor/monsieurbiz/sylius-search-plugin/src/Resources/config/elasticsearch/queries/search.yaml'
-        instant: '%kernel.project_dir%/vendor/monsieurbiz/sylius-search-plugin/src/Resources/config/elasticsearch/queries/instant.yaml'
-        taxon: '%kernel.project_dir%/vendor/monsieurbiz/sylius-search-plugin/src/Resources/config/elasticsearch/queries/taxon.yaml'
-    documentable_classes :
-        - 'App\Entity\Product\Product'
-    grid:
-        limits:
-            taxon: [9, 18, 27]
-            search: [9, 18, 27]
-        default_limit:
-            taxon: 9
-            search: 9
-            instant: 10
-        sorting:
-            taxon: ['name', 'price', 'created_at']
-            search: ['name', 'price', 'created_at']
-        filters:
-            apply_manually: false # Will refresh the filters depending on applied filters after you apply it manually
-            use_main_taxon: true # Use main taxon for the taxon filter, else use the taxons
diff --git a/monsieurbiz/sylius-search-plugin/1.0/manifest.json b/monsieurbiz/sylius-search-plugin/2.0/manifest.json
index acb378dd..40fc3e92 100644
--- a/monsieurbiz/sylius-search-plugin/1.0/manifest.json
+++ b/monsieurbiz/sylius-search-plugin/2.0/manifest.json
@@ -1,5 +1,8 @@
 {
     "bundles": {
+        "Jane\\Bundle\\AutoMapperBundle\\JaneAutoMapperBundle": [
+            "all"
+        ],
         "MonsieurBiz\\SyliusSearchPlugin\\MonsieurBizSyliusSearchPlugin": [
             "all"
         ]
@@ -11,7 +14,9 @@
         "src/Resources/templates/": "templates/"
     },
     "env": {
-        "MONSIEURBIZ_SEARCHPLUGIN_ES_HOST": "localhost",
-        "MONSIEURBIZ_SEARCHPLUGIN_ES_PORT": "9200"
+        "MONSIEURBIZ_SEARCHPLUGIN_ES_HOST": "${ELASTICSEARCH_HOST:-localhost}",
+        "MONSIEURBIZ_SEARCHPLUGIN_ES_PORT": "${ELASTICSEARCH_PORT:-9200}",
+        "MONSIEURBIZ_SEARCHPLUGIN_ES_URL": "http://${MONSIEURBIZ_SEARCHPLUGIN_ES_HOST}:${MONSIEURBIZ_SEARCHPLUGIN_ES_PORT}/",
+        "MONSIEURBIZ_SEARCHPLUGIN_MESSENGER_TRANSPORT_DSN": "doctrine://default"
     }
 }

auto-merge was automatically disabled August 9, 2023 07:40

Head branch was pushed to by a user without write access

@maximehuran maximehuran requested a review from fabpot August 9, 2023 07:40
@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) August 9, 2023 07:40
@symfony-recipes-bot symfony-recipes-bot merged commit c519a3c into symfony:main Aug 30, 2023
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants