Transition to V3 classes#24
Conversation
|
This looks very interesting! Thank you for providing this. |
|
Thinking about it, the getInfo fix is something which should not have to wait for the PR as a whole. I will probably cherry pick this. As for the additions to createVariable it seems like we had similar ideas - see VariableFactoryTrait The global flag I am not so sure about. Maybe we can achieve the same without it? As a concept I like very much lib/ trying the V3 classses first. It allows us to migrate even if not all types have been replicated yet (think custom or app specific types) |
|
Re: getInfo() The original code was doing nothing if there was no file uploaded, so the closest we could do is to return There could be other cases like that. Essentially we have to re-check places where we (now) have |
|
Updated to exclude merged changes. I think [to facilitate testing] we do not need the flag restoring old behavior. If any issues are found, they would be mostly related to possible out-of-sync changes between original and V3 classes, so should be easy to fix. If the changes are merged, the next steps would be to migrate rendering code into the V3 classes; update other apps; then drop old classes (but keep Horde_Form for BC). |
|
I agree. Let's do it this way. |
|
Yes, I think we can proceed. I think the only issues could be if there are any leftover |
|
I see a couple of places to fix (apart from tests and doc block comments): Both should just use Also, there are some references to |
This allows a seamless migration to V3 classes, while still supporting legacy
{app}_Form_Type_{type}classes that do not yet have the correct V3 classes.Note, the 3828e85 commit (included here because if affects V3 class too) provides a global fix to the behavior change in
getInfo()for 'file' type. The horde/turba@5abeb2d fix is no longer needed as a result (and it was fixing it only in Turba, anyway).Experimental, cherry-picked from my fork.