SyliusResourceBundle
SyliusResourceBundle copied to clipboard
Remove resource when redirect on delete
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Related tickets | fixes #X, partially #Y, mentioned in #Z |
License | MIT |
Hi team :wave:
I add this issue when trying to call deleteAction on a custom entity.
The fact is my entity is strongly typed, and there is no nullable id on it :
class Entity implement ResourceInterface
{
private int $id;
public function getId(): int
{
return $this->id;
}
}
Passing the resource on this redirectToIndex force it to look in the resource for any id parameters (here), and it's raised an exception while trying to access to a property not initialized.
I guess on a deleteAction, it's not mandatory to retrieve the previous id, so we can safely remove it ?
I just submit quickly this patch to see if every tests passes, if it's not the case, i'll look deeper what happen. WDYT ?
Merged with the latest state of master
to fix conflicts.
@ztellman Merged with the latest changes from master
(there were quite a few)
Sorry, I managed to completely forget about this. I'm going on vacation in a few days, so it may be a few weeks before I can do a deep dive, but I just wanted register my intent to get this reviewed and merged.
@ztellman Sure, no worries. When this is merged, I will create another PR with the setting to send pings periodically after idle timeout (a.k.a heartbeating). Just don't want to mess everything up in a single PR.
Updated.
Updated the same PR with periodical ping/pong heartbeats.
Merged with the latest master to avoid conflicts.
I'm sorry this took so long to review. It looks good to me, merging.
Hey I'm looking for a way to manually send pings, and I ended up at the issues referenced here. But websocket-ping
and heartbeats are both gone now, where can I find the discussion about that change?
@matthewdowney websocket-ping
function is in here. Not sure what do you mean by "gone" 🤔
Ah thank you so much! I was looking in http.clj. I should have checked if it was in another namespace, my apologies.
No problems at all, @matthewdowney!