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

IBX-1580: External storage for field type settings #28

Merged
merged 8 commits into from
Dec 15, 2021

Conversation

adamwojs
Copy link
Member

@adamwojs adamwojs commented Nov 30, 2021

Question Answer
JIRA issue IBX-1580
Type feature
Target Ibexa version v4.0
BC breaks no

Added extension point which allows o load field type settings from external source.

External storage for Field Type settings needs implement

interface FieldConstraintsStorage
{
    public function storeFieldConstraintsData(
        int $fieldDefinitionId,
        FieldTypeConstraints $fieldTypeConstraints
    );

    public function getFieldConstraintsData(
        int $fieldDefinitionId
    ): FieldTypeConstraints;

    public function deleteFieldConstraintsData(
        int $fieldDefinitionId
    ): void;
}

and be registered as a service with tag ibexa.field_type.external_constraints_storage e.g.

App\FieldType\Example\ExternalStorage:
    tags:
        - { name: ibexa.field_type.external_constraints_storage, alias: example }

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (main for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Document removeFieldDefitnion signature change
  • Asked for a review (ping @ibexa/engineering).

@adamwojs adamwojs force-pushed the field_settings_external_storage branch from 4f961de to 9d57c7c Compare December 4, 2021 11:01
@adamwojs adamwojs force-pushed the field_settings_external_storage branch from 7888be9 to bd2a2a1 Compare December 4, 2021 13:01
@adamwojs adamwojs requested a review from alongosz December 9, 2021 13:49
@adamwojs adamwojs added the Doc needed The changes require some documentation label Dec 9, 2021
@mikadamczyk mikadamczyk requested a review from alongosz December 15, 2021 11:14
@alongosz alongosz merged commit a2333b8 into main Dec 15, 2021
@alongosz alongosz deleted the field_settings_external_storage branch December 15, 2021 12:52
@DominikaK DominikaK removed the Doc needed The changes require some documentation label Mar 25, 2022
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.

5 participants