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-8309: the order of str_replace execution has been changed to match what was before the changes #65

Merged
merged 1 commit into from
May 29, 2024

Conversation

mateuszdebinski
Copy link
Contributor

🎫 Issue IBX-8309

Before the changes we had str_replace which looked like this:

 $resolver = str_replace(
            [
                'content',
                'location',
                'item',
                'field',
            ],
            [
                'value.getContent()',
                'value.getLocation()',
                'value',
                'resolver("DomainFieldValue", [value, "' . $fieldDefinition->identifier . '"])',
            ],
            $resolver
        );

which did not replace the identifiers of fields that contained strings such as: content, location, item.
After changes, we first change the field to the resolver(... and then we use str_replace to replace the rest, which causes even the field identifiers to be changed. to prevent this, I moved str_replace before replace field to resolver(... so that it does not affect the identifiers

@mateuszdebinski mateuszdebinski added Bug Something isn't working Ready for review labels May 17, 2024
@mateuszdebinski mateuszdebinski requested a review from a team May 17, 2024 12:03
@mateuszdebinski mateuszdebinski self-assigned this May 17, 2024
Copy link

sonarcloud bot commented May 17, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@mateuszdebinski mateuszdebinski changed the base branch from main to 4.6 May 17, 2024 12:04
Copy link
Contributor

@konradoboza konradoboza left a comment

Choose a reason for hiding this comment

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

Looks ok, but please double check all the scenarios coming from: https://issues.ibexa.co/browse/IBX-7979 when testing.

@konradoboza konradoboza requested a review from a team May 21, 2024 13:05
@wizhippo
Copy link

wizhippo commented May 27, 2024

Looks to be the same as https://issues.ibexa.co/browse/IBX-8116 also

@konradoboza konradoboza merged commit 854913a into 4.6 May 29, 2024
8 of 9 checks passed
@konradoboza konradoboza deleted the IBX-8309_changed_filed_indetifires branch May 29, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working QA approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants