hostnet / form-handler-bundle

Provide an easier way of handling forms in actions
MIT License
71 stars 16 forks source link

Make HandlerConfigInterface fluent in the next major release #58

Open vudaltsov opened 6 years ago

vudaltsov commented 6 years ago

I read this article https://ocramius.github.io/blog/fluent-interfaces-are-evil/, I agree that in most cases fluent interfaces are not good.

But configurator by nature is not supposed to return anything. So it can be either : void or : self. I think that fluent interface is more convenient as it gives you both usage possibilities.

@iltar , what do you think?

yannickl88 commented 6 years ago

yeah, not sure why we didn't make it fluid in the first place... You have my vote!

linaori commented 6 years ago

I'm not necessarily opposed to having it, but I wouldn't use it if you write unit-tests with mocks/prophecies. You'll have to define a willReturn every single time.