Re: HTML_QuickForm2 / new release
| From: | Christian Weiske | Date: | Thu, 15 Jan 2009 07:29:20 +0000 |
| Subject: | Re: HTML_QuickForm2 / new release | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51425@lists.php.net to get a copy of this message | ||
Hello Alexey,
> > The current released version crashes when outputting the form (CVS
> > works) which is a big showstopper.
> Can you clarify?
Of course. Just install HTML_QuickForm2 from pear (not the cvs
version), create a new form object and echo it. You'll get a fatal
error.
This issue has been fixed in cvs quite some time ago, but it was a
first "wtf?" when we tried out QF2.
> While I'm certainly tempted by your offer, I have a feeling that you
> and your colleagues haven't done necessary research before offering
> these resources: http://news.php.net/php.pear.general/29591
First - we're using QF2 only for some days now.
Second - the colleague actually writing the QF2 code was already aware
of this, just I didn't have the current knowledge level.
Third - thanks for reminding me that asking questions is seen as a
weakness.
> > The first ones (ArrayAccess to e.g. use a form easily
> > in Smarty, and rules in containers) have been attached to the
> > tracker. We'd like to see them released soon so that we now that a)
> > the direction in which we're going is correct and b) don't have to
> > change our codebase afterwards too much.
> "I want you to apply our changes NOW and release your package
> IMMEDIATELY so that we won't be burdened by keeping a private fork
> with the stuff only we need".
Alexey, I don't demand anything - I merely said that I'd be great if
those patches could be reviewed, and if appropriate, released in a new
version.
If that would happen in time (soon), then we would have lesser
burden with maintaining our own fork, that is correct.
Now that you tell us that the changes we made will never ever be in QF2
because its "things only we need", we can either choose to maintaining
our completely own fork or drop the code and only use the stock methods.
> > If there is anything holding you back or when the quality of our
> > patches isn't high enough, just let me know and we do the best we
> > can to meet your requirements.
>
> The ArrayAccess patch
> http://pear.php.net/bugs/patch-display.php?>
> bug=15618&patch=HTML_QuickForm2.diff&revision=1231774581
> violates the Principle of Least Surprise severely:
> $form['foo'] = 'text';
> echo gettype($form['foo']); // Will output "object". WTF?
As Daniel already pointed out, with the increasing use of SPL some neat
tricks get possible. While one might take a while to get used to, they
help writing less - thus mostly more readable - code that does the same
thing as method concatenation orgies.
I also don't think that the behavior is such a surprise - who would use
an object with array brackets [] if he didn't knew about the special
interface?
> The Rule for Containers patch
> http://pear.php.net/bugs/patch-display.php?>
> bug=15619&patch=Rule_Compare_for_Container.diff&revision=1231775394
> does exactly the same:
> If I do a
> $container->addRule('lt', 'Should be less that 4', 4);
> Do i expect
> 1) Container to contain less than 4 non empty elements?
> 2) Value of each element's in Container to be less than 4?
> 3) Sum of Container's elements' values to be less than 4?
> For those not bothering to read the patch: the answer is... (3)!
> Again, WTF?
I did not state that our patches are laid in stone and are correct. I
asked for feedback. The patch was actually something that solved a
problem for us, and we implemented it.
> The correct solution to the Smarty problem is of course an
> implementation of (some kind of) Array renderer, the correct solution
> of Rule for Containers problem is, probably, implementation of some
> kind of iterator for Rules. If you want to discuss the implementation
> details for these, then let's start by *discussing*
See above. We are willing to discuss and fix our patches. Teh problem
with discussion is that nothing gets implemented. Having an implemented
idea to discuss about is sometimes more productive.
--
Regards/Mit freundlichen Grüßen
Christian Weiske
-= Geeking around in the name of science since 1982 =-
Attachment: [application/pgp-signature] signature.asc
Attachment: [application/pgp-signature] signature.asc