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

Turn off normalization of type keys #551

Merged
merged 1 commit into from
Mar 10, 2021

Conversation

tstauer
Copy link
Contributor

@tstauer tstauer commented Mar 3, 2021

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #issuenum
Related issues/PRs #issuenum
License MIT

What's in this PR?

Turn off normalization of type keys in the Symfony config loader.

Why?

The type keys of the configuration must match the tag type of tags by the name sulu_article.type from article XML files.
See here about the Symfony feature:
https://symfony.com/doc/current/components/config/definition.html#normalization

Example Usage

See press-release in the following config file. It must not be normalized to press_release.

sulu_article:
    index_name: '%env(resolve:ELASTICSEARCH_INDEX)%'
    hosts:
        - '%env(resolve:ELASTICSEARCH_HOST)%'
    types:
        press-release:
            translation_key: "app.article_types.press-release"

Copy link
Contributor

@niklasnatter niklasnatter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - thank you! 🙂

@niklasnatter niklasnatter merged commit 2720833 into sulu:1.2 Mar 10, 2021
@alexander-schranz alexander-schranz added the bug Error or unexpected behavior of already existing functionality label Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Error or unexpected behavior of already existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants