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

Type.php: Removed Exception thrown in deleteById() #1317

Closed

Conversation

tastendruecker
Copy link

An exception was thrown if no data set corresponding to param $id was found (and hence was not deleted). Removed this behavior because it is a very harsh reaction to a more or less uncritical situation because the result is the same: The data requested to be deleted no longer exists. The information wether or not a record set was deleted is supposed to be part of the returned $response.

An exception was thrown if no data set corresponding to param $id was found (and hence was not deleted). Removed this behavior because it is a very harsh reaction to a more or less uncritical situation because the result is the same: The data requested to be deleted no longer exists.
@ruflin
Copy link
Owner

ruflin commented Jun 1, 2017

I remember we discussed this in an other PR / Issue recently. Could you link to the issue?

Also this requires a CHANGELOG entry as it is a breaking change and probably you have to adjust the tests.

@tastendruecker
Copy link
Author

Hi @ruflin! We discussed this enhancement in this issue.

I'll have a look at the tests.

@tastendruecker
Copy link
Author

Tests seem to work now and I have added a line to CHANGELOG.md.

Copy link
Owner

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Left a few more comments. I will wait merging this until I did a bugfix release as this is a breaking change.

@@ -266,27 +266,6 @@ public function testDeleteById()
$this->assertTrue(true);
}

try {
Copy link
Owner

Choose a reason for hiding this comment

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

Instead of removing the tests, could we add one that it now works as expected?

@@ -20,7 +20,8 @@ All notable changes to this project will be documented in this file based on the

### Improvements

- Added support for `other_bucket` and `other_bucket_key` paramters on `Elastica\Aggregation\Filters`
- Added support for `other_bucket` and `other_bucket_key` parameters on `Elastica\Aggregation\Filters`
- Removed NotFoundException thrown in `\Elastica\Type::deleteById` [#565](https://github.com/ruflin/Elastica/issues/565)
Copy link
Owner

Choose a reason for hiding this comment

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

This is actually a breaking change.

@ruflin
Copy link
Owner

ruflin commented Aug 31, 2017

@tastendruecker Any update on this one?

@thePanz
Copy link
Collaborator

thePanz commented Dec 12, 2019

Implemented in #1732
Closing this one

@thePanz thePanz closed this Dec 12, 2019
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.

3 participants