-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix for issue #5699 - Disable label position caching for Zend\View\Helper\FormRow::__invoke() #5742
Conversation
hmmm, I see the catch. The thing is that the A solution could be to pass the parameter to from What do you think? /cc @weierophinney |
I thought myself of sugesting such solution (passing extra param to render) when posting the issue but was not sure if it will not break the interface of view helpers... Anyway changing one property (labelPosition) in two contexts (permanent and temporary) causes the problem - so I thougth also of using a second property to store the temporary change in invoke() but that did not seem an elegant solution to me... |
the |
I try not to debate on what exactly is the BC break, because that depends on the point of view. Both fixes (#3626 and #4771) are a BC break for the other group 😉 An additional parameter for |
Well, strictly speaking #4771 adds a test, letting existing ones pass, That said, if you approve the approach I suggested, let's go with it; we'll |
You are right, I see now that it is failing due to HTML vs. XHTML syntax. I did not see why it failed earlier. The tests for the initial fix (#3626) were indeed incomplete, testing label position cache for __invoke() was never added. I am a bit new to GitHub, but I think it is ok to change this PR with your suggestion? Or do I need to create a new PR with the correct fix? |
No need for a new PR, you can safely start from scratch and |
The original workflow we developed was: $this->setLabelPosition('prepend');
// render a bunch of FormRow's, which are just elements wrapped with labels, help descriptions, and validation error messages This workflow was in place because it assumed that every The only improvement I think we'd need to make differently is to alter |
Note: |
@weierophinney Is the fix ok this way or does it need some changes? |
…module-manager-init' Close zendframework#5948
This PR needs a rebase |
Is there an easier way for rebasing without a huge list of conflicts? It is a bit time consuming having to fix all those conflicts all the time. |
@Martin-P not really - rebasing is really about fixing those conflicts. Either you fix them, or the merger has to, and honestly, if every PR had a huge set of conflicts to fix, reviewers would have a hard time getting stuff done :( |
@Martin-P Merging the most recent version of master is another approach and only need fix conflicts for one commit. It's more cleaner rebase but if you feel it's a nightmare then merge. Also you could fix up some of your commits which are not outstanding like "fix typo" |
@Maks3w if the PR author merges master into his PR we have a nightmare when we need to git bisect looking for bugs... I always squash PRs when that happens... |
How can I change that? I need to do a commit to make the changes? I guess my knowledge of git is somewhat limited :) |
@Martin-P I can squash the commits, no big deal. |
Ping @Ocramius -- will you be able to merge this, or should I reassign? Also, I marked for 2.4. |
@weierophinney I can merge in a couple of hours |
__invoke()
does not cache label position anymoresetDefaultLabelPosition
which is cached and reused byZend\View\Helper\FormRow
getDefaultLabelPosition
for easy debugging purposes