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

Extracted common code for Binary and Media field type #407

Merged
merged 5 commits into from
Aug 27, 2024

Conversation

alongosz
Copy link
Member

@alongosz alongosz commented Jul 17, 2024

🎫 Issue Related to IBX-8138

Related PRs:

Description:

This PR addresses one of the many code redundancy issues found by SonarCloud while working on #385.

We already define BinaryBase for Media and Binary files, so related code & tests should rely on that.

  • Extracted BaseSearchField for Media and Binary field types as it was a 1:1 copy-paste.
  • [Tests] Extracted common base for Media and Binary field type integration tests.

For QA:

Regression tests should be enough (ibexa/commerce#1004).

@alongosz alongosz changed the title [Tests] Extracted common base for Binary and Media ft integration tests Extracted common code for Binary and Media field type Jul 17, 2024
@alongosz alongosz force-pushed the ibx-8138/tests-fieldtype-binary-base-dry-fix branch from 94a026d to f110dc0 Compare July 17, 2024 14:19
Copy link

sonarcloud bot commented Jul 18, 2024

@alongosz alongosz force-pushed the ibx-8138/tests-fieldtype-binary-base-dry-fix branch from a9ba9c8 to 22d876c Compare August 26, 2024 12:16
Copy link

sonarcloud bot commented Aug 26, 2024

ms2ad pushed a commit to ms2ad/ibexa-core that referenced this pull request Aug 26, 2024
@alongosz alongosz merged commit 0561171 into main Aug 27, 2024
14 checks passed
@alongosz alongosz deleted the ibx-8138/tests-fieldtype-binary-base-dry-fix branch August 27, 2024 09:38
barw4 pushed a commit that referenced this pull request Oct 17, 2024
For more details see #407

Key changes:

* Extracted redundant Binary and Media SearchField into a common base

* [Tests] Extracted common base for Binary and Media ft integration tests

* [Tests] Made MediaIntegrationTest::getValidFieldSettings return type more strict

* [PHPStan] Aligned baseline with the changes

---------

Co-authored-by: Adam Wójs <[email protected]>
Co-authored-by: Mikolaj Adamczyk <[email protected]>
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