-
Notifications
You must be signed in to change notification settings - Fork 737
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
Type.php: Removed Exception thrown in deleteById() #1317
Conversation
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.
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. |
Hi @ruflin! We discussed this enhancement in this issue. I'll have a look at the tests. |
Tests seem to work now and I have added a line to CHANGELOG.md. |
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
@tastendruecker Any update on this one? |
Implemented in #1732 |
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.