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-929: Removed unused DeleteLocationEvent #75

Merged
merged 5 commits into from
Aug 26, 2021

Conversation

mateuszdebinski
Copy link
Contributor

Question Answer
JIRA issue IBX-929
Type bug
Target Ibexa DXP version v3.3
BC breaks no
Doc needed no

This event was moved from eZ Platform 2.5 but was under review it turned out that in 2.5 nothing was happening anyway when calling it:
a function that is assigned to a slot in 2.5:

public function deleteContent(int $contentId): void

where the function getContent return null because content not found:
private function getContent(int $contentId, ?array $languages = null, ?int $versionNo = null): ?Content

finally, the processSending function does nothing because $content is set to null:

private function processSending(string $method, string $action, ?Content $content, ?int $versionNo = null): void

After talking to Tomasz, we agreed that this event can be removed in 3.3

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (master for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping @ezsystems/php-dev-team).

@mateuszdebinski mateuszdebinski added bug Something isn't working Ready for review labels Aug 25, 2021
@adamwojs
Copy link
Member

Could you please fix issues reported by phpstan ?

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@mateuszdebinski
Copy link
Contributor Author

Could you please fix issues reported by phpstan ?

I corrected this test, but it was not related to my changes, but I think that it will not be a problem to implement these changes along with this PR

@adamwojs adamwojs changed the title IBX-929: removed unused DeleteLocationEvent IBX-929: Removed unused DeleteLocationEvent Aug 26, 2021
@Steveb-p Steveb-p requested a review from a team August 26, 2021 09:15
Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

@mateuszdebinski the change is ok, but how does this fix the reported issue?

@mateuszdebinski
Copy link
Contributor Author

@mateuszdebinski the change is ok, but how does this fix the reported issue?

onDeleteLocation function called updateLocationWithChildren and this function get the location by id and content for the location, which raised exceptions because the location did not exist anymore

@lserwatka lserwatka merged commit aca191c into 2.1 Aug 26, 2021
@lserwatka lserwatka deleted the IBX-929-function-deleteLocations-throw-errors branch August 26, 2021 13:06
@lserwatka
Copy link
Member

You can merge it up now.

ciastektk added a commit that referenced this pull request Mar 16, 2022
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
Development

Successfully merging this pull request may close these issues.