question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unrecognized option "elasticsearch" under "api_platform"

See original GitHub issue

Unrecognized option “elasticsearch” under “api_platform”

Unrecognized option "elasticsearch" under "api_platform". Available options are "allow_plain_identifiers", "collection", "default_operation_path_resolver", "description", "eager_loading", "enable_docs", "enable_entrypoint", "enable_fos_user", "enable_nelmio_api_doc", "enable_profiler", "enable_swagger", "enable_swagger_ui", "error_formats", "exception_to_status", "formats", "graphql", "http_cache", "mapping", "name_converter", "oauth", "path_segment_name_generator", "resource_class_directories", "swagger", "title", "validator", "version".

I have got this error when trying to enable elastic search. Elasticsearch is installed by composer. api_platform_yaml

parameters:
  env(ELASTICSEARCH_HOST): 'http://localhost:9200'
api_platform:
  mapping:
    paths: ['%kernel.project_dir%/src/Entity']
  elasticsearch:
    hosts: ['%env(ELASTICSEARCH_HOST)%']

Installed packages:

 "php": "^7.1.3",
      "ext-ctype": "*",
      "ext-iconv": "*",
      "amsdard/symfony-as-docker": "^1.2",
      "api-platform/api-pack": "^1.2",
      "elasticsearch/elasticsearch": "^6.1",
      "friendsofsymfony/elastica-bundle": "^5.0",
      "sensio/framework-extra-bundle": "^5.2",
      "symfony/asset": "4.2.*",
      "symfony/console": "4.2.*",
      "symfony/debug-pack": "^1.0",
      "symfony/dotenv": "4.2.*",
      "symfony/flex": "^1.1",
      "symfony/framework-bundle": "4.2.*",
      "symfony/maker-bundle": "^1.11",
      "symfony/orm-pack": "^1.0",
      "symfony/security-bundle": "4.2.*",
      "symfony/translation": "4.2.*",
      "symfony/validator": "4.2.*",
      "symfony/webpack-encore-bundle": "^1.1",
      "symfony/yaml": "4.2.*"

I have tried many options and have this problem. Also in

bin/console config:dump-reference ApiPlatformBundle

I dont have elasticsearch option

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
soyukacommented, Mar 20, 2019

Add this to your dependencies in the composer.json:

        "api-platform/core": "2.4.x-dev",

then composer update.

2reactions
dunglascommented, Feb 2, 2019

You need to upgrade to 2.4 beta to have this option.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration - API Platform
If you need to globally configure all the resources instead of adding configuration in each one, it's possible to do so with the...
Read more >
Unrecognized option "types" | FOS Elastica & Symfony
I have been trying to switch and indent differently all day: Unrecognized option "types" under "fos_elastica.indexes.app". Available options are ...
Read more >
Using Oracle API Platform Cloud Service
The SS option is common in scenarios in which you are accessing ... Oracle API Platform Cloud Service gateway nodes use Logstash to...
Read more >
Developers - Document the url_generation_strategy - - Bountysource
Unrecognized option "absolute_url" under "api_platform". Available options are "allow_plain_identifiers", "asset_package", "collection", ...
Read more >
Management API - Configuration
In terms of prevalence, environment variables override system properties ... gravitee.analytics.elasticsearch.endpoints[0]=https://my.first.endpoint.com ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found