Re: I am interested in taking over HTML_BBCodeParser

From: Date: Fri, 20 Jan 2006 04:59:32 +0000
Subject: Re: I am interested in taking over HTML_BBCodeParser
References: 1 2 3 4 5 6 7 8 9  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-3398@lists.php.net to get a copy of this message
On 1/19/06, Seth Price <seth@pricepages.org> wrote: > OK, I guess I was just unclear on what was enough of a BC break to > warrant a new package. I was thinking that incrementing major version > numbers (v2.0) would give me a little more leeway. I'll try to think > of other things I would like to see that would otherwise be limited > by a BC break and try to get all BC breakage rolled into one package. > > Or maybe we should keep BBCodeParser2 in beta for a while. > > Examples of other things that I may like changed that would require > possible BC breaks: > - Stack based renderer > - This would allow easy use of things like Text_Highlighter in the > [code] tag. It is pretty, but I don't see a good way to use the > Highlighter as is. > - But the best implementation of the new renderer would require more > filter changes. > - Why are all filters extended from BBCodeParser itself? It would > make more sense to simply use a BBCodeParser_Filter class. This has > led to odd bugs like #5844. > - Some of the tags behave unexpectedly, at least if you are used to > vBulletin, phpBB, and/or InfoPop style tags (example: [quote] tags). > Now would be a good time to change that functionality. > - Should newlines automatically be replaced with <br /> by default? > That is what I would expect. (But they aren't.) > - The parse() method seems mis-named. Not only does it parse, but it > verifies and renders too. We can keep qparse(), but I think that the > other methods should be sorted out to allow for more control. More > control would be useful when storing already-parsed-and-verified-but- > not-rendered tokens in database for performance reasons. > - The current code for adding and removing filters on-the-fly works, > but is kind of a hack to get around odd design stuff. I could rework > that. > - The filter's _definedTags format seems kind of dumb in places. I > could think of some more appropriate flags for tags. > - While I'm at it, I should take a look at Text_Wiki again. I > remember there were some nice things in there from when I was looking > at that code... > > Questions/Comments? Yes, all of these would be good changes for a v2. It sounds like you already made enough changes to warrant it. AFAIK you should be fine putting your current code in as HTML_BBCodeParser2. Just make it 0.1.0 alpha for now and update it as you get further towards finishing. And if the end result is an extension of Text_Wiki that would also be nice. :-) > ~Seth > > On Jan 19, 2006, at 10:08 PM, Justin Patrin wrote: > > > On 1/19/06, Seth Price <seth@pricepages.org> wrote: > >> (Oops, just realized that I didn't copy the list on this last email, > >> apologies.) > >> > >> I've put a bit of effort into keeping as much BC as I can. With a > >> default install, the most likely (and serious) problem will be HTML > >> chars being escaped twice (which really isn't that serious). Once in > >> their code, once by default in HTML_BBCodeParser. There is an option > >> to turn that off in BBCodeParser, or they can remove the extra > >> htmlspecialchars() from their code. > > > > This counts as a BC break. > > > >> > >> The other BC breaks are mostly harmless. Like list numbering not > >> being supported. And the new filter format is similar enough that it > >> (mostly) works with old code. The only things that don't work in old > >> filters are the validation rules, they are simply ignored and > >> replaced with defaults. > >> > >> The package that I posted on my site doesn't have the Extended filter > >> (I replaced it with TextInline and TextBlock filters), but I can > >> easily put that back in for BC reasons. > >> > > > > These are all BC breaks and any BC break in a stable package requires > > 1 of 2 things. > > > > 1) Make the new code behave exactly like the old code when used as the > > old code was (usually with a flag or option to turn on newer > > functionality). It is not good enough to say that it will affect few > > users or that they can turn off the new functionality with an option. > > Think of the people who use HTML_BBCodeParser as part of a larger > > project/package and who have no idea about coding or the sub-packages > > used. > > 2) Make a new major version of the package. e.g. HTML_BBCodeParser2 > > v2.0 > > > >> In short, I'm not convinced that a separate v2 package is needed. To > >> me it seems like unnecessary clutter of the PEAR space. > > > > Unless the new code behaves *excatly* as the old code did (barring > > changes made to fix security bugs or fixing previous incorrect > > behavior) it needs to be released a new major version. > > > >> > >> If you still want to make a separate package, then I would like to > >> take a look at new features that require a larger BC break. > >> ~Seth > >> > >> On Jan 19, 2006, at 4:03 PM, Arnaud Limbourg wrote: > >> > >>> If it does break BC then HTML_BBCodeParser2 can indeed be added > >>> with the warning on pearweb that version 1 is deprecated in favor > >>> of v2. > >>> > >>> Sounds like the best course of action. > >>> > >>> Arnaud. > >>> > >>> Justin Patrin wrote: > >>>> On 1/19/06, Joe Stump <joe@joestump.net> wrote: > >>>>> Is there any reason that Seth couldn't have HTML_BBCodeParser > >>>>> rely on > >>>>> Text_Wiki and use that for 90% of the functionality and then build > >>>>> his validation/repair stuff on top of that? > >>>> It *should* be possible, but it would require lots of re-working of > >>>> code since the designs of the 2 packages is very different. > >>>> If he has made HTML_BBCodeParser better, I say let him put this > >>>> code > >>>> into PEAR HTML_BBCodeParser2 (since it breaks some BC). > >>> > >>> > >> > >> -- > >> PEAR QA Mailing List (http://pear.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > > > -- > > Justin Patrin > > > > > > -- Justin Patrin

« previous php.pear.qa (#3398) next »