https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19966 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Kyle M Hall from comment #8)
(In reply to Jonathan Druart from comment #7)
Yes I thought about that, but it may be problematic as we do not necessarily create the object for the notices only. So if we do it that way (when creating it) we may need to fetch it twice.
I agree. I don't think we should have to fetch an object twice. I think the fact that you can set read_only but not unset it is sufficient. Basically, and object can be passed around the entire lifecycle of a script call, then be marked read_only at the end and passed to the template.
The *other* option would be a new_from_object method that close the passed in object. Then you could have read_only be immutable and set on creation.
I agree with either option, but we still need a way to tell which methods have/don't have side effects that should then be forbidden. -- You are receiving this mail because: You are watching all bug changes.