Re: Re: File_SearchReplace API and versioning

From: Date: Mon, 05 Dec 2005 23:54:13 +0000
Subject: Re: Re: File_SearchReplace API and versioning
References: 1 2 3 4 5 6 7  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-3315@lists.php.net to get a copy of this message
On Mon, 05 Dec 2005 21:17:48 +0100, Arnaud Limbourg wrote: > Arnaud Limbourg wrote: >>> Please answer this questions for me without reading package docs just >>> to understand your POV. >>> >>> Does "doSearch(false)" construction make sense for you? >>> What should it do if it does? >>> Is it obvious for everybody else? >>> What should doSearch() do in your opinion _by default_ in a package with doReplace() >>> method? >> >> If you were talking about a new package then yes. *But* >> File_SearchReplace was released a long time ago and you cannot change a >> default behaviour or you will break BC. >> >> Make it doSearch('search') if you want. >> >> Arnaud. > > To follow up on that > > Make it > > $class->setReadOnly(true); > > That way you offer the new behaviour while keeping BC. Just my 5 cents ... the way Arnaud just said is the way to go if you want to keep BC and skip the whole new package thing. What I propose is that you do something along the line of what Arnaud said, to keep BC but at the same time make a v2 package which does it the way you want it but at the same time is PHP 5.1 only (given that there isn't any core thing that already does this thing, which I really doubt) That's how I see it :) - Helgi

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