Conversation
|
I'm against exposing every single attribute as it makes it harder for me to change the code while keeping BC. The code extracted to So the only changes I'd merge are the new methods |
|
From one side I agree, what is not always good expose all attributes. Looks like some methods doing to much. we can split them to smaller ones and use getters/setters for them. For example for some case i need to get instanceId at the beging of flow. And it should not change. example you can do this: $flow->bind(new FormRequest()); // for new instance
$flow->bind($formRepo->getByInstance($flow->getInstanceId())); // if we have some steps in db already both cases binds formData, thats we need. At current version is impossible to fix this. because formData is private :( Another small example. Imagine you want replace instanceId to another format UUID :) .... yeah isNeedToResetFlow is doing to much (like determineInstanceId with newInstance = true), i just moved some code from bindFlow method. Just i havn't enough time properly to refactor this method. |
At this time is impossible to extend some methods, because it uses private methods where is really not needed.